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 kleidicv | ||
31 | |||
32 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_MULTIVERSION_C_API( |
33 | kleidicv_f32_to_s8, &kleidicv::neon::f32_to_s8, | ||
34 | KLEIDICV_SVE2_IMPL_IF((&kleidicv::sve2::float_conversion<float, int8_t>)), | ||
35 | (&kleidicv::sme::float_conversion<float, int8_t>), nullptr); | ||
36 | |||
37 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_MULTIVERSION_C_API( |
38 | kleidicv_f32_to_u8, &kleidicv::neon::f32_to_u8, | ||
39 | KLEIDICV_SVE2_IMPL_IF((&kleidicv::sve2::float_conversion<float, uint8_t>)), | ||
40 | (&kleidicv::sme::float_conversion<float, uint8_t>), nullptr); | ||
41 | |||
42 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_MULTIVERSION_C_API(kleidicv_s8_to_f32, &kleidicv::neon::s8_to_f32, |
43 | (&kleidicv::sve2::float_conversion<int8_t, float>), | ||
44 | (&kleidicv::sme::float_conversion<int8_t, float>), | ||
45 | nullptr); | ||
46 | |||
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_MULTIVERSION_C_API(kleidicv_u8_to_f32, &kleidicv::neon::u8_to_f32, |
48 | (&kleidicv::sve2::float_conversion<uint8_t, float>), | ||
49 | (&kleidicv::sme::float_conversion<uint8_t, float>), | ||
50 | nullptr); | ||
51 |