| 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/dispatch.h" | ||
| 6 | #include "kleidicv/kleidicv.h" | ||
| 7 | #include "kleidicv/resize/resize_linear.h" | ||
| 8 | |||
| 9 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
10 | KLEIDICV_MULTIVERSION_C_API( |
| 10 | kleidicv_resize_linear_stripe_u8, &kleidicv::neon::resize_linear_stripe_u8, | ||
| 11 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::resize_linear_stripe_u8), | ||
| 12 | &kleidicv::sme::resize_linear_stripe_u8, nullptr); | ||
| 13 | |||
| 14 |
4/4✓ Branch 0 taken 2 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
10 | KLEIDICV_MULTIVERSION_C_API( |
| 15 | kleidicv_resize_linear_stripe_f32, | ||
| 16 | &kleidicv::neon::resize_linear_stripe_f32, | ||
| 17 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::resize_linear_stripe_f32), | ||
| 18 | &kleidicv::sme::resize_linear_stripe_f32, nullptr); | ||
| 19 | |||
| 20 | extern "C" { | ||
| 21 | |||
| 22 | 380 | kleidicv_error_t kleidicv_resize_linear_u8(const uint8_t *src, | |
| 23 | size_t src_stride, size_t src_width, | ||
| 24 | size_t src_height, uint8_t *dst, | ||
| 25 | size_t dst_stride, size_t dst_width, | ||
| 26 | size_t dst_height) { | ||
| 27 |
4/4✓ Branch 0 taken 35 times.
✓ Branch 1 taken 345 times.
✓ Branch 2 taken 35 times.
✓ Branch 3 taken 345 times.
|
760 | if (!kleidicv::resize_linear_u8_is_implemented(src_width, src_height, |
| 28 | 380 | dst_width, dst_height)) { | |
| 29 | 35 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
| 30 | } | ||
| 31 | 690 | return kleidicv_resize_linear_stripe_u8(src, src_stride, src_width, | |
| 32 | 345 | src_height, 0, src_height, dst, | |
| 33 | 345 | dst_stride, dst_width, dst_height); | |
| 34 | 380 | } | |
| 35 | |||
| 36 | 480 | kleidicv_error_t kleidicv_resize_linear_f32(const float *src, size_t src_stride, | |
| 37 | size_t src_width, size_t src_height, | ||
| 38 | float *dst, size_t dst_stride, | ||
| 39 | size_t dst_width, | ||
| 40 | size_t dst_height) { | ||
| 41 |
4/4✓ Branch 0 taken 30 times.
✓ Branch 1 taken 450 times.
✓ Branch 2 taken 30 times.
✓ Branch 3 taken 450 times.
|
960 | if (!kleidicv::resize_linear_f32_is_implemented(src_width, src_height, |
| 42 | 480 | dst_width, dst_height)) { | |
| 43 | 30 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
| 44 | } | ||
| 45 | 900 | return kleidicv_resize_linear_stripe_f32(src, src_stride, src_width, | |
| 46 | 450 | src_height, 0, src_height, dst, | |
| 47 | 450 | dst_stride, dst_width, dst_height); | |
| 48 | 480 | } | |
| 49 | |||
| 50 | } // extern "C" | ||
| 51 |