1 // Auto-generated file. Do not edit!
2 // Template: src/f32-dwconv/up-avx512.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/dwconv.h>
15 #include <xnnpack/intrinsics-polyfill.h>
16
17
xnn_f32_dwconv_minmax_ukernel_up16x25__avx512f(size_t channels,size_t output_width,const float ** input,const float * weights,float * output,size_t input_stride,size_t output_increment,size_t input_offset,const float * zero,const union xnn_f32_minmax_params params[restrict XNN_MIN_ELEMENTS (1)])18 void xnn_f32_dwconv_minmax_ukernel_up16x25__avx512f(
19 size_t channels,
20 size_t output_width,
21 const float** input,
22 const float* weights,
23 float* output,
24 size_t input_stride,
25 size_t output_increment,
26 size_t input_offset,
27 const float* zero,
28 const union xnn_f32_minmax_params params[restrict XNN_MIN_ELEMENTS(1)])
29 {
30 assert(channels != 0);
31 assert(output_width != 0);
32
33 const __m512 vmax = _mm512_broadcast_f32x4(_mm_load_ps(params->sse.max));
34 const __m512 vmin = _mm512_broadcast_f32x4(_mm_load_ps(params->sse.min));
35 do {
36 const float* i0 = input[0];
37 assert(i0 != NULL);
38 if XNN_UNPREDICTABLE(i0 != zero) {
39 i0 = (const float*) ((uintptr_t) i0 + input_offset);
40 }
41 const float* i1 = input[1];
42 assert(i1 != NULL);
43 if XNN_UNPREDICTABLE(i1 != zero) {
44 i1 = (const float*) ((uintptr_t) i1 + input_offset);
45 }
46 const float* i2 = input[2];
47 assert(i2 != NULL);
48 if XNN_UNPREDICTABLE(i2 != zero) {
49 i2 = (const float*) ((uintptr_t) i2 + input_offset);
50 }
51 const float* i3 = input[3];
52 assert(i3 != NULL);
53 if XNN_UNPREDICTABLE(i3 != zero) {
54 i3 = (const float*) ((uintptr_t) i3 + input_offset);
55 }
56 const float* i4 = input[4];
57 assert(i4 != NULL);
58 if XNN_UNPREDICTABLE(i4 != zero) {
59 i4 = (const float*) ((uintptr_t) i4 + input_offset);
60 }
61 const float* i5 = input[5];
62 assert(i5 != NULL);
63 if XNN_UNPREDICTABLE(i5 != zero) {
64 i5 = (const float*) ((uintptr_t) i5 + input_offset);
65 }
66 const float* i6 = input[6];
67 assert(i6 != NULL);
68 if XNN_UNPREDICTABLE(i6 != zero) {
69 i6 = (const float*) ((uintptr_t) i6 + input_offset);
70 }
71 const float* i7 = input[7];
72 assert(i7 != NULL);
73 if XNN_UNPREDICTABLE(i7 != zero) {
74 i7 = (const float*) ((uintptr_t) i7 + input_offset);
75 }
76 const float* i8 = input[8];
77 assert(i8 != NULL);
78 if XNN_UNPREDICTABLE(i8 != zero) {
79 i8 = (const float*) ((uintptr_t) i8 + input_offset);
80 }
81 const float* i9 = input[9];
82 assert(i9 != NULL);
83 if XNN_UNPREDICTABLE(i9 != zero) {
84 i9 = (const float*) ((uintptr_t) i9 + input_offset);
85 }
86 const float* i10 = input[10];
87 assert(i10 != NULL);
88 if XNN_UNPREDICTABLE(i10 != zero) {
89 i10 = (const float*) ((uintptr_t) i10 + input_offset);
90 }
91 const float* i11 = input[11];
92 assert(i11 != NULL);
93 if XNN_UNPREDICTABLE(i11 != zero) {
94 i11 = (const float*) ((uintptr_t) i11 + input_offset);
95 }
96 const float* i12 = input[12];
97 assert(i12 != NULL);
98 if XNN_UNPREDICTABLE(i12 != zero) {
99 i12 = (const float*) ((uintptr_t) i12 + input_offset);
100 }
101 const float* i13 = input[13];
102 assert(i13 != NULL);
103 if XNN_UNPREDICTABLE(i13 != zero) {
104 i13 = (const float*) ((uintptr_t) i13 + input_offset);
105 }
106 const float* i14 = input[14];
107 assert(i14 != NULL);
108 if XNN_UNPREDICTABLE(i14 != zero) {
109 i14 = (const float*) ((uintptr_t) i14 + input_offset);
110 }
111 const float* i15 = input[15];
112 assert(i15 != NULL);
113 if XNN_UNPREDICTABLE(i15 != zero) {
114 i15 = (const float*) ((uintptr_t) i15 + input_offset);
115 }
116 const float* i16 = input[16];
117 assert(i16 != NULL);
118 if XNN_UNPREDICTABLE(i16 != zero) {
119 i16 = (const float*) ((uintptr_t) i16 + input_offset);
120 }
121 const float* i17 = input[17];
122 assert(i17 != NULL);
123 if XNN_UNPREDICTABLE(i17 != zero) {
124 i17 = (const float*) ((uintptr_t) i17 + input_offset);
125 }
126 const float* i18 = input[18];
127 assert(i18 != NULL);
128 if XNN_UNPREDICTABLE(i18 != zero) {
129 i18 = (const float*) ((uintptr_t) i18 + input_offset);
130 }
131 const float* i19 = input[19];
132 assert(i19 != NULL);
133 if XNN_UNPREDICTABLE(i19 != zero) {
134 i19 = (const float*) ((uintptr_t) i19 + input_offset);
135 }
136 const float* i20 = input[20];
137 assert(i20 != NULL);
138 if XNN_UNPREDICTABLE(i20 != zero) {
139 i20 = (const float*) ((uintptr_t) i20 + input_offset);
140 }
141 const float* i21 = input[21];
142 assert(i21 != NULL);
143 if XNN_UNPREDICTABLE(i21 != zero) {
144 i21 = (const float*) ((uintptr_t) i21 + input_offset);
145 }
146 const float* i22 = input[22];
147 assert(i22 != NULL);
148 if XNN_UNPREDICTABLE(i22 != zero) {
149 i22 = (const float*) ((uintptr_t) i22 + input_offset);
150 }
151 const float* i23 = input[23];
152 assert(i23 != NULL);
153 if XNN_UNPREDICTABLE(i23 != zero) {
154 i23 = (const float*) ((uintptr_t) i23 + input_offset);
155 }
156 const float* i24 = input[24];
157 assert(i24 != NULL);
158 if XNN_UNPREDICTABLE(i24 != zero) {
159 i24 = (const float*) ((uintptr_t) i24 + input_offset);
160 }
161 input = (const float**) ((uintptr_t) input + input_stride);
162
163 size_t c = channels;
164 const float* w = weights;
165 for (; c >= 16; c -= 16) {
166 __m512 vacc0123456789ABCDEFp0 = _mm512_load_ps(w);
167
168
169 const __m512 vi0x0123456789ABCDEF = _mm512_loadu_ps(i0);
170 i0 += 16;
171
172 const __m512 vk0x0123456789ABCDEF = _mm512_load_ps(w + 16);
173 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi0x0123456789ABCDEF, vk0x0123456789ABCDEF, vacc0123456789ABCDEFp0);
174
175 const __m512 vi1x0123456789ABCDEF = _mm512_loadu_ps(i1);
176 i1 += 16;
177
178 const __m512 vk1x0123456789ABCDEF = _mm512_load_ps(w + 32);
179 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi1x0123456789ABCDEF, vk1x0123456789ABCDEF, vacc0123456789ABCDEFp0);
180
181 const __m512 vi2x0123456789ABCDEF = _mm512_loadu_ps(i2);
182 i2 += 16;
183
184 const __m512 vk2x0123456789ABCDEF = _mm512_load_ps(w + 48);
185 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi2x0123456789ABCDEF, vk2x0123456789ABCDEF, vacc0123456789ABCDEFp0);
186
187 const __m512 vi3x0123456789ABCDEF = _mm512_loadu_ps(i3);
188 i3 += 16;
189
190 const __m512 vk3x0123456789ABCDEF = _mm512_load_ps(w + 64);
191 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi3x0123456789ABCDEF, vk3x0123456789ABCDEF, vacc0123456789ABCDEFp0);
192
193 const __m512 vi4x0123456789ABCDEF = _mm512_loadu_ps(i4);
194 i4 += 16;
195
196 const __m512 vk4x0123456789ABCDEF = _mm512_load_ps(w + 80);
197 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi4x0123456789ABCDEF, vk4x0123456789ABCDEF, vacc0123456789ABCDEFp0);
198
199 const __m512 vi5x0123456789ABCDEF = _mm512_loadu_ps(i5);
200 i5 += 16;
201
202 const __m512 vk5x0123456789ABCDEF = _mm512_load_ps(w + 96);
203 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi5x0123456789ABCDEF, vk5x0123456789ABCDEF, vacc0123456789ABCDEFp0);
204
205 const __m512 vi6x0123456789ABCDEF = _mm512_loadu_ps(i6);
206 i6 += 16;
207
208 const __m512 vk6x0123456789ABCDEF = _mm512_load_ps(w + 112);
209 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi6x0123456789ABCDEF, vk6x0123456789ABCDEF, vacc0123456789ABCDEFp0);
210
211 const __m512 vi7x0123456789ABCDEF = _mm512_loadu_ps(i7);
212 i7 += 16;
213
214 const __m512 vk7x0123456789ABCDEF = _mm512_load_ps(w + 128);
215 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi7x0123456789ABCDEF, vk7x0123456789ABCDEF, vacc0123456789ABCDEFp0);
216
217 const __m512 vi8x0123456789ABCDEF = _mm512_loadu_ps(i8);
218 i8 += 16;
219
220 const __m512 vk8x0123456789ABCDEF = _mm512_load_ps(w + 144);
221 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi8x0123456789ABCDEF, vk8x0123456789ABCDEF, vacc0123456789ABCDEFp0);
222
223 const __m512 vi9x0123456789ABCDEF = _mm512_loadu_ps(i9);
224 i9 += 16;
225
226 const __m512 vk9x0123456789ABCDEF = _mm512_load_ps(w + 160);
227 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi9x0123456789ABCDEF, vk9x0123456789ABCDEF, vacc0123456789ABCDEFp0);
228
229 const __m512 vi10x0123456789ABCDEF = _mm512_loadu_ps(i10);
230 i10 += 16;
231
232 const __m512 vk10x0123456789ABCDEF = _mm512_load_ps(w + 176);
233 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi10x0123456789ABCDEF, vk10x0123456789ABCDEF, vacc0123456789ABCDEFp0);
234
235 const __m512 vi11x0123456789ABCDEF = _mm512_loadu_ps(i11);
236 i11 += 16;
237
238 const __m512 vk11x0123456789ABCDEF = _mm512_load_ps(w + 192);
239 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi11x0123456789ABCDEF, vk11x0123456789ABCDEF, vacc0123456789ABCDEFp0);
240
241 const __m512 vi12x0123456789ABCDEF = _mm512_loadu_ps(i12);
242 i12 += 16;
243
244 const __m512 vk12x0123456789ABCDEF = _mm512_load_ps(w + 208);
245 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi12x0123456789ABCDEF, vk12x0123456789ABCDEF, vacc0123456789ABCDEFp0);
246
247 const __m512 vi13x0123456789ABCDEF = _mm512_loadu_ps(i13);
248 i13 += 16;
249
250 const __m512 vk13x0123456789ABCDEF = _mm512_load_ps(w + 224);
251 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi13x0123456789ABCDEF, vk13x0123456789ABCDEF, vacc0123456789ABCDEFp0);
252
253 const __m512 vi14x0123456789ABCDEF = _mm512_loadu_ps(i14);
254 i14 += 16;
255
256 const __m512 vk14x0123456789ABCDEF = _mm512_load_ps(w + 240);
257 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi14x0123456789ABCDEF, vk14x0123456789ABCDEF, vacc0123456789ABCDEFp0);
258
259 const __m512 vi15x0123456789ABCDEF = _mm512_loadu_ps(i15);
260 i15 += 16;
261
262 const __m512 vk15x0123456789ABCDEF = _mm512_load_ps(w + 256);
263 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi15x0123456789ABCDEF, vk15x0123456789ABCDEF, vacc0123456789ABCDEFp0);
264
265 const __m512 vi16x0123456789ABCDEF = _mm512_loadu_ps(i16);
266 i16 += 16;
267
268 const __m512 vk16x0123456789ABCDEF = _mm512_load_ps(w + 272);
269 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi16x0123456789ABCDEF, vk16x0123456789ABCDEF, vacc0123456789ABCDEFp0);
270
271 const __m512 vi17x0123456789ABCDEF = _mm512_loadu_ps(i17);
272 i17 += 16;
273
274 const __m512 vk17x0123456789ABCDEF = _mm512_load_ps(w + 288);
275 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi17x0123456789ABCDEF, vk17x0123456789ABCDEF, vacc0123456789ABCDEFp0);
276
277 const __m512 vi18x0123456789ABCDEF = _mm512_loadu_ps(i18);
278 i18 += 16;
279
280 const __m512 vk18x0123456789ABCDEF = _mm512_load_ps(w + 304);
281 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi18x0123456789ABCDEF, vk18x0123456789ABCDEF, vacc0123456789ABCDEFp0);
282
283 const __m512 vi19x0123456789ABCDEF = _mm512_loadu_ps(i19);
284 i19 += 16;
285
286 const __m512 vk19x0123456789ABCDEF = _mm512_load_ps(w + 320);
287 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi19x0123456789ABCDEF, vk19x0123456789ABCDEF, vacc0123456789ABCDEFp0);
288
289 const __m512 vi20x0123456789ABCDEF = _mm512_loadu_ps(i20);
290 i20 += 16;
291
292 const __m512 vk20x0123456789ABCDEF = _mm512_load_ps(w + 336);
293 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi20x0123456789ABCDEF, vk20x0123456789ABCDEF, vacc0123456789ABCDEFp0);
294
295 const __m512 vi21x0123456789ABCDEF = _mm512_loadu_ps(i21);
296 i21 += 16;
297
298 const __m512 vk21x0123456789ABCDEF = _mm512_load_ps(w + 352);
299 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi21x0123456789ABCDEF, vk21x0123456789ABCDEF, vacc0123456789ABCDEFp0);
300
301 const __m512 vi22x0123456789ABCDEF = _mm512_loadu_ps(i22);
302 i22 += 16;
303
304 const __m512 vk22x0123456789ABCDEF = _mm512_load_ps(w + 368);
305 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi22x0123456789ABCDEF, vk22x0123456789ABCDEF, vacc0123456789ABCDEFp0);
306
307 const __m512 vi23x0123456789ABCDEF = _mm512_loadu_ps(i23);
308 i23 += 16;
309
310 const __m512 vk23x0123456789ABCDEF = _mm512_load_ps(w + 384);
311 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi23x0123456789ABCDEF, vk23x0123456789ABCDEF, vacc0123456789ABCDEFp0);
312
313 const __m512 vi24x0123456789ABCDEF = _mm512_loadu_ps(i24);
314 i24 += 16;
315
316 const __m512 vk24x0123456789ABCDEF = _mm512_load_ps(w + 400);
317 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi24x0123456789ABCDEF, vk24x0123456789ABCDEF, vacc0123456789ABCDEFp0);
318
319 w += 416;
320
321
322 __m512 vacc0123456789ABCDEF = _mm512_max_ps(vacc0123456789ABCDEFp0, vmin);
323 vacc0123456789ABCDEF = _mm512_min_ps(vacc0123456789ABCDEF, vmax);
324
325 _mm512_storeu_ps(output, vacc0123456789ABCDEF);
326 output += 16;
327 }
328 if XNN_UNLIKELY(c != 0) {
329 assert(c >= 1);
330 assert(c <= 16);
331 // Prepare mask for valid 32-bit elements (depends on nc).
332 const __mmask16 vmask = _cvtu32_mask16((uint16_t) ((uint32_t) (UINT32_C(1) << c) - UINT32_C(1)));
333
334 __m512 vacc0123456789ABCDEFp0 = _mm512_maskz_loadu_ps(vmask, w);
335
336 const __m512 vi0x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i0);
337 const __m512 vk0x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 16);
338 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi0x0123456789ABCDEF, vk0x0123456789ABCDEF, vacc0123456789ABCDEFp0);
339
340 const __m512 vi1x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i1);
341 const __m512 vk1x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 32);
342 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi1x0123456789ABCDEF, vk1x0123456789ABCDEF, vacc0123456789ABCDEFp0);
343
344 const __m512 vi2x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i2);
345 const __m512 vk2x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 48);
346 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi2x0123456789ABCDEF, vk2x0123456789ABCDEF, vacc0123456789ABCDEFp0);
347
348 const __m512 vi3x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i3);
349 const __m512 vk3x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 64);
350 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi3x0123456789ABCDEF, vk3x0123456789ABCDEF, vacc0123456789ABCDEFp0);
351
352 const __m512 vi4x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i4);
353 const __m512 vk4x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 80);
354 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi4x0123456789ABCDEF, vk4x0123456789ABCDEF, vacc0123456789ABCDEFp0);
355
356 const __m512 vi5x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i5);
357 const __m512 vk5x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 96);
358 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi5x0123456789ABCDEF, vk5x0123456789ABCDEF, vacc0123456789ABCDEFp0);
359
360 const __m512 vi6x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i6);
361 const __m512 vk6x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 112);
362 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi6x0123456789ABCDEF, vk6x0123456789ABCDEF, vacc0123456789ABCDEFp0);
363
364 const __m512 vi7x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i7);
365 const __m512 vk7x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 128);
366 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi7x0123456789ABCDEF, vk7x0123456789ABCDEF, vacc0123456789ABCDEFp0);
367
368 const __m512 vi8x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i8);
369 const __m512 vk8x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 144);
370 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi8x0123456789ABCDEF, vk8x0123456789ABCDEF, vacc0123456789ABCDEFp0);
371
372 const __m512 vi9x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i9);
373 const __m512 vk9x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 160);
374 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi9x0123456789ABCDEF, vk9x0123456789ABCDEF, vacc0123456789ABCDEFp0);
375
376 const __m512 vi10x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i10);
377 const __m512 vk10x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 176);
378 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi10x0123456789ABCDEF, vk10x0123456789ABCDEF, vacc0123456789ABCDEFp0);
379
380 const __m512 vi11x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i11);
381 const __m512 vk11x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 192);
382 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi11x0123456789ABCDEF, vk11x0123456789ABCDEF, vacc0123456789ABCDEFp0);
383
384 const __m512 vi12x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i12);
385 const __m512 vk12x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 208);
386 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi12x0123456789ABCDEF, vk12x0123456789ABCDEF, vacc0123456789ABCDEFp0);
387
388 const __m512 vi13x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i13);
389 const __m512 vk13x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 224);
390 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi13x0123456789ABCDEF, vk13x0123456789ABCDEF, vacc0123456789ABCDEFp0);
391
392 const __m512 vi14x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i14);
393 const __m512 vk14x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 240);
394 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi14x0123456789ABCDEF, vk14x0123456789ABCDEF, vacc0123456789ABCDEFp0);
395
396 const __m512 vi15x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i15);
397 const __m512 vk15x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 256);
398 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi15x0123456789ABCDEF, vk15x0123456789ABCDEF, vacc0123456789ABCDEFp0);
399
400 const __m512 vi16x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i16);
401 const __m512 vk16x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 272);
402 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi16x0123456789ABCDEF, vk16x0123456789ABCDEF, vacc0123456789ABCDEFp0);
403
404 const __m512 vi17x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i17);
405 const __m512 vk17x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 288);
406 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi17x0123456789ABCDEF, vk17x0123456789ABCDEF, vacc0123456789ABCDEFp0);
407
408 const __m512 vi18x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i18);
409 const __m512 vk18x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 304);
410 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi18x0123456789ABCDEF, vk18x0123456789ABCDEF, vacc0123456789ABCDEFp0);
411
412 const __m512 vi19x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i19);
413 const __m512 vk19x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 320);
414 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi19x0123456789ABCDEF, vk19x0123456789ABCDEF, vacc0123456789ABCDEFp0);
415
416 const __m512 vi20x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i20);
417 const __m512 vk20x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 336);
418 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi20x0123456789ABCDEF, vk20x0123456789ABCDEF, vacc0123456789ABCDEFp0);
419
420 const __m512 vi21x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i21);
421 const __m512 vk21x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 352);
422 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi21x0123456789ABCDEF, vk21x0123456789ABCDEF, vacc0123456789ABCDEFp0);
423
424 const __m512 vi22x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i22);
425 const __m512 vk22x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 368);
426 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi22x0123456789ABCDEF, vk22x0123456789ABCDEF, vacc0123456789ABCDEFp0);
427
428 const __m512 vi23x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i23);
429 const __m512 vk23x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 384);
430 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi23x0123456789ABCDEF, vk23x0123456789ABCDEF, vacc0123456789ABCDEFp0);
431
432 const __m512 vi24x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, i24);
433 const __m512 vk24x0123456789ABCDEF = _mm512_maskz_loadu_ps(vmask, w + 400);
434 vacc0123456789ABCDEFp0 = _mm512_fmadd_ps(vi24x0123456789ABCDEF, vk24x0123456789ABCDEF, vacc0123456789ABCDEFp0);
435
436
437 __m512 vacc0123456789ABCDEF = _mm512_max_ps(vacc0123456789ABCDEFp0, vmin);
438 vacc0123456789ABCDEF = _mm512_min_ps(vacc0123456789ABCDEF, vmax);
439
440 _mm512_mask_storeu_ps(output, vmask, vacc0123456789ABCDEF);
441 output += c;
442 }
443
444 output = (float*) ((uintptr_t) output + output_increment);
445 } while (--output_width != 0);
446 }
447