KleidiCV Coverage Report


Directory: ./
File: kleidicv/src/resize/resize_linear_api.cpp
Date: 2025-09-25 14:13:34
Exec Total Coverage
Lines: 18 18 100.0%
Functions: 4 4 100.0%
Branches: 16 16 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/dispatch.h"
6 #include "kleidicv/kleidicv.h"
7 #include "kleidicv/resize/resize_linear.h"
8
9
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(
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 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
8 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 304 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 28 times.
✓ Branch 1 taken 276 times.
✓ Branch 2 taken 28 times.
✓ Branch 3 taken 276 times.
608 if (!kleidicv::resize_linear_u8_is_implemented(src_width, src_height,
28 304 dst_width, dst_height)) {
29 28 return KLEIDICV_ERROR_NOT_IMPLEMENTED;
30 }
31 552 return kleidicv_resize_linear_stripe_u8(src, src_stride, src_width,
32 276 src_height, 0, src_height, dst,
33 276 dst_stride, dst_width, dst_height);
34 304 }
35
36 384 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 24 times.
✓ Branch 1 taken 360 times.
✓ Branch 2 taken 24 times.
✓ Branch 3 taken 360 times.
768 if (!kleidicv::resize_linear_f32_is_implemented(src_width, src_height,
42 384 dst_width, dst_height)) {
43 24 return KLEIDICV_ERROR_NOT_IMPLEMENTED;
44 }
45 720 return kleidicv_resize_linear_stripe_f32(src, src_stride, src_width,
46 360 src_height, 0, src_height, dst,
47 360 dst_stride, dst_width, dst_height);
48 384 }
49
50 } // extern "C"
51