Debian Codegraph @

third-party/simde/arm/neon/mull_lane.h

raw
1 /* SPDX-License-Identifier: MIT
2 *
3 * Permission is hereby granted, free of charge, to any person
4 * obtaining a copy of this software and associated documentation
5 * files (the "Software"), to deal in the Software without
6 * restriction, including without limitation the rights to use, copy,
7 * modify, merge, publish, distribute, sublicense, and/or sell copies
8 * of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be
12 * included in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
18 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
19 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 * SOFTWARE.
22 *
23 * Copyright:
24 * 2021 Evan Nemerson <[email protected]>
25 */
26
27 #if !defined(SIMDE_ARM_NEON_MULL_LANE_H)
28 #define SIMDE_ARM_NEON_MULL_LANE_H
29
30 #include "mull.h"
31 #include "dup_lane.h"
32
33 HEDLEY_DIAGNOSTIC_PUSH
34 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
35 SIMDE_BEGIN_DECLS_
36
37 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
38 #define simde_vmull_lane_s16(a, v, lane) vmull_lane_s16((a), (v), (lane))
39 #else
40 #define simde_vmull_lane_s16(a, v, lane) simde_vmull_s16((a), simde_vdup_lane_s16((v), (lane)))
41 #endif
42 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
43 #undef vmull_lane_s16
44 #define vmull_lane_s16(a, v, lane) simde_vmull_lane_s16((a), (v), (lane))
45 #endif
46
47 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
48 #define simde_vmull_lane_s32(a, v, lane) vmull_lane_s32((a), (v), (lane))
49 #else
50 #define simde_vmull_lane_s32(a, v, lane) simde_vmull_s32((a), simde_vdup_lane_s32((v), (lane)))
51 #endif
52 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
53 #undef vmull_lane_s32
54 #define vmull_lane_s32(a, v, lane) simde_vmull_lane_s32((a), (v), (lane))
55 #endif
56
57 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
58 #define simde_vmull_lane_u16(a, v, lane) vmull_lane_u16((a), (v), (lane))
59 #else
60 #define simde_vmull_lane_u16(a, v, lane) simde_vmull_u16((a), simde_vdup_lane_u16((v), (lane)))
61 #endif
62 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
63 #undef vmull_lane_u16
64 #define vmull_lane_u16(a, v, lane) simde_vmull_lane_u16((a), (v), (lane))
65 #endif
66
67 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
68 #define simde_vmull_lane_u32(a, v, lane) vmull_lane_u32((a), (v), (lane))
69 #else
70 #define simde_vmull_lane_u32(a, v, lane) simde_vmull_u32((a), simde_vdup_lane_u32((v), (lane)))
71 #endif
72 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
73 #undef vmull_lane_u32
74 #define vmull_lane_u32(a, v, lane) simde_vmull_lane_u32((a), (v), (lane))
75 #endif
76
77 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
78 #define simde_vmull_laneq_s16(a, v, lane) vmull_laneq_s16((a), (v), (lane))
79 #else
80 #define simde_vmull_laneq_s16(a, v, lane) simde_vmull_s16((a), simde_vdup_laneq_s16((v), (lane)))
81 #endif
82 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
83 #undef vmull_laneq_s16
84 #define vmull_laneq_s16(a, v, lane) simde_vmull_laneq_s16((a), (v), (lane))
85 #endif
86
87 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
88 #define simde_vmull_laneq_s32(a, v, lane) vmull_laneq_s32((a), (v), (lane))
89 #else
90 #define simde_vmull_laneq_s32(a, v, lane) simde_vmull_s32((a), simde_vdup_laneq_s32((v), (lane)))
91 #endif
92 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
93 #undef vmull_laneq_s32
94 #define vmull_laneq_s32(a, v, lane) simde_vmull_laneq_s32((a), (v), (lane))
95 #endif
96
97 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
98 #define simde_vmull_laneq_u16(a, v, lane) vmull_laneq_u16((a), (v), (lane))
99 #else
100 #define simde_vmull_laneq_u16(a, v, lane) simde_vmull_u16((a), simde_vdup_laneq_u16((v), (lane)))
101 #endif
102 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
103 #undef vmull_laneq_u16
104 #define vmull_laneq_u16(a, v, lane) simde_vmull_laneq_u16((a), (v), (lane))
105 #endif
106
107 #if defined(SIMDE_ARM_NEON_A64V8_NATIVE)
108 #define simde_vmull_laneq_u32(a, v, lane) vmull_laneq_u32((a), (v), (lane))
109 #else
110 #define simde_vmull_laneq_u32(a, v, lane) simde_vmull_u32((a), simde_vdup_laneq_u32((v), (lane)))
111 #endif
112 #if defined(SIMDE_ARM_NEON_A64V8_ENABLE_NATIVE_ALIASES)
113 #undef vmull_laneq_u32
114 #define vmull_laneq_u32(a, v, lane) simde_vmull_laneq_u32((a), (v), (lane))
115 #endif
116
117 SIMDE_END_DECLS_
118 HEDLEY_DIAGNOSTIC_POP
119
120 #endif /* !defined(SIMDE_ARM_NEON_MULL_LANE_H) */