KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/workspace/border_types.h
Date: 2025-09-25 14:13:34
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 9858 inline std::optional<FixedBorderType> get_fixed_border_type(
22 kleidicv_border_type_t border_type) {
23
5/5
✓ Branch 0 taken 1371 times.
✓ Branch 1 taken 180 times.
✓ Branch 2 taken 5532 times.
✓ Branch 3 taken 1422 times.
✓ Branch 4 taken 1353 times.
9858 switch (border_type) {
24 case KLEIDICV_BORDER_TYPE_REPLICATE:
25 5532 return FixedBorderType::REPLICATE;
26 case KLEIDICV_BORDER_TYPE_REFLECT:
27 1422 return FixedBorderType::REFLECT;
28 case KLEIDICV_BORDER_TYPE_WRAP:
29 1353 return FixedBorderType::WRAP;
30 case KLEIDICV_BORDER_TYPE_REVERSE:
31 1371 return FixedBorderType::REVERSE;
32 default:
33 180 return std::optional<FixedBorderType>();
34 }
35 9858 }
36
37 } // namespace kleidicv
38
39 #endif // KLEIDICV_WORKSPACE_BORDER_TYPES_H
40