KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/workspace/border_types.h
Date: 2025-11-25 17:23:32
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 1 1 100.0%
Branches: 5 5 100.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #ifndef KLEIDICV_WORKSPACE_BORDER_TYPES_H
6 #define KLEIDICV_WORKSPACE_BORDER_TYPES_H
7
8 #include <optional>
9
10 #include "kleidicv/ctypes.h"
11
12 namespace kleidicv {
13
14 enum class FixedBorderType {
15 REPLICATE,
16 REFLECT,
17 WRAP,
18 REVERSE,
19 };
20
21 13144 inline std::optional<FixedBorderType> get_fixed_border_type(
22 kleidicv_border_type_t border_type) {
23
5/5
✓ Branch 0 taken 1828 times.
✓ Branch 1 taken 240 times.
✓ Branch 2 taken 7376 times.
✓ Branch 3 taken 1896 times.
✓ Branch 4 taken 1804 times.
13144 switch (border_type) {
24 case KLEIDICV_BORDER_TYPE_REPLICATE:
25 7376 return FixedBorderType::REPLICATE;
26 case KLEIDICV_BORDER_TYPE_REFLECT:
27 1896 return FixedBorderType::REFLECT;
28 case KLEIDICV_BORDER_TYPE_WRAP:
29 1804 return FixedBorderType::WRAP;
30 case KLEIDICV_BORDER_TYPE_REVERSE:
31 1828 return FixedBorderType::REVERSE;
32 default:
33 240 return std::optional<FixedBorderType>();
34 }
35 13144 }
36
37 } // namespace kleidicv
38
39 #endif // KLEIDICV_WORKSPACE_BORDER_TYPES_H
40