| 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 | |||
| 28 | namespace sme { | ||
| 29 | template <typename T> | ||
| 30 | kleidicv_error_t saturating_add_abs_with_threshold( | ||
| 31 | const T *src_a, size_t src_a_stride, const T *src_b, size_t src_b_stride, | ||
| 32 | T *dst, size_t dst_stride, size_t width, size_t height, T threshold); | ||
| 33 | |||
| 34 | } // namespace sme | ||
| 35 | |||
| 36 | namespace sme2 { | ||
| 37 | template <typename T> | ||
| 38 | kleidicv_error_t saturating_add_abs_with_threshold( | ||
| 39 | const T *src_a, size_t src_a_stride, const T *src_b, size_t src_b_stride, | ||
| 40 | T *dst, size_t dst_stride, size_t width, size_t height, T threshold); | ||
| 41 | |||
| 42 | } // namespace sme2 | ||
| 43 | |||
| 44 | } // namespace kleidicv | ||
| 45 | |||
| 46 | #define KLEIDICV_DEFINE_C_API(name, type) \ | ||
| 47 | KLEIDICV_MULTIVERSION_C_API( \ | ||
| 48 | name, &kleidicv::neon::saturating_add_abs_with_threshold<type>, \ | ||
| 49 | KLEIDICV_SVE2_IMPL_IF( \ | ||
| 50 | &kleidicv::sve2::saturating_add_abs_with_threshold<type>), \ | ||
| 51 | &kleidicv::sme::saturating_add_abs_with_threshold<type>, \ | ||
| 52 | KLEIDICV_SME_IMPL_IF( \ | ||
| 53 | &kleidicv::sme2::saturating_add_abs_with_threshold<type>)) | ||
| 54 | |||
| 55 |
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_saturating_add_abs_with_threshold_s16, int16_t); |
| 56 |