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 kleidicv | ||
32 | |||
33 | #define KLEIDICV_DEFINE_C_API(name, type) \ | ||
34 | KLEIDICV_MULTIVERSION_C_API( \ | ||
35 | name, &kleidicv::neon::in_range<type>, \ | ||
36 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::in_range<type>), \ | ||
37 | KLEIDICV_SME_IMPL_IF(&kleidicv::sme::in_range<type>), nullptr) | ||
38 | |||
39 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_in_range_u8, uint8_t); |
40 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_in_range_f32, float); |
41 |