Debian Codegraph @

src/f32-vscaleextexp/gen/f32-vscaleextexp-avx2-p5-u96.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/f32-vscaleextexp/avx2-p5.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2019 Google LLC
6 //
7 // This source code is licensed under the BSD-style license found in the
8 // LICENSE file in the root directory of this source tree.
9
10 #include <assert.h>
11
12 #include <immintrin.h>
13
14 #include "xnnpack/common.h"
15 #include "xnnpack/vscaleextexp.h"
16
17
18 void xnn_f32_vscaleextexp_ukernel__avx2_p5_u96(
19 size_t batch,
20 const float* input,
21 float* output,
22 float scale_value,
23 float scale_exp)
24 {
25 assert(batch != 0);
26 assert(batch % sizeof(float) == 0);
27 assert(input != NULL);
28 assert(output != NULL);
29
30 static const int32_t mask_table[14] = {-1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0};
31
32 const __m256 vlog2e = _mm256_set1_ps(0x1.715476p+0f);
33 const __m256 vminus_ln2_hi = _mm256_set1_ps(-0x1.62E43p-1f);
34 const __m256 vminus_ln2_lo = _mm256_set1_ps(0x1.05C61p-29f);
35
36 // The smallest batch such that 2**batch is considered non-negligible.
37 // For smaller batch, 2**batch is replaced with zero.
38 const __m256 vmin_exponent = _mm256_set1_ps(-127.0f);
39 const __m256 vmagic_bias = _mm256_set1_ps(0x1.8000FEp23f);
40
41 const __m256 vc0 = _mm256_set1_ps(1.0f);
42 const __m256 vc1 = _mm256_set1_ps(0x1.FFFFF6p-1f);
43 const __m256 vc2 = _mm256_set1_ps(0x1.FFFDC6p-2f);
44 const __m256 vc3 = _mm256_set1_ps(0x1.555A80p-3f);
45 const __m256 vc4 = _mm256_set1_ps(0x1.573A1Ap-5f);
46 const __m256 vc5 = _mm256_set1_ps(0x1.0F9F9Cp-7f);
47
48 const __m256 vscalev = _mm256_set1_ps(scale_value);
49 const __m256 vscalee = _mm256_set1_ps(scale_exp);
50
51 for (; batch >= 96 * sizeof(float); batch -= 96 * sizeof(float)) {
52 // Load 96 (12x8) inputs at a time.
53 const __m256 vx0 = _mm256_loadu_ps(input);
54 const __m256 vx1 = _mm256_loadu_ps(input + 8);
55 const __m256 vx2 = _mm256_loadu_ps(input + 16);
56 const __m256 vx3 = _mm256_loadu_ps(input + 24);
57 const __m256 vx4 = _mm256_loadu_ps(input + 32);
58 const __m256 vx5 = _mm256_loadu_ps(input + 40);
59 const __m256 vx6 = _mm256_loadu_ps(input + 48);
60 const __m256 vx7 = _mm256_loadu_ps(input + 56);
61 const __m256 vx8 = _mm256_loadu_ps(input + 64);
62 const __m256 vx9 = _mm256_loadu_ps(input + 72);
63 const __m256 vx10 = _mm256_loadu_ps(input + 80);
64 const __m256 vx11 = _mm256_loadu_ps(input + 88);
65 input += 96;
66
67 // Compute reduced argument batch := round(input / log(2)).
68 const __m256 vn0 = _mm256_round_ps(_mm256_mul_ps(vx0, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
69 const __m256 vn1 = _mm256_round_ps(_mm256_mul_ps(vx1, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
70 const __m256 vn2 = _mm256_round_ps(_mm256_mul_ps(vx2, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
71 const __m256 vn3 = _mm256_round_ps(_mm256_mul_ps(vx3, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
72 const __m256 vn4 = _mm256_round_ps(_mm256_mul_ps(vx4, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
73 const __m256 vn5 = _mm256_round_ps(_mm256_mul_ps(vx5, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
74 const __m256 vn6 = _mm256_round_ps(_mm256_mul_ps(vx6, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
75 const __m256 vn7 = _mm256_round_ps(_mm256_mul_ps(vx7, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
76 const __m256 vn8 = _mm256_round_ps(_mm256_mul_ps(vx8, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
77 const __m256 vn9 = _mm256_round_ps(_mm256_mul_ps(vx9, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
78 const __m256 vn10 = _mm256_round_ps(_mm256_mul_ps(vx10, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
79 const __m256 vn11 = _mm256_round_ps(_mm256_mul_ps(vx11, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
80
81 // Compute reduced argument t := input - batch * log(2).
82 // Use Cody-Waite range reduction method (note two constants to represent log(2)) to improve accuracy.
83 __m256 vt0 = _mm256_fmadd_ps(vn0, vminus_ln2_hi, vx0);
84 __m256 vt1 = _mm256_fmadd_ps(vn1, vminus_ln2_hi, vx1);
85 __m256 vt2 = _mm256_fmadd_ps(vn2, vminus_ln2_hi, vx2);
86 __m256 vt3 = _mm256_fmadd_ps(vn3, vminus_ln2_hi, vx3);
87 __m256 vt4 = _mm256_fmadd_ps(vn4, vminus_ln2_hi, vx4);
88 __m256 vt5 = _mm256_fmadd_ps(vn5, vminus_ln2_hi, vx5);
89 __m256 vt6 = _mm256_fmadd_ps(vn6, vminus_ln2_hi, vx6);
90 __m256 vt7 = _mm256_fmadd_ps(vn7, vminus_ln2_hi, vx7);
91 __m256 vt8 = _mm256_fmadd_ps(vn8, vminus_ln2_hi, vx8);
92 __m256 vt9 = _mm256_fmadd_ps(vn9, vminus_ln2_hi, vx9);
93 __m256 vt10 = _mm256_fmadd_ps(vn10, vminus_ln2_hi, vx10);
94 __m256 vt11 = _mm256_fmadd_ps(vn11, vminus_ln2_hi, vx11);
95
96 vt0 = _mm256_fmadd_ps(vn0, vminus_ln2_lo, vt0);
97 vt1 = _mm256_fmadd_ps(vn1, vminus_ln2_lo, vt1);
98 vt2 = _mm256_fmadd_ps(vn2, vminus_ln2_lo, vt2);
99 vt3 = _mm256_fmadd_ps(vn3, vminus_ln2_lo, vt3);
100 vt4 = _mm256_fmadd_ps(vn4, vminus_ln2_lo, vt4);
101 vt5 = _mm256_fmadd_ps(vn5, vminus_ln2_lo, vt5);
102 vt6 = _mm256_fmadd_ps(vn6, vminus_ln2_lo, vt6);
103 vt7 = _mm256_fmadd_ps(vn7, vminus_ln2_lo, vt7);
104 vt8 = _mm256_fmadd_ps(vn8, vminus_ln2_lo, vt8);
105 vt9 = _mm256_fmadd_ps(vn9, vminus_ln2_lo, vt9);
106 vt10 = _mm256_fmadd_ps(vn10, vminus_ln2_lo, vt10);
107 vt11 = _mm256_fmadd_ps(vn11, vminus_ln2_lo, vt11);
108
109 // Compute degree-5 polynomial approximation for exp(t) on [-log(2)/2, log(2)/2].
110 __m256 vp0 = _mm256_fmadd_ps(vc5, vt0, vc4);
111 __m256 vp1 = _mm256_fmadd_ps(vc5, vt1, vc4);
112 __m256 vp2 = _mm256_fmadd_ps(vc5, vt2, vc4);
113 __m256 vp3 = _mm256_fmadd_ps(vc5, vt3, vc4);
114 __m256 vp4 = _mm256_fmadd_ps(vc5, vt4, vc4);
115 __m256 vp5 = _mm256_fmadd_ps(vc5, vt5, vc4);
116 __m256 vp6 = _mm256_fmadd_ps(vc5, vt6, vc4);
117 __m256 vp7 = _mm256_fmadd_ps(vc5, vt7, vc4);
118 __m256 vp8 = _mm256_fmadd_ps(vc5, vt8, vc4);
119 __m256 vp9 = _mm256_fmadd_ps(vc5, vt9, vc4);
120 __m256 vp10 = _mm256_fmadd_ps(vc5, vt10, vc4);
121 __m256 vp11 = _mm256_fmadd_ps(vc5, vt11, vc4);
122
123 vp0 = _mm256_fmadd_ps(vp0, vt0, vc3);
124 vp1 = _mm256_fmadd_ps(vp1, vt1, vc3);
125 vp2 = _mm256_fmadd_ps(vp2, vt2, vc3);
126 vp3 = _mm256_fmadd_ps(vp3, vt3, vc3);
127 vp4 = _mm256_fmadd_ps(vp4, vt4, vc3);
128 vp5 = _mm256_fmadd_ps(vp5, vt5, vc3);
129 vp6 = _mm256_fmadd_ps(vp6, vt6, vc3);
130 vp7 = _mm256_fmadd_ps(vp7, vt7, vc3);
131 vp8 = _mm256_fmadd_ps(vp8, vt8, vc3);
132 vp9 = _mm256_fmadd_ps(vp9, vt9, vc3);
133 vp10 = _mm256_fmadd_ps(vp10, vt10, vc3);
134 vp11 = _mm256_fmadd_ps(vp11, vt11, vc3);
135
136 vp0 = _mm256_fmadd_ps(vp0, vt0, vc2);
137 vp1 = _mm256_fmadd_ps(vp1, vt1, vc2);
138 vp2 = _mm256_fmadd_ps(vp2, vt2, vc2);
139 vp3 = _mm256_fmadd_ps(vp3, vt3, vc2);
140 vp4 = _mm256_fmadd_ps(vp4, vt4, vc2);
141 vp5 = _mm256_fmadd_ps(vp5, vt5, vc2);
142 vp6 = _mm256_fmadd_ps(vp6, vt6, vc2);
143 vp7 = _mm256_fmadd_ps(vp7, vt7, vc2);
144 vp8 = _mm256_fmadd_ps(vp8, vt8, vc2);
145 vp9 = _mm256_fmadd_ps(vp9, vt9, vc2);
146 vp10 = _mm256_fmadd_ps(vp10, vt10, vc2);
147 vp11 = _mm256_fmadd_ps(vp11, vt11, vc2);
148
149 vp0 = _mm256_fmadd_ps(vp0, vt0, vc1);
150 vp1 = _mm256_fmadd_ps(vp1, vt1, vc1);
151 vp2 = _mm256_fmadd_ps(vp2, vt2, vc1);
152 vp3 = _mm256_fmadd_ps(vp3, vt3, vc1);
153 vp4 = _mm256_fmadd_ps(vp4, vt4, vc1);
154 vp5 = _mm256_fmadd_ps(vp5, vt5, vc1);
155 vp6 = _mm256_fmadd_ps(vp6, vt6, vc1);
156 vp7 = _mm256_fmadd_ps(vp7, vt7, vc1);
157 vp8 = _mm256_fmadd_ps(vp8, vt8, vc1);
158 vp9 = _mm256_fmadd_ps(vp9, vt9, vc1);
159 vp10 = _mm256_fmadd_ps(vp10, vt10, vc1);
160 vp11 = _mm256_fmadd_ps(vp11, vt11, vc1);
161
162 vp0 = _mm256_fmadd_ps(vp0, vt0, vc0);
163 vp1 = _mm256_fmadd_ps(vp1, vt1, vc0);
164 vp2 = _mm256_fmadd_ps(vp2, vt2, vc0);
165 vp3 = _mm256_fmadd_ps(vp3, vt3, vc0);
166 vp4 = _mm256_fmadd_ps(vp4, vt4, vc0);
167 vp5 = _mm256_fmadd_ps(vp5, vt5, vc0);
168 vp6 = _mm256_fmadd_ps(vp6, vt6, vc0);
169 vp7 = _mm256_fmadd_ps(vp7, vt7, vc0);
170 vp8 = _mm256_fmadd_ps(vp8, vt8, vc0);
171 vp9 = _mm256_fmadd_ps(vp9, vt9, vc0);
172 vp10 = _mm256_fmadd_ps(vp10, vt10, vc0);
173 vp11 = _mm256_fmadd_ps(vp11, vt11, vc0);
174
175 // Multiply "extended" floating-point numbers in ("mantissa", "exponent") representation where
176 // - vnX is "exponent"
177 // - vpX is "mantissa"
178 //
179 // exp2(ae) * av * exp2(be) * bv =
180 // = exp2(ae + be) * (av * bv)
181 __m256 vf0 = _mm256_mul_ps(vp0, vscalev);
182 __m256 vf1 = _mm256_mul_ps(vp1, vscalev);
183 __m256 vf2 = _mm256_mul_ps(vp2, vscalev);
184 __m256 vf3 = _mm256_mul_ps(vp3, vscalev);
185 __m256 vf4 = _mm256_mul_ps(vp4, vscalev);
186 __m256 vf5 = _mm256_mul_ps(vp5, vscalev);
187 __m256 vf6 = _mm256_mul_ps(vp6, vscalev);
188 __m256 vf7 = _mm256_mul_ps(vp7, vscalev);
189 __m256 vf8 = _mm256_mul_ps(vp8, vscalev);
190 __m256 vf9 = _mm256_mul_ps(vp9, vscalev);
191 __m256 vf10 = _mm256_mul_ps(vp10, vscalev);
192 __m256 vf11 = _mm256_mul_ps(vp11, vscalev);
193
194 __m256 ve0 = _mm256_add_ps(vn0, vscalee);
195 __m256 ve1 = _mm256_add_ps(vn1, vscalee);
196 __m256 ve2 = _mm256_add_ps(vn2, vscalee);
197 __m256 ve3 = _mm256_add_ps(vn3, vscalee);
198 __m256 ve4 = _mm256_add_ps(vn4, vscalee);
199 __m256 ve5 = _mm256_add_ps(vn5, vscalee);
200 __m256 ve6 = _mm256_add_ps(vn6, vscalee);
201 __m256 ve7 = _mm256_add_ps(vn7, vscalee);
202 __m256 ve8 = _mm256_add_ps(vn8, vscalee);
203 __m256 ve9 = _mm256_add_ps(vn9, vscalee);
204 __m256 ve10 = _mm256_add_ps(vn10, vscalee);
205 __m256 ve11 = _mm256_add_ps(vn11, vscalee);
206
207 // For computational efficiency, replace exp2(e) with 0.0f when e <= -127.0.
208 // This replacement is done in two steps:
209 // 1. Clamp minimum e at -127.0.
210 // 2. Map e to scale factor 0.0 when e == -127.0
211 ve0 = _mm256_max_ps(ve0, vmin_exponent);
212 ve1 = _mm256_max_ps(ve1, vmin_exponent);
213 ve2 = _mm256_max_ps(ve2, vmin_exponent);
214 ve3 = _mm256_max_ps(ve3, vmin_exponent);
215 ve4 = _mm256_max_ps(ve4, vmin_exponent);
216 ve5 = _mm256_max_ps(ve5, vmin_exponent);
217 ve6 = _mm256_max_ps(ve6, vmin_exponent);
218 ve7 = _mm256_max_ps(ve7, vmin_exponent);
219 ve8 = _mm256_max_ps(ve8, vmin_exponent);
220 ve9 = _mm256_max_ps(ve9, vmin_exponent);
221 ve10 = _mm256_max_ps(ve10, vmin_exponent);
222 ve11 = _mm256_max_ps(ve11, vmin_exponent);
223
224 // Convert exponents into scale factors:
225 // - s = exp2(e) when e > -127.0
226 // - s = 0.0 when e <= -127.0
227 const __m256 vs0 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve0, vmagic_bias)), 23));
228 const __m256 vs1 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve1, vmagic_bias)), 23));
229 const __m256 vs2 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve2, vmagic_bias)), 23));
230 const __m256 vs3 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve3, vmagic_bias)), 23));
231 const __m256 vs4 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve4, vmagic_bias)), 23));
232 const __m256 vs5 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve5, vmagic_bias)), 23));
233 const __m256 vs6 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve6, vmagic_bias)), 23));
234 const __m256 vs7 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve7, vmagic_bias)), 23));
235 const __m256 vs8 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve8, vmagic_bias)), 23));
236 const __m256 vs9 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve9, vmagic_bias)), 23));
237 const __m256 vs10 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve10, vmagic_bias)), 23));
238 const __m256 vs11 = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve11, vmagic_bias)), 23));
239
240 // Multiply "mantissa" by the scale factor.
241 vf0 = _mm256_mul_ps(vf0, vs0);
242 vf1 = _mm256_mul_ps(vf1, vs1);
243 vf2 = _mm256_mul_ps(vf2, vs2);
244 vf3 = _mm256_mul_ps(vf3, vs3);
245 vf4 = _mm256_mul_ps(vf4, vs4);
246 vf5 = _mm256_mul_ps(vf5, vs5);
247 vf6 = _mm256_mul_ps(vf6, vs6);
248 vf7 = _mm256_mul_ps(vf7, vs7);
249 vf8 = _mm256_mul_ps(vf8, vs8);
250 vf9 = _mm256_mul_ps(vf9, vs9);
251 vf10 = _mm256_mul_ps(vf10, vs10);
252 vf11 = _mm256_mul_ps(vf11, vs11);
253
254 // Store 96 (12x8) outputs at a time.
255 _mm256_storeu_ps(output, vf0);
256 _mm256_storeu_ps(output + 8, vf1);
257 _mm256_storeu_ps(output + 16, vf2);
258 _mm256_storeu_ps(output + 24, vf3);
259 _mm256_storeu_ps(output + 32, vf4);
260 _mm256_storeu_ps(output + 40, vf5);
261 _mm256_storeu_ps(output + 48, vf6);
262 _mm256_storeu_ps(output + 56, vf7);
263 _mm256_storeu_ps(output + 64, vf8);
264 _mm256_storeu_ps(output + 72, vf9);
265 _mm256_storeu_ps(output + 80, vf10);
266 _mm256_storeu_ps(output + 88, vf11);
267 output += 96;
268 }
269
270 for (; batch >= 8 * sizeof(float); batch -= 8 * sizeof(float)) {
271 // Load 8 inputs at a time.
272 const __m256 vx = _mm256_loadu_ps(input);
273 input += 8;
274
275 // Compute reduced argument batch := round(input / log(2)).
276 const __m256 vn = _mm256_round_ps(_mm256_mul_ps(vx, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
277
278 // Compute reduced argument t := input - batch * log(2).
279 // Use Cody-Waite range reduction method (note two constants to represent log(2)) to improve accuracy.
280 __m256 vt = _mm256_fmadd_ps(vn, vminus_ln2_hi, vx);
281 vt = _mm256_fmadd_ps(vn, vminus_ln2_lo, vt);
282
283 // Compute degree-5 polynomial approximation for exp(t) on [-log(2)/2, log(2)/2].
284 __m256 vp = _mm256_fmadd_ps(vc5, vt, vc4);
285 vp = _mm256_fmadd_ps(vp, vt, vc3);
286 vp = _mm256_fmadd_ps(vp, vt, vc2);
287 vp = _mm256_fmadd_ps(vp, vt, vc1);
288 vp = _mm256_fmadd_ps(vp, vt, vc0);
289
290 // Multiply "extended" floating-point numbers in ("mantissa", "exponent") representation.
291 __m256 vf = _mm256_mul_ps(vp, vscalev);
292 __m256 ve = _mm256_add_ps(vn, vscalee);
293
294 // For computational efficiency, replace exp2(e) with 0.0f when e <= -127.0.
295 ve = _mm256_max_ps(ve, vmin_exponent);
296
297 // Convert exponents into scale factors.
298 const __m256 vs = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve, vmagic_bias)), 23));
299
300 // Multiply "mantissa" by the scale factor.
301 vf = _mm256_mul_ps(vf, vs);
302
303 // Store 8 results at a time.
304 _mm256_storeu_ps(output, vf);
305 output += 8;
306 }
307 if XNN_UNLIKELY(batch != 0) {
308 assert(batch >= 1 * sizeof(float));
309 assert(batch <= 7 * sizeof(float));
310 const __m256i vmask = _mm256_loadu_si256((const __m256i*) ((uintptr_t) &mask_table[7] - batch));
311
312 // Load up to 7 inputs at a time.
313 const __m256 vx = _mm256_maskload_ps(input, vmask);
314
315 // Compute reduced argument batch := round(input / log(2)).
316 const __m256 vn = _mm256_round_ps(_mm256_mul_ps(vx, vlog2e), _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
317
318 // Compute reduced argument t := input - batch * log(2).
319 // Use Cody-Waite range reduction method (note two constants to represent log(2)) to improve accuracy.
320 __m256 vt = _mm256_fmadd_ps(vn, vminus_ln2_hi, vx);
321 vt = _mm256_fmadd_ps(vn, vminus_ln2_lo, vt);
322
323 // Compute degree-5 polynomial approximation for exp(t) on [-log(2)/2, log(2)/2].
324 __m256 vp = _mm256_fmadd_ps(vc5, vt, vc4);
325 vp = _mm256_fmadd_ps(vp, vt, vc3);
326 vp = _mm256_fmadd_ps(vp, vt, vc2);
327 vp = _mm256_fmadd_ps(vp, vt, vc1);
328 vp = _mm256_fmadd_ps(vp, vt, vc0);
329
330 // Multiply "extended" floating-point numbers in ("mantissa", "exponent") representation.
331 __m256 vf = _mm256_mul_ps(vp, vscalev);
332 __m256 ve = _mm256_add_ps(vn, vscalee);
333
334 // For computational efficiency, replace exp2(e) with 0.0f when e <= -127.0.
335 ve = _mm256_max_ps(ve, vmin_exponent);
336
337 // Convert exponents into scale factors.
338 const __m256 vs = _mm256_castsi256_ps(_mm256_slli_epi32(_mm256_castps_si256(_mm256_add_ps(ve, vmagic_bias)), 23));
339
340 // Multiply "mantissa" by the scale factor.
341 vf = _mm256_mul_ps(vf, vs);
342
343 // Store up to 7 inputs at a time.
344 _mm256_maskstore_ps(output, vmask, vf);
345 }
346 }