KleidiCV Coverage Report


Directory: ./
File: kleidicv/include/kleidicv/arithmetics/rotate.h
Date: 2025-09-25 14:13:34
Exec Total Coverage
Lines: 9 9 100.0%
Functions: 1 1 100.0%
Branches: 6 6 100.0%

Line Branch Exec Source
1 // SPDX-FileCopyrightText: 2024 - 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
2 //
3 // SPDX-License-Identifier: Apache-2.0
4
5 #ifndef KLEIDICV_ARITHMETICS_ROTATE_H
6 #define KLEIDICV_ARITHMETICS_ROTATE_H
7
8 #include <cstddef>
9 #include <cstdint>
10
11 #include "kleidicv/ctypes.h"
12
13 namespace kleidicv {
14
15 696 inline bool rotate_is_implemented(const void *src, void *dst, int angle,
16 size_t element_size) {
17
2/2
✓ Branch 0 taken 6 times.
✓ Branch 1 taken 690 times.
696 if (angle != 90) {
18 6 return false;
19 }
20
2/2
✓ Branch 0 taken 684 times.
✓ Branch 1 taken 6 times.
690 if (src == dst) {
21 // Do not support inplace rotate at the moment
22 6 return false;
23 }
24
2/2
✓ Branch 0 taken 678 times.
✓ Branch 1 taken 6 times.
684 switch (element_size) {
25 case sizeof(uint8_t):
26 case sizeof(uint16_t):
27 case sizeof(uint32_t):
28 case sizeof(uint64_t):
29 678 return true;
30 default:
31 6 return false;
32 }
33 696 }
34
35 namespace neon {
36
37 kleidicv_error_t rotate(const void *src, size_t src_stride, size_t width,
38 size_t height, void *dst, size_t dst_stride, int angle,
39 size_t element_size);
40 } // namespace neon
41
42 } // namespace kleidicv
43
44 #endif // KLEIDICV_ARITHMETICS_ROTATE_H
45