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_absdiff(const T *src_a, size_t src_a_stride, | ||
15 | const T *src_b, size_t src_b_stride, T *dst, | ||
16 | size_t dst_stride, size_t width, | ||
17 | size_t height); | ||
18 | |||
19 | } // namespace neon | ||
20 | |||
21 | namespace sve2 { | ||
22 | |||
23 | template <typename T> | ||
24 | kleidicv_error_t saturating_absdiff(const T *src_a, size_t src_a_stride, | ||
25 | const T *src_b, size_t src_b_stride, T *dst, | ||
26 | size_t dst_stride, size_t width, | ||
27 | size_t height); | ||
28 | |||
29 | } // namespace sve2 | ||
30 | |||
31 | namespace sme { | ||
32 | template <typename T> | ||
33 | kleidicv_error_t saturating_absdiff(const T *src_a, size_t src_a_stride, | ||
34 | const T *src_b, size_t src_b_stride, T *dst, | ||
35 | size_t dst_stride, size_t width, | ||
36 | size_t height); | ||
37 | |||
38 | } // namespace sme | ||
39 | |||
40 | } // namespace kleidicv | ||
41 | |||
42 | #define KLEIDICV_DEFINE_C_API(name, type) \ | ||
43 | KLEIDICV_MULTIVERSION_C_API( \ | ||
44 | name, &kleidicv::neon::saturating_absdiff<type>, \ | ||
45 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::saturating_absdiff<type>), \ | ||
46 | KLEIDICV_SME_IMPL_IF(&kleidicv::sme::saturating_absdiff<type>), nullptr) | ||
47 | |||
48 |
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_absdiff_u8, uint8_t); |
49 |
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_absdiff_s8, int8_t); |
50 |
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_absdiff_u16, uint16_t); |
51 |
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_absdiff_s16, int16_t); |
52 |
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_absdiff_s32, int32_t); |
53 |