| 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 2 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
10 | 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 | 160 | 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 12 times.
✓ Branch 1 taken 148 times.
✓ Branch 2 taken 12 times.
✓ Branch 3 taken 148 times.
|
320 | if (!kleidicv::scharr_interleaved_is_implemented(src_width, src_height, |
| 22 | 160 | src_channels)) { | |
| 23 | 12 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
| 24 | } | ||
| 25 | |||
| 26 | // height is decremented by 2 as the result has less rows. | ||
| 27 | 296 | return kleidicv_scharr_interleaved_stripe_s16_u8( | |
| 28 | 148 | src, src_stride, src_width, src_height, src_channels, dst, dst_stride, 0, | |
| 29 | 148 | src_height - 2); | |
| 30 | 160 | } | |
| 31 | |||
| 32 | } // extern "C" | ||
| 33 |