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/filters/separable_filter_2d.h" |
6 |
|
|
#include "separable_filter_2d_sc.h" |
7 |
|
|
|
8 |
|
|
namespace kleidicv::sme { |
9 |
|
|
|
10 |
|
|
template <typename T> |
11 |
|
|
KLEIDICV_LOCALLY_STREAMING KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t |
12 |
|
200 |
separable_filter_2d_stripe(const T *src, size_t src_stride, T *dst, |
13 |
|
|
size_t dst_stride, size_t width, size_t height, |
14 |
|
|
size_t y_begin, size_t y_end, size_t channels, |
15 |
|
|
const T *kernel_x, size_t kernel_width, |
16 |
|
|
const T *kernel_y, size_t kernel_height, |
17 |
|
|
FixedBorderType border_type, |
18 |
|
|
kleidicv_filter_context_t *context) { |
19 |
|
200 |
return separable_filter_2d_stripe_sc<T>( |
20 |
|
200 |
src, src_stride, dst, dst_stride, width, height, y_begin, y_end, channels, |
21 |
|
200 |
kernel_x, kernel_width, kernel_y, kernel_height, border_type, context); |
22 |
|
|
} |
23 |
|
|
|
24 |
|
|
#define KLEIDICV_INSTANTIATE_TEMPLATE(type) \ |
25 |
|
|
template KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t \ |
26 |
|
|
separable_filter_2d_stripe<type>( \ |
27 |
|
|
const type *src, size_t src_stride, type *dst, size_t dst_stride, \ |
28 |
|
|
size_t width, size_t height, size_t y_begin, size_t y_end, \ |
29 |
|
|
size_t channels, const type *kernel_x, size_t kernel_width, \ |
30 |
|
|
const type *kernel_y, size_t kernel_height, FixedBorderType border_type, \ |
31 |
|
|
kleidicv_filter_context_t *context) |
32 |
|
|
|
33 |
|
|
KLEIDICV_INSTANTIATE_TEMPLATE(uint8_t); |
34 |
|
|
KLEIDICV_INSTANTIATE_TEMPLATE(uint16_t); |
35 |
|
|
KLEIDICV_INSTANTIATE_TEMPLATE(int16_t); |
36 |
|
|
|
37 |
|
|
} // namespace kleidicv::sme |
38 |
|
|
|