| 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 min_max(const T *src, size_t src_stride, size_t width, | ||
| 15 | size_t height, T *min_value, T *max_value); | ||
| 16 | |||
| 17 | template <typename T> | ||
| 18 | kleidicv_error_t min_max_loc(const T *src, size_t src_stride, size_t width, | ||
| 19 | size_t height, size_t *min_offset, | ||
| 20 | size_t *max_offset); | ||
| 21 | |||
| 22 | } // namespace neon | ||
| 23 | |||
| 24 | namespace sve2 { | ||
| 25 | |||
| 26 | template <typename T> | ||
| 27 | kleidicv_error_t min_max(const T *src, size_t src_stride, size_t width, | ||
| 28 | size_t height, T *min_value, T *max_value); | ||
| 29 | } // namespace sve2 | ||
| 30 | |||
| 31 | namespace sme { | ||
| 32 | |||
| 33 | template <typename T> | ||
| 34 | kleidicv_error_t min_max(const T *src, size_t src_stride, size_t width, | ||
| 35 | size_t height, T *min_value, T *max_value); | ||
| 36 | } // namespace sme | ||
| 37 | |||
| 38 | namespace sme2 { | ||
| 39 | |||
| 40 | template <typename T> | ||
| 41 | kleidicv_error_t min_max(const T *src, size_t src_stride, size_t width, | ||
| 42 | size_t height, T *min_value, T *max_value); | ||
| 43 | } // namespace sme2 | ||
| 44 | |||
| 45 | } // namespace kleidicv | ||
| 46 | |||
| 47 | #define KLEIDICV_DEFINE_MINMAX_API(name, type) \ | ||
| 48 | KLEIDICV_MULTIVERSION_C_API( \ | ||
| 49 | name, &kleidicv::neon::min_max<type>, \ | ||
| 50 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::min_max<type>), \ | ||
| 51 | &kleidicv::sme::min_max<type>, \ | ||
| 52 | KLEIDICV_SME2_IMPL_IF(&kleidicv::sme2::min_max<type>)) | ||
| 53 | |||
| 54 |
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_MINMAX_API(kleidicv_min_max_u8, uint8_t); |
| 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_MINMAX_API(kleidicv_min_max_s8, int8_t); |
| 56 |
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_MINMAX_API(kleidicv_min_max_u16, uint16_t); |
| 57 |
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_MINMAX_API(kleidicv_min_max_s16, int16_t); |
| 58 |
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_MINMAX_API(kleidicv_min_max_s32, int32_t); |
| 59 |
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_MINMAX_API(kleidicv_min_max_f32, float); |
| 60 | |||
| 61 | #define KLEIDICV_DEFINE_MINMAXLOC_API(name, type) \ | ||
| 62 | KLEIDICV_MULTIVERSION_C_API(name, &kleidicv::neon::min_max_loc<type>, \ | ||
| 63 | nullptr, nullptr, nullptr) | ||
| 64 | |||
| 65 | 10 | KLEIDICV_DEFINE_MINMAXLOC_API(kleidicv_min_max_loc_u8, uint8_t); | |
| 66 |