| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2023 - 2025 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
| 2 | // | ||
| 3 | // SPDX-License-Identifier: Apache-2.0 | ||
| 4 | |||
| 5 | #include "kleidicv/dispatch.h" | ||
| 6 | #include "kleidicv/kleidicv.h" | ||
| 7 | #include "kleidicv/types.h" | ||
| 8 | |||
| 9 | namespace kleidicv { | ||
| 10 | |||
| 11 | namespace neon { | ||
| 12 | |||
| 13 | template <typename T, typename U> | ||
| 14 | kleidicv_error_t scale(const T *src, size_t src_stride, U *dst, | ||
| 15 | size_t dst_stride, size_t width, size_t height, | ||
| 16 | double scale, double shift); | ||
| 17 | } // namespace neon | ||
| 18 | |||
| 19 | namespace sve2 { | ||
| 20 | |||
| 21 | template <typename T, typename U> | ||
| 22 | kleidicv_error_t scale(const T *src, size_t src_stride, U *dst, | ||
| 23 | size_t dst_stride, size_t width, size_t height, | ||
| 24 | double scale, double shift); | ||
| 25 | |||
| 26 | } // namespace sve2 | ||
| 27 | |||
| 28 | namespace sme { | ||
| 29 | |||
| 30 | template <typename T, typename U> | ||
| 31 | kleidicv_error_t scale(const T *src, size_t src_stride, U *dst, | ||
| 32 | size_t dst_stride, size_t width, size_t height, | ||
| 33 | double scale, double shift); | ||
| 34 | |||
| 35 | } // namespace sme | ||
| 36 | |||
| 37 | namespace sme2 { | ||
| 38 | |||
| 39 | template <typename T, typename U> | ||
| 40 | kleidicv_error_t scale(const T *src, size_t src_stride, U *dst, | ||
| 41 | size_t dst_stride, size_t width, size_t height, | ||
| 42 | double scale, double shift); | ||
| 43 | |||
| 44 | } // namespace sme2 | ||
| 45 | |||
| 46 | } // namespace kleidicv | ||
| 47 | |||
| 48 | 10 | KLEIDICV_MULTIVERSION_C_API(kleidicv_scale_u8, | |
| 49 | &(kleidicv::neon::scale<uint8_t, uint8_t>), nullptr, | ||
| 50 | nullptr, nullptr); | ||
| 51 | |||
| 52 |
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_scale_u8_f16, |
| 53 | &(kleidicv::neon::scale<uint8_t, float16_t>), | ||
| 54 | &(kleidicv::sve2::scale<uint8_t, float16_t>), | ||
| 55 | &(kleidicv::sme::scale<uint8_t, float16_t>), | ||
| 56 | &(kleidicv::sme2::scale<uint8_t, float16_t>)); | ||
| 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_scale_f32, &(kleidicv::neon::scale<float, float>), | ||
| 60 | KLEIDICV_SVE2_IMPL_IF((&kleidicv::sve2::scale<float, float>)), | ||
| 61 | KLEIDICV_SME_IMPL_IF((&kleidicv::sme::scale<float, float>)), | ||
| 62 | KLEIDICV_SME2_IMPL_IF((&kleidicv::sme2::scale<float, float>))); | ||
| 63 |