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/filters/scharr.h" | ||
7 | #include "kleidicv/kleidicv.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_scharr_interleaved_stripe_s16_u8, | ||
11 | &kleidicv::neon::kleidicv_scharr_interleaved_stripe_s16_u8, | ||
12 | KLEIDICV_SVE2_IMPL_IF( | ||
13 | &kleidicv::sve2::kleidicv_scharr_interleaved_stripe_s16_u8), | ||
14 | &kleidicv::sme::kleidicv_scharr_interleaved_stripe_s16_u8, nullptr); | ||
15 | |||
16 | extern "C" { | ||
17 | |||
18 | 120 | kleidicv_error_t kleidicv_scharr_interleaved_s16_u8( | |
19 | const uint8_t *src, size_t src_stride, size_t src_width, size_t src_height, | ||
20 | size_t src_channels, int16_t *dst, size_t dst_stride) { | ||
21 |
4/4✓ Branch 0 taken 9 times.
✓ Branch 1 taken 111 times.
✓ Branch 2 taken 9 times.
✓ Branch 3 taken 111 times.
|
240 | if (!kleidicv::scharr_interleaved_is_implemented(src_width, src_height, |
22 | 120 | src_channels)) { | |
23 | 9 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
24 | } | ||
25 | |||
26 | // height is decremented by 2 as the result has less rows. | ||
27 | 222 | return kleidicv_scharr_interleaved_stripe_s16_u8( | |
28 | 111 | src, src_stride, src_width, src_height, src_channels, dst, dst_stride, 0, | |
29 | 111 | src_height - 2); | |
30 | 120 | } | |
31 | |||
32 | } // extern "C" | ||
33 |