Debian Codegraph @

third-party/simde/arm/neon/mls_n.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 * 2020 Evan Nemerson <[email protected]>
25 */
26
27 #if !defined(SIMDE_ARM_NEON_MLS_N_H)
28 #define SIMDE_ARM_NEON_MLS_N_H
29
30 #include "sub.h"
31 #include "dup_n.h"
32 #include "mls.h"
33
34 HEDLEY_DIAGNOSTIC_PUSH
35 SIMDE_DISABLE_UNWANTED_DIAGNOSTICS
36 SIMDE_BEGIN_DECLS_
37
38 SIMDE_FUNCTION_ATTRIBUTES
39 simde_float32x2_t
40 simde_vmls_n_f32(simde_float32x2_t a, simde_float32x2_t b, simde_float32 c) {
41 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
42 return vmls_n_f32(a, b, c);
43 #else
44 return simde_vmls_f32(a, b, simde_vdup_n_f32(c));
45 #endif
46 }
47 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
48 #undef vmls_n_f32
49 #define vmls_n_f32(a, b, c) simde_vmls_n_f32((a), (b), (c))
50 #endif
51
52 SIMDE_FUNCTION_ATTRIBUTES
53 simde_int16x4_t
54 simde_vmls_n_s16(simde_int16x4_t a, simde_int16x4_t b, int16_t c) {
55 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
56 return vmls_n_s16(a, b, c);
57 #else
58 return simde_vmls_s16(a, b, simde_vdup_n_s16(c));
59 #endif
60 }
61 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
62 #undef vmls_n_s16
63 #define vmls_n_s16(a, b, c) simde_vmls_n_s16((a), (b), (c))
64 #endif
65
66 SIMDE_FUNCTION_ATTRIBUTES
67 simde_int32x2_t
68 simde_vmls_n_s32(simde_int32x2_t a, simde_int32x2_t b, int32_t c) {
69 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
70 return vmls_n_s32(a, b, c);
71 #else
72 return simde_vmls_s32(a, b, simde_vdup_n_s32(c));
73 #endif
74 }
75 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
76 #undef vmls_n_s32
77 #define vmls_n_s32(a, b, c) simde_vmls_n_s32((a), (b), (c))
78 #endif
79
80 SIMDE_FUNCTION_ATTRIBUTES
81 simde_uint16x4_t
82 simde_vmls_n_u16(simde_uint16x4_t a, simde_uint16x4_t b, uint16_t c) {
83 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
84 return vmls_n_u16(a, b, c);
85 #else
86 return simde_vmls_u16(a, b, simde_vdup_n_u16(c));
87 #endif
88 }
89 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
90 #undef vmls_n_u16
91 #define vmls_n_u16(a, b, c) simde_vmls_n_u16((a), (b), (c))
92 #endif
93
94 SIMDE_FUNCTION_ATTRIBUTES
95 simde_uint32x2_t
96 simde_vmls_n_u32(simde_uint32x2_t a, simde_uint32x2_t b, uint32_t c) {
97 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
98 return vmls_n_u32(a, b, c);
99 #else
100 return simde_vmls_u32(a, b, simde_vdup_n_u32(c));
101 #endif
102 }
103 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
104 #undef vmls_n_u32
105 #define vmls_n_u32(a, b, c) simde_vmls_n_u32((a), (b), (c))
106 #endif
107
108 SIMDE_FUNCTION_ATTRIBUTES
109 simde_float32x4_t
110 simde_vmlsq_n_f32(simde_float32x4_t a, simde_float32x4_t b, simde_float32 c) {
111 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
112 return vmlsq_n_f32(a, b, c);
113 #else
114 return simde_vmlsq_f32(a, b, simde_vdupq_n_f32(c));
115 #endif
116 }
117 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
118 #undef vmlsq_n_f32
119 #define vmlsq_n_f32(a, b, c) simde_vmlsq_n_f32((a), (b), (c))
120 #endif
121
122 SIMDE_FUNCTION_ATTRIBUTES
123 simde_int16x8_t
124 simde_vmlsq_n_s16(simde_int16x8_t a, simde_int16x8_t b, int16_t c) {
125 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
126 return vmlsq_n_s16(a, b, c);
127 #else
128 return simde_vmlsq_s16(a, b, simde_vdupq_n_s16(c));
129 #endif
130 }
131 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
132 #undef vmlsq_n_s16
133 #define vmlsq_n_s16(a, b, c) simde_vmlsq_n_s16((a), (b), (c))
134 #endif
135
136 SIMDE_FUNCTION_ATTRIBUTES
137 simde_int32x4_t
138 simde_vmlsq_n_s32(simde_int32x4_t a, simde_int32x4_t b, int32_t c) {
139 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
140 return vmlsq_n_s32(a, b, c);
141 #else
142 return simde_vmlsq_s32(a, b, simde_vdupq_n_s32(c));
143 #endif
144 }
145 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
146 #undef vmlsq_n_s32
147 #define vmlsq_n_s32(a, b, c) simde_vmlsq_n_s32((a), (b), (c))
148 #endif
149
150 SIMDE_FUNCTION_ATTRIBUTES
151 simde_uint16x8_t
152 simde_vmlsq_n_u16(simde_uint16x8_t a, simde_uint16x8_t b, uint16_t c) {
153 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
154 return vmlsq_n_u16(a, b, c);
155 #else
156 return simde_vmlsq_u16(a, b, simde_vdupq_n_u16(c));
157 #endif
158 }
159 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
160 #undef vmlsq_n_u16
161 #define vmlsq_n_u16(a, b, c) simde_vmlsq_n_u16((a), (b), (c))
162 #endif
163
164 SIMDE_FUNCTION_ATTRIBUTES
165 simde_uint32x4_t
166 simde_vmlsq_n_u32(simde_uint32x4_t a, simde_uint32x4_t b, uint32_t c) {
167 #if defined(SIMDE_ARM_NEON_A32V7_NATIVE)
168 return vmlsq_n_u32(a, b, c);
169 #else
170 return simde_vmlsq_u32(a, b, simde_vdupq_n_u32(c));
171 #endif
172 }
173 #if defined(SIMDE_ARM_NEON_A32V7_ENABLE_NATIVE_ALIASES)
174 #undef vmlsq_n_u32
175 #define vmlsq_n_u32(a, b, c) simde_vmlsq_n_u32((a), (b), (c))
176 #endif
177
178 SIMDE_END_DECLS_
179 HEDLEY_DIAGNOSTIC_POP
180
181 #endif /* !defined(SIMDE_ARM_NEON_MLS_N_H) */