| 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 ScalarType> | ||
| 12 | kleidicv_error_t compare_equal(const ScalarType *src_a, size_t src_a_stride, | ||
| 13 | const ScalarType *src_b, size_t src_b_stride, | ||
| 14 | ScalarType *dst, size_t dst_stride, size_t width, | ||
| 15 | size_t height); | ||
| 16 | |||
| 17 | template <typename ScalarType> | ||
| 18 | kleidicv_error_t compare_greater(const ScalarType *src_a, size_t src_a_stride, | ||
| 19 | const ScalarType *src_b, size_t src_b_stride, | ||
| 20 | ScalarType *dst, size_t dst_stride, | ||
| 21 | size_t width, size_t height); | ||
| 22 | |||
| 23 | } // namespace neon | ||
| 24 | |||
| 25 | namespace sve2 { | ||
| 26 | template <typename ScalarType> | ||
| 27 | kleidicv_error_t compare_equal(const ScalarType *src_a, size_t src_a_stride, | ||
| 28 | const ScalarType *src_b, size_t src_b_stride, | ||
| 29 | ScalarType *dst, size_t dst_stride, size_t width, | ||
| 30 | size_t height); | ||
| 31 | |||
| 32 | template <typename ScalarType> | ||
| 33 | kleidicv_error_t compare_greater(const ScalarType *src_a, size_t src_a_stride, | ||
| 34 | const ScalarType *src_b, size_t src_b_stride, | ||
| 35 | ScalarType *dst, size_t dst_stride, | ||
| 36 | size_t width, size_t height); | ||
| 37 | } // namespace sve2 | ||
| 38 | |||
| 39 | namespace sme { | ||
| 40 | template <typename ScalarType> | ||
| 41 | kleidicv_error_t compare_equal(const ScalarType *src_a, size_t src_a_stride, | ||
| 42 | const ScalarType *src_b, size_t src_b_stride, | ||
| 43 | ScalarType *dst, size_t dst_stride, size_t width, | ||
| 44 | size_t height); | ||
| 45 | |||
| 46 | template <typename ScalarType> | ||
| 47 | kleidicv_error_t compare_greater(const ScalarType *src_a, size_t src_a_stride, | ||
| 48 | const ScalarType *src_b, size_t src_b_stride, | ||
| 49 | ScalarType *dst, size_t dst_stride, | ||
| 50 | size_t width, size_t height); | ||
| 51 | } // namespace sme | ||
| 52 | |||
| 53 | namespace sme2 { | ||
| 54 | template <typename ScalarType> | ||
| 55 | kleidicv_error_t compare_equal(const ScalarType *src_a, size_t src_a_stride, | ||
| 56 | const ScalarType *src_b, size_t src_b_stride, | ||
| 57 | ScalarType *dst, size_t dst_stride, size_t width, | ||
| 58 | size_t height); | ||
| 59 | |||
| 60 | template <typename ScalarType> | ||
| 61 | kleidicv_error_t compare_greater(const ScalarType *src_a, size_t src_a_stride, | ||
| 62 | const ScalarType *src_b, size_t src_b_stride, | ||
| 63 | ScalarType *dst, size_t dst_stride, | ||
| 64 | size_t width, size_t height); | ||
| 65 | } // namespace sme2 | ||
| 66 | |||
| 67 | } // namespace kleidicv | ||
| 68 | |||
| 69 | #define KLEIDICV_DEFINE_CMP_EQ_API(name, type) \ | ||
| 70 | KLEIDICV_MULTIVERSION_C_API( \ | ||
| 71 | name, &kleidicv::neon::compare_equal<type>, \ | ||
| 72 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::compare_equal<type>), \ | ||
| 73 | KLEIDICV_SME_IMPL_IF(&kleidicv::sme::compare_equal<type>), \ | ||
| 74 | KLEIDICV_SME2_IMPL_IF(&kleidicv::sme2::compare_equal<type>)) | ||
| 75 | |||
| 76 | #define KLEIDICV_DEFINE_CMP_GT_API(name, type) \ | ||
| 77 | KLEIDICV_MULTIVERSION_C_API( \ | ||
| 78 | name, &kleidicv::neon::compare_greater<type>, \ | ||
| 79 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::compare_greater<type>), \ | ||
| 80 | KLEIDICV_SME_IMPL_IF(&kleidicv::sme::compare_greater<type>), \ | ||
| 81 | KLEIDICV_SME2_IMPL_IF(&kleidicv::sme2::compare_greater<type>)) | ||
| 82 | |||
| 83 |
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_CMP_EQ_API(kleidicv_compare_equal_u8, uint8_t); |
| 84 |
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_CMP_GT_API(kleidicv_compare_greater_u8, uint8_t); |
| 85 |