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 | #include "kleidicv/types.h" | ||
8 | |||
9 | namespace kleidicv { | ||
10 | |||
11 | namespace neon { | ||
12 | |||
13 | template <typename T> | ||
14 | kleidicv_error_t saturating_add_abs_with_threshold( | ||
15 | const T *src_a, size_t src_a_stride, const T *src_b, size_t src_b_stride, | ||
16 | T *dst, size_t dst_stride, size_t width, size_t height, T threshold); | ||
17 | |||
18 | } // namespace neon | ||
19 | |||
20 | namespace sve2 { | ||
21 | template <typename T> | ||
22 | kleidicv_error_t saturating_add_abs_with_threshold( | ||
23 | const T *src_a, size_t src_a_stride, const T *src_b, size_t src_b_stride, | ||
24 | T *dst, size_t dst_stride, size_t width, size_t height, T threshold); | ||
25 | |||
26 | } // namespace sve2 | ||
27 | namespace sme { | ||
28 | template <typename T> | ||
29 | kleidicv_error_t saturating_add_abs_with_threshold( | ||
30 | const T *src_a, size_t src_a_stride, const T *src_b, size_t src_b_stride, | ||
31 | T *dst, size_t dst_stride, size_t width, size_t height, T threshold); | ||
32 | |||
33 | } // namespace sme | ||
34 | |||
35 | } // namespace kleidicv | ||
36 | |||
37 | #define KLEIDICV_DEFINE_C_API(name, type) \ | ||
38 | KLEIDICV_MULTIVERSION_C_API( \ | ||
39 | name, &kleidicv::neon::saturating_add_abs_with_threshold<type>, \ | ||
40 | KLEIDICV_SVE2_IMPL_IF( \ | ||
41 | &kleidicv::sve2::saturating_add_abs_with_threshold<type>), \ | ||
42 | &kleidicv::sme::saturating_add_abs_with_threshold<type>, nullptr) | ||
43 | |||
44 |
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_saturating_add_abs_with_threshold_s16, int16_t); |
45 |