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/filters/sobel.h" | ||
7 | #include "kleidicv/kleidicv.h" | ||
8 | |||
9 | #define KLEIDICV_DEFINE_C_API(name, partialname) \ | ||
10 | KLEIDICV_MULTIVERSION_C_API( \ | ||
11 | name, &kleidicv::neon::partialname, \ | ||
12 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::partialname), \ | ||
13 | &kleidicv::sme::partialname, nullptr) | ||
14 | |||
15 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_sobel_3x3_horizontal_stripe_s16_u8, |
16 | sobel_3x3_horizontal_stripe_s16_u8); | ||
17 |
4/4✓ Branch 0 taken 1 times.
✓ Branch 1 taken 3 times.
✓ Branch 2 taken 2 times.
✓ Branch 3 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_sobel_3x3_vertical_stripe_s16_u8, |
18 | sobel_3x3_vertical_stripe_s16_u8); | ||
19 | |||
20 | extern "C" { | ||
21 | |||
22 | 231 | kleidicv_error_t kleidicv_sobel_3x3_horizontal_s16_u8( | |
23 | const uint8_t *src, size_t src_stride, int16_t *dst, size_t dst_stride, | ||
24 | size_t width, size_t height, size_t channels) { | ||
25 |
2/2✓ Branch 0 taken 81 times.
✓ Branch 1 taken 150 times.
|
231 | if (!kleidicv::sobel_is_implemented(width, height, 3)) { |
26 | 81 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
27 | } | ||
28 | 300 | return kleidicv_sobel_3x3_horizontal_stripe_s16_u8( | |
29 | 150 | src, src_stride, dst, dst_stride, width, height, 0, height, channels); | |
30 | 231 | } | |
31 | 231 | kleidicv_error_t kleidicv_sobel_3x3_vertical_s16_u8( | |
32 | const uint8_t *src, size_t src_stride, int16_t *dst, size_t dst_stride, | ||
33 | size_t width, size_t height, size_t channels) { | ||
34 |
2/2✓ Branch 0 taken 81 times.
✓ Branch 1 taken 150 times.
|
231 | if (!kleidicv::sobel_is_implemented(width, height, 3)) { |
35 | 81 | return KLEIDICV_ERROR_NOT_IMPLEMENTED; | |
36 | } | ||
37 | 300 | return kleidicv_sobel_3x3_vertical_stripe_s16_u8( | |
38 | 150 | src, src_stride, dst, dst_stride, width, height, 0, height, channels); | |
39 | 231 | } | |
40 | |||
41 | } // extern "C" | ||
42 |