| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // SPDX-FileCopyrightText: 2023 - 2026 Arm Limited and/or its affiliates <open-source-office@arm.com> | ||
| 2 | // | ||
| 3 | // SPDX-License-Identifier: Apache-2.0 | ||
| 4 | |||
| 5 | #include "morphology_sc.h" | ||
| 6 | |||
| 7 | namespace kleidicv::sve2 { | ||
| 8 | |||
| 9 | template <typename T> | ||
| 10 | 202 | KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t dilate( | |
| 11 | const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, | ||
| 12 | size_t height, size_t channels, size_t kernel_width, size_t kernel_height, | ||
| 13 | size_t anchor_x, size_t anchor_y, kleidicv_border_type_t border_type, | ||
| 14 | const uint8_t *border_value, size_t iterations) { | ||
| 15 | 202 | return dilate_sc<T, MorphologyWorkspace::CopyDataMemcpy<T> >( | |
| 16 | 202 | src, src_stride, dst, dst_stride, width, height, channels, kernel_width, | |
| 17 | 202 | kernel_height, anchor_x, anchor_y, border_type, border_value, iterations); | |
| 18 | } | ||
| 19 | |||
| 20 | template <typename T> | ||
| 21 | KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t | ||
| 22 | 186 | erode(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, | |
| 23 | size_t height, size_t channels, size_t kernel_width, size_t kernel_height, | ||
| 24 | size_t anchor_x, size_t anchor_y, kleidicv_border_type_t border_type, | ||
| 25 | const uint8_t *border_value, size_t iterations) { | ||
| 26 | 186 | return erode_sc<T, MorphologyWorkspace::CopyDataMemcpy<T> >( | |
| 27 | 186 | src, src_stride, dst, dst_stride, width, height, channels, kernel_width, | |
| 28 | 186 | kernel_height, anchor_x, anchor_y, border_type, border_value, iterations); | |
| 29 | } | ||
| 30 | |||
| 31 | #define KLEIDICV_INSTANTIATE_TEMPLATE(name, type) \ | ||
| 32 | template KLEIDICV_TARGET_FN_ATTRS kleidicv_error_t name<type>( \ | ||
| 33 | const type *src, size_t src_stride, type *dst, size_t dst_stride, \ | ||
| 34 | size_t width, size_t height, size_t channels, size_t kernel_width, \ | ||
| 35 | size_t kernel_height, size_t anchor_x, size_t anchor_y, \ | ||
| 36 | kleidicv_border_type_t border_type, const uint8_t *border_value, \ | ||
| 37 | size_t iterations) | ||
| 38 | |||
| 39 | KLEIDICV_INSTANTIATE_TEMPLATE(dilate, uint8_t); | ||
| 40 | KLEIDICV_INSTANTIATE_TEMPLATE(erode, uint8_t); | ||
| 41 | |||
| 42 | } // namespace kleidicv::sve2 | ||
| 43 |