KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/conversions/float_conv_api.cpp
Date: 2025-11-25 17:23:32
Exec Total Coverage
Lines: 4 4 100.0%
Functions: 4 4 100.0%
Branches: 24 24 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 #include "kleidicv/conversions/float_conversion.h"
6 #include "kleidicv/dispatch.h"
7 #include "kleidicv/kleidicv.h"
8 #include "kleidicv/types.h"
9
10 namespace kleidicv {
11
12 namespace sve2 {
13
14 template <typename InputType, typename OutputType>
15 kleidicv_error_t float_conversion(const InputType* src, size_t src_stride,
16 OutputType* dst, size_t dst_stride,
17 size_t width, size_t height);
18
19 } // namespace sve2
20
21 namespace sme {
22
23 template <typename InputType, typename OutputType>
24 kleidicv_error_t float_conversion(const InputType* src, size_t src_stride,
25 OutputType* dst, size_t dst_stride,
26 size_t width, size_t height);
27
28 } // namespace sme
29
30 namespace sme2 {
31
32 template <typename InputType, typename OutputType>
33 kleidicv_error_t float_conversion(const InputType* src, size_t src_stride,
34 OutputType* dst, size_t dst_stride,
35 size_t width, size_t height);
36
37 } // namespace sme2
38
39 } // namespace kleidicv
40
41
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_MULTIVERSION_C_API(
42 kleidicv_f32_to_s8, &kleidicv::neon::f32_to_s8,
43 KLEIDICV_SVE2_IMPL_IF((&kleidicv::sve2::float_conversion<float, int8_t>)),
44 (&kleidicv::sme::float_conversion<float, int8_t>),
45 (&kleidicv::sme2::float_conversion<float, int8_t>));
46
47
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_MULTIVERSION_C_API(
48 kleidicv_f32_to_u8, &kleidicv::neon::f32_to_u8,
49 KLEIDICV_SVE2_IMPL_IF((&kleidicv::sve2::float_conversion<float, uint8_t>)),
50 (&kleidicv::sme::float_conversion<float, uint8_t>),
51 (&kleidicv::sme2::float_conversion<float, uint8_t>));
52
53
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_MULTIVERSION_C_API(kleidicv_s8_to_f32, &kleidicv::neon::s8_to_f32,
54 (&kleidicv::sve2::float_conversion<int8_t, float>),
55 (&kleidicv::sme::float_conversion<int8_t, float>),
56 (&kleidicv::sme2::float_conversion<int8_t, float>));
57
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_MULTIVERSION_C_API(
59 kleidicv_u8_to_f32, &kleidicv::neon::u8_to_f32,
60 (&kleidicv::sve2::float_conversion<uint8_t, float>),
61 (&kleidicv::sme::float_conversion<uint8_t, float>),
62 (&kleidicv::sme2::float_conversion<uint8_t, float>));
63