KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/arithmetics/in_range_api.cpp
Date: 2025-11-25 17:23:32
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 2 2 100.0%
Branches: 12 12 100.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2023 - 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #include "kleidicv/dispatch.h"
6 #include "kleidicv/kleidicv.h"
7
8 namespace kleidicv {
9
10 namespace neon {
11 template <typename T>
12 kleidicv_error_t in_range(const T *src, size_t src_stride, uint8_t *dst,
13 size_t dst_stride, size_t width, size_t height,
14 T lower_bound, T upper_bound);
15 } // namespace neon
16
17 namespace sve2 {
18 template <typename T>
19 kleidicv_error_t in_range(const T *src, size_t src_stride, uint8_t *dst,
20 size_t dst_stride, size_t width, size_t height,
21 T lower_bound, T upper_bound);
22 } // namespace sve2
23
24 namespace sme {
25 template <typename T>
26 kleidicv_error_t in_range(const T *src, size_t src_stride, uint8_t *dst,
27 size_t dst_stride, size_t width, size_t height,
28 T lower_bound, T upper_bound);
29 } // namespace sme
30
31 namespace sme2 {
32 template <typename T>
33 kleidicv_error_t in_range(const T *src, size_t src_stride, uint8_t *dst,
34 size_t dst_stride, size_t width, size_t height,
35 T lower_bound, T upper_bound);
36 } // namespace sme2
37
38 } // namespace kleidicv
39
40 #define KLEIDICV_DEFINE_C_API(name, type) \
41 KLEIDICV_MULTIVERSION_C_API( \
42 name, &kleidicv::neon::in_range<type>, \
43 KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::in_range<type>), \
44 KLEIDICV_SME_IMPL_IF(&kleidicv::sme::in_range<type>), \
45 KLEIDICV_SME2_IMPL_IF(&kleidicv::sme2::in_range<type>))
46
47
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_in_range_u8, uint8_t);
48
6/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 4 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 3 times.
✓ Branch 4 taken 2 times.
✓ Branch 5 taken 1 times.
10 KLEIDICV_DEFINE_C_API(kleidicv_in_range_f32, float);
49