KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/analysis/min_max_api.cpp
Date: 2025-09-25 14:13:34
Exec Total Coverage
Lines: 7 7 100.0%
Functions: 7 7 100.0%
Branches: 24 24 100.0%

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 kleidicv
39
40 #define KLEIDICV_DEFINE_MINMAX_API(name, type) \
41 KLEIDICV_MULTIVERSION_C_API( \
42 name, &kleidicv::neon::min_max<type>, \
43 KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::min_max<type>), \
44 &kleidicv::sme::min_max<type>, nullptr)
45
46
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_MINMAX_API(kleidicv_min_max_u8, uint8_t);
47
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_MINMAX_API(kleidicv_min_max_s8, int8_t);
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_MINMAX_API(kleidicv_min_max_u16, uint16_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_MINMAX_API(kleidicv_min_max_s16, int16_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_MINMAX_API(kleidicv_min_max_s32, int32_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_MINMAX_API(kleidicv_min_max_f32, float);
52
53 #define KLEIDICV_DEFINE_MINMAXLOC_API(name, type) \
54 KLEIDICV_MULTIVERSION_C_API(name, &kleidicv::neon::min_max_loc<type>, \
55 nullptr, nullptr, nullptr)
56
57 8 KLEIDICV_DEFINE_MINMAXLOC_API(kleidicv_min_max_loc_u8, uint8_t);
58