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/kleidicv.h" | ||
7 | #include "kleidicv/types.h" | ||
8 | |||
9 | namespace kleidicv { | ||
10 | |||
11 | namespace neon { | ||
12 | |||
13 | template <typename T> | ||
14 | kleidicv_error_t saturating_multiply(const T *src_a, size_t src_a_stride, | ||
15 | const T *src_b, size_t src_b_stride, | ||
16 | T *dst, size_t dst_stride, size_t width, | ||
17 | size_t height, double scale); | ||
18 | |||
19 | } // namespace neon | ||
20 | |||
21 | namespace sve2 { | ||
22 | |||
23 | template <typename T> | ||
24 | kleidicv_error_t saturating_multiply(const T *src_a, size_t src_a_stride, | ||
25 | const T *src_b, size_t src_b_stride, | ||
26 | T *dst, size_t dst_stride, size_t width, | ||
27 | size_t height, double scale); | ||
28 | |||
29 | } // namespace sve2 | ||
30 | |||
31 | // namespace sme { | ||
32 | |||
33 | // template <typename T> | ||
34 | // kleidicv_error_t saturating_multiply(const T *src_a, size_t src_a_stride, | ||
35 | // const T *src_b, | ||
36 | // size_t src_b_stride, T *dst, size_t dst_stride, | ||
37 | // size_t width, size_t height, double scale); | ||
38 | |||
39 | // } // namespace sme | ||
40 | |||
41 | } // namespace kleidicv | ||
42 | |||
43 | #define KLEIDICV_DEFINE_C_API(name, type) \ | ||
44 | KLEIDICV_MULTIVERSION_C_API( \ | ||
45 | name, &kleidicv::neon::saturating_multiply<type>, \ | ||
46 | KLEIDICV_SVE2_IMPL_IF(&kleidicv::sve2::saturating_multiply<type>), \ | ||
47 | nullptr, nullptr) | ||
48 | |||
49 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_saturating_multiply_u8, uint8_t); |
50 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_saturating_multiply_s8, int8_t); |
51 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_saturating_multiply_u16, uint16_t); |
52 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_saturating_multiply_s16, int16_t); |
53 |
2/2✓ Branch 0 taken 3 times.
✓ Branch 1 taken 1 times.
|
8 | KLEIDICV_DEFINE_C_API(kleidicv_saturating_multiply_s32, int32_t); |
54 |