Debian Codegraph @

src/qd8-f32-qc8w-igemm/gen/qd8-f32-qc8w-igemm-8x8c4-minmax-neondot.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-igemm/c4-neondot.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2020 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 <arm_neon.h>
13
14 #include "xnnpack/igemm.h"
15 #include "xnnpack/math.h"
16
17
18 void xnn_qd8_f32_qc8w_igemm_minmax_ukernel_8x8c4__neondot(
19 size_t mr,
20 size_t nc,
21 size_t kc,
22 size_t ks,
23 const int8_t** restrict a,
24 const void* restrict w,
25 float* restrict c,
26 size_t cm_stride,
27 size_t cn_stride,
28 size_t a_offset,
29 const int8_t* zero,
30 const int8_t* zero_data,
31 const union xnn_f32_minmax_params params[restrict XNN_MIN_ELEMENTS(1)],
32 const struct xnn_qd8_quantization_params quantization_params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
33 {
34 assert(mr != 0);
35 assert(mr <= 8);
36 assert(nc != 0);
37 assert(kc != 0);
38 assert(ks != 0);
39 assert(ks % (8 * sizeof(void*)) == 0);
40 assert(a_offset % sizeof(int8_t) == 0);
41 assert(a != NULL);
42 assert(w != NULL);
43 assert(c != NULL);
44
45 kc = round_up_po2(kc, 4 * sizeof(int8_t));
46 float* c0 = c;
47 float* c1 = (float*) ((uintptr_t) c0 + cm_stride);
48 if XNN_UNPREDICTABLE(mr < 2) {
49 c1 = c0;
50 }
51 float* c2 = (float*) ((uintptr_t) c1 + cm_stride);
52 if XNN_UNPREDICTABLE(mr <= 2) {
53 c2 = c1;
54 }
55 float* c3 = (float*) ((uintptr_t) c2 + cm_stride);
56 if XNN_UNPREDICTABLE(mr < 4) {
57 c3 = c2;
58 }
59 float* c4 = (float*) ((uintptr_t) c3 + cm_stride);
60 if XNN_UNPREDICTABLE(mr <= 4) {
61 c4 = c3;
62 }
63 float* c5 = (float*) ((uintptr_t) c4 + cm_stride);
64 if XNN_UNPREDICTABLE(mr < 6) {
65 c5 = c4;
66 }
67 float* c6 = (float*) ((uintptr_t) c5 + cm_stride);
68 if XNN_UNPREDICTABLE(mr <= 6) {
69 c6 = c5;
70 }
71 float* c7 = (float*) ((uintptr_t) c6 + cm_stride);
72 if XNN_UNPREDICTABLE(mr != 8) {
73 c7 = c6;
74 }
75
76 do {
77 const int32x4_t vinput_zero_point = vld1q_dup_s32(&quantization_params->zero_point);
78 const int32x4_t vksum0123 = vld1q_s32(w); w = (const int32_t*) w + 4;
79 int32x4_t vacc0x0123 = vmulq_s32(vksum0123, vinput_zero_point);
80 const int32x4_t vksum4567 = vld1q_s32(w); w = (const int32_t*) w + 4;
81 int32x4_t vacc0x4567 = vmulq_s32(vksum4567, vinput_zero_point);
82 int32x4_t vacc1x0123 = vacc0x0123;
83 int32x4_t vacc1x4567 = vacc0x4567;
84 int32x4_t vacc2x0123 = vacc0x0123;
85 int32x4_t vacc2x4567 = vacc0x4567;
86 int32x4_t vacc3x0123 = vacc0x0123;
87 int32x4_t vacc3x4567 = vacc0x4567;
88 int32x4_t vacc4x0123 = vacc0x0123;
89 int32x4_t vacc4x4567 = vacc0x4567;
90 int32x4_t vacc5x0123 = vacc0x0123;
91 int32x4_t vacc5x4567 = vacc0x4567;
92 int32x4_t vacc6x0123 = vacc0x0123;
93 int32x4_t vacc6x4567 = vacc0x4567;
94 int32x4_t vacc7x0123 = vacc0x0123;
95 int32x4_t vacc7x4567 = vacc0x4567;
96
97 size_t p = ks;
98 do {
99 const int8_t* restrict a0 = a[0];
100 if XNN_UNPREDICTABLE(a0 != zero) {
101 a0 = (const int8_t*) ((uintptr_t) a0 + a_offset);
102 } else {
103 a0 = zero_data;
104 }
105 const int8_t* restrict a1 = a[1];
106 if XNN_UNPREDICTABLE(a1 != zero) {
107 a1 = (const int8_t*) ((uintptr_t) a1 + a_offset);
108 } else {
109 a1 = zero_data;
110 }
111 const int8_t* restrict a2 = a[2];
112 if XNN_UNPREDICTABLE(a2 != zero) {
113 a2 = (const int8_t*) ((uintptr_t) a2 + a_offset);
114 } else {
115 a2 = zero_data;
116 }
117 const int8_t* restrict a3 = a[3];
118 if XNN_UNPREDICTABLE(a3 != zero) {
119 a3 = (const int8_t*) ((uintptr_t) a3 + a_offset);
120 } else {
121 a3 = zero_data;
122 }
123 const int8_t* restrict a4 = a[4];
124 if XNN_UNPREDICTABLE(a4 != zero) {
125 a4 = (const int8_t*) ((uintptr_t) a4 + a_offset);
126 } else {
127 a4 = zero_data;
128 }
129 const int8_t* restrict a5 = a[5];
130 if XNN_UNPREDICTABLE(a5 != zero) {
131 a5 = (const int8_t*) ((uintptr_t) a5 + a_offset);
132 } else {
133 a5 = zero_data;
134 }
135 const int8_t* restrict a6 = a[6];
136 if XNN_UNPREDICTABLE(a6 != zero) {
137 a6 = (const int8_t*) ((uintptr_t) a6 + a_offset);
138 } else {
139 a6 = zero_data;
140 }
141 const int8_t* restrict a7 = a[7];
142 if XNN_UNPREDICTABLE(a7 != zero) {
143 a7 = (const int8_t*) ((uintptr_t) a7 + a_offset);
144 } else {
145 a7 = zero_data;
146 }
147 a += 8;
148
149 // Inner accumulation loop along the 8 columns.
150 size_t k = kc;
151 // 2x partial unrolled loop to load 8 bytes at a time.
152 while (k >= 8 * sizeof(int8_t)) {
153 // Load a 8x8 block of activations.
154 const int8x8_t va0x01234567 = vld1_s8(a0); a0 += 8;
155 const int8x8_t va1x01234567 = vld1_s8(a1); a1 += 8;
156 const int8x8_t va2x01234567 = vld1_s8(a2); a2 += 8;
157 const int8x8_t va3x01234567 = vld1_s8(a3); a3 += 8;
158 const int8x8_t va4x01234567 = vld1_s8(a4); a4 += 8;
159 const int8x8_t va5x01234567 = vld1_s8(a5); a5 += 8;
160 const int8x8_t va6x01234567 = vld1_s8(a6); a6 += 8;
161 const int8x8_t va7x01234567 = vld1_s8(a7); a7 += 8;
162
163 // Load a 8x8 block of weights.
164 const int8x16_t vb0123x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
165 const int8x16_t vb0123x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
166 const int8x16_t vb4567x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
167 const int8x16_t vb4567x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
168
169 // Multiply-accumulate: 8x8 * 8x8 --> 8x8.
170 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);
171 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb0123x4567, va0x01234567, 0);
172 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb0123x0123, va1x01234567, 0);
173 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb0123x4567, va1x01234567, 0);
174 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb0123x0123, va2x01234567, 0);
175 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb0123x4567, va2x01234567, 0);
176 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb0123x0123, va3x01234567, 0);
177 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb0123x4567, va3x01234567, 0);
178 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb0123x0123, va4x01234567, 0);
179 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb0123x4567, va4x01234567, 0);
180 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb0123x0123, va5x01234567, 0);
181 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb0123x4567, va5x01234567, 0);
182 vacc6x0123 = vdotq_lane_s32(vacc6x0123, vb0123x0123, va6x01234567, 0);
183 vacc6x4567 = vdotq_lane_s32(vacc6x4567, vb0123x4567, va6x01234567, 0);
184 vacc7x0123 = vdotq_lane_s32(vacc7x0123, vb0123x0123, va7x01234567, 0);
185 vacc7x4567 = vdotq_lane_s32(vacc7x4567, vb0123x4567, va7x01234567, 0);
186 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb4567x0123, va0x01234567, 1);
187 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb4567x4567, va0x01234567, 1);
188 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb4567x0123, va1x01234567, 1);
189 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb4567x4567, va1x01234567, 1);
190 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb4567x0123, va2x01234567, 1);
191 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb4567x4567, va2x01234567, 1);
192 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb4567x0123, va3x01234567, 1);
193 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb4567x4567, va3x01234567, 1);
194 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb4567x0123, va4x01234567, 1);
195 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb4567x4567, va4x01234567, 1);
196 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb4567x0123, va5x01234567, 1);
197 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb4567x4567, va5x01234567, 1);
198 vacc6x0123 = vdotq_lane_s32(vacc6x0123, vb4567x0123, va6x01234567, 1);
199 vacc6x4567 = vdotq_lane_s32(vacc6x4567, vb4567x4567, va6x01234567, 1);
200 vacc7x0123 = vdotq_lane_s32(vacc7x0123, vb4567x0123, va7x01234567, 1);
201 vacc7x4567 = vdotq_lane_s32(vacc7x4567, vb4567x4567, va7x01234567, 1);
202
203 k -= 8 * sizeof(int8_t);
204 }
205 // Handle up to 4 final positions of `k`
206 if XNN_UNLIKELY(k != 0) {
207 // Load a 8x4 block of activations.
208 const int8x8_t va0x01234567 = vld1_s8(a0);
209 const int8x8_t va1x01234567 = vld1_s8(a1);
210 const int8x8_t va2x01234567 = vld1_s8(a2);
211 const int8x8_t va3x01234567 = vld1_s8(a3);
212 const int8x8_t va4x01234567 = vld1_s8(a4);
213 const int8x8_t va5x01234567 = vld1_s8(a5);
214 const int8x8_t va6x01234567 = vld1_s8(a6);
215 const int8x8_t va7x01234567 = vld1_s8(a7);
216
217 // Load a 4x8 block of weights.
218 const int8x16_t vb0123x0123 = vld1q_s8(w); w = (const int8_t*) w + 16;
219 const int8x16_t vb0123x4567 = vld1q_s8(w); w = (const int8_t*) w + 16;
220
221 // Multiply-accumulate: 8x4 * 4x8 --> 8x8.
222 vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);
223 vacc0x4567 = vdotq_lane_s32(vacc0x4567, vb0123x4567, va0x01234567, 0);
224 vacc1x0123 = vdotq_lane_s32(vacc1x0123, vb0123x0123, va1x01234567, 0);
225 vacc1x4567 = vdotq_lane_s32(vacc1x4567, vb0123x4567, va1x01234567, 0);
226 vacc2x0123 = vdotq_lane_s32(vacc2x0123, vb0123x0123, va2x01234567, 0);
227 vacc2x4567 = vdotq_lane_s32(vacc2x4567, vb0123x4567, va2x01234567, 0);
228 vacc3x0123 = vdotq_lane_s32(vacc3x0123, vb0123x0123, va3x01234567, 0);
229 vacc3x4567 = vdotq_lane_s32(vacc3x4567, vb0123x4567, va3x01234567, 0);
230 vacc4x0123 = vdotq_lane_s32(vacc4x0123, vb0123x0123, va4x01234567, 0);
231 vacc4x4567 = vdotq_lane_s32(vacc4x4567, vb0123x4567, va4x01234567, 0);
232 vacc5x0123 = vdotq_lane_s32(vacc5x0123, vb0123x0123, va5x01234567, 0);
233 vacc5x4567 = vdotq_lane_s32(vacc5x4567, vb0123x4567, va5x01234567, 0);
234 vacc6x0123 = vdotq_lane_s32(vacc6x0123, vb0123x0123, va6x01234567, 0);
235 vacc6x4567 = vdotq_lane_s32(vacc6x4567, vb0123x4567, va6x01234567, 0);
236 vacc7x0123 = vdotq_lane_s32(vacc7x0123, vb0123x0123, va7x01234567, 0);
237 vacc7x4567 = vdotq_lane_s32(vacc7x4567, vb0123x4567, va7x01234567, 0);
238 }
239 p -= 8 * sizeof(void*);
240 } while (p != 0);
241
242 float32x4_t vout0x0123 = vcvtq_f32_s32(vacc0x0123);
243 float32x4_t vout0x4567 = vcvtq_f32_s32(vacc0x4567);
244 float32x4_t vout1x0123 = vcvtq_f32_s32(vacc1x0123);
245 float32x4_t vout1x4567 = vcvtq_f32_s32(vacc1x4567);
246 float32x4_t vout2x0123 = vcvtq_f32_s32(vacc2x0123);
247 float32x4_t vout2x4567 = vcvtq_f32_s32(vacc2x4567);
248 float32x4_t vout3x0123 = vcvtq_f32_s32(vacc3x0123);
249 float32x4_t vout3x4567 = vcvtq_f32_s32(vacc3x4567);
250 float32x4_t vout4x0123 = vcvtq_f32_s32(vacc4x0123);
251 float32x4_t vout4x4567 = vcvtq_f32_s32(vacc4x4567);
252 float32x4_t vout5x0123 = vcvtq_f32_s32(vacc5x0123);
253 float32x4_t vout5x4567 = vcvtq_f32_s32(vacc5x4567);
254 float32x4_t vout6x0123 = vcvtq_f32_s32(vacc6x0123);
255 float32x4_t vout6x4567 = vcvtq_f32_s32(vacc6x4567);
256 float32x4_t vout7x0123 = vcvtq_f32_s32(vacc7x0123);
257 float32x4_t vout7x4567 = vcvtq_f32_s32(vacc7x4567);
258 const float32x4_t vinput_scale = vld1q_dup_f32(&quantization_params->inv_scale);
259 vout0x0123 = vmulq_f32(vout0x0123, vinput_scale);
260 vout0x4567 = vmulq_f32(vout0x4567, vinput_scale);
261 vout1x0123 = vmulq_f32(vout1x0123, vinput_scale);
262 vout1x4567 = vmulq_f32(vout1x4567, vinput_scale);
263 vout2x0123 = vmulq_f32(vout2x0123, vinput_scale);
264 vout2x4567 = vmulq_f32(vout2x4567, vinput_scale);
265 vout3x0123 = vmulq_f32(vout3x0123, vinput_scale);
266 vout3x4567 = vmulq_f32(vout3x4567, vinput_scale);
267 vout4x0123 = vmulq_f32(vout4x0123, vinput_scale);
268 vout4x4567 = vmulq_f32(vout4x4567, vinput_scale);
269 vout5x0123 = vmulq_f32(vout5x0123, vinput_scale);
270 vout5x4567 = vmulq_f32(vout5x4567, vinput_scale);
271 vout6x0123 = vmulq_f32(vout6x0123, vinput_scale);
272 vout6x4567 = vmulq_f32(vout6x4567, vinput_scale);
273 vout7x0123 = vmulq_f32(vout7x0123, vinput_scale);
274 vout7x4567 = vmulq_f32(vout7x4567, vinput_scale);
275
276 const float32x4_t vfilter_output_scale0123 = vld1q_f32(w); w = (const float*) w + 4;
277 const float32x4_t vfilter_output_scale4567 = vld1q_f32(w); w = (const float*) w + 4;
278
279 const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4;
280 #if XNN_ARCH_ARM64
281 vout0x0123 = vfmaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
282 vout1x0123 = vfmaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
283 vout2x0123 = vfmaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
284 vout3x0123 = vfmaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
285 vout4x0123 = vfmaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
286 vout5x0123 = vfmaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
287 vout6x0123 = vfmaq_f32(vbias0123, vout6x0123, vfilter_output_scale0123);
288 vout7x0123 = vfmaq_f32(vbias0123, vout7x0123, vfilter_output_scale0123);
289 #else
290 vout0x0123 = vmlaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
291 vout1x0123 = vmlaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
292 vout2x0123 = vmlaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
293 vout3x0123 = vmlaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
294 vout4x0123 = vmlaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
295 vout5x0123 = vmlaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
296 vout6x0123 = vmlaq_f32(vbias0123, vout6x0123, vfilter_output_scale0123);
297 vout7x0123 = vmlaq_f32(vbias0123, vout7x0123, vfilter_output_scale0123);
298 #endif
299 const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4;
300 #if XNN_ARCH_ARM64
301 vout0x4567 = vfmaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
302 vout1x4567 = vfmaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
303 vout2x4567 = vfmaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
304 vout3x4567 = vfmaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
305 vout4x4567 = vfmaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
306 vout5x4567 = vfmaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
307 vout6x4567 = vfmaq_f32(vbias4567, vout6x4567, vfilter_output_scale4567);
308 vout7x4567 = vfmaq_f32(vbias4567, vout7x4567, vfilter_output_scale4567);
309 #else
310 vout0x4567 = vmlaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
311 vout1x4567 = vmlaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
312 vout2x4567 = vmlaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
313 vout3x4567 = vmlaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
314 vout4x4567 = vmlaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
315 vout5x4567 = vmlaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
316 vout6x4567 = vmlaq_f32(vbias4567, vout6x4567, vfilter_output_scale4567);
317 vout7x4567 = vmlaq_f32(vbias4567, vout7x4567, vfilter_output_scale4567);
318 #endif
319
320 const float32x4_t voutput_min = vld1q_dup_f32(&params->scalar.min);
321 vout0x0123 = vmaxq_f32(vout0x0123, voutput_min);
322 vout0x4567 = vmaxq_f32(vout0x4567, voutput_min);
323 vout1x0123 = vmaxq_f32(vout1x0123, voutput_min);
324 vout1x4567 = vmaxq_f32(vout1x4567, voutput_min);
325 vout2x0123 = vmaxq_f32(vout2x0123, voutput_min);
326 vout2x4567 = vmaxq_f32(vout2x4567, voutput_min);
327 vout3x0123 = vmaxq_f32(vout3x0123, voutput_min);
328 vout3x4567 = vmaxq_f32(vout3x4567, voutput_min);
329 vout4x0123 = vmaxq_f32(vout4x0123, voutput_min);
330 vout4x4567 = vmaxq_f32(vout4x4567, voutput_min);
331 vout5x0123 = vmaxq_f32(vout5x0123, voutput_min);
332 vout5x4567 = vmaxq_f32(vout5x4567, voutput_min);
333 vout6x0123 = vmaxq_f32(vout6x0123, voutput_min);
334 vout6x4567 = vmaxq_f32(vout6x4567, voutput_min);
335 vout7x0123 = vmaxq_f32(vout7x0123, voutput_min);
336 vout7x4567 = vmaxq_f32(vout7x4567, voutput_min);
337
338 const float32x4_t voutput_max = vld1q_dup_f32(&params->scalar.max);
339 vout0x0123 = vminq_f32(vout0x0123, voutput_max);
340 vout0x4567 = vminq_f32(vout0x4567, voutput_max);
341 vout1x0123 = vminq_f32(vout1x0123, voutput_max);
342 vout1x4567 = vminq_f32(vout1x4567, voutput_max);
343 vout2x0123 = vminq_f32(vout2x0123, voutput_max);
344 vout2x4567 = vminq_f32(vout2x4567, voutput_max);
345 vout3x0123 = vminq_f32(vout3x0123, voutput_max);
346 vout3x4567 = vminq_f32(vout3x4567, voutput_max);
347 vout4x0123 = vminq_f32(vout4x0123, voutput_max);
348 vout4x4567 = vminq_f32(vout4x4567, voutput_max);
349 vout5x0123 = vminq_f32(vout5x0123, voutput_max);
350 vout5x4567 = vminq_f32(vout5x4567, voutput_max);
351 vout6x0123 = vminq_f32(vout6x0123, voutput_max);
352 vout6x4567 = vminq_f32(vout6x4567, voutput_max);
353 vout7x0123 = vminq_f32(vout7x0123, voutput_max);
354 vout7x4567 = vminq_f32(vout7x4567, voutput_max);
355
356 if XNN_LIKELY(nc >= 8) {
357 vst1q_f32(c7, vout7x0123);
358 vst1q_f32(c7 + 4, vout7x4567);
359 vst1q_f32(c6, vout6x0123);
360 vst1q_f32(c6 + 4, vout6x4567);
361 vst1q_f32(c5, vout5x0123);
362 vst1q_f32(c5 + 4, vout5x4567);
363 vst1q_f32(c4, vout4x0123);
364 vst1q_f32(c4 + 4, vout4x4567);
365 vst1q_f32(c3, vout3x0123);
366 vst1q_f32(c3 + 4, vout3x4567);
367 vst1q_f32(c2, vout2x0123);
368 vst1q_f32(c2 + 4, vout2x4567);
369 vst1q_f32(c1, vout1x0123);
370 vst1q_f32(c1 + 4, vout1x4567);
371 vst1q_f32(c0, vout0x0123);
372 vst1q_f32(c0 + 4, vout0x4567);
373
374 a = (const int8_t**restrict) ((uintptr_t) a - ks);
375
376 c0 = (float*) ((uintptr_t) c0 + cn_stride);
377 c1 = (float*) ((uintptr_t) c1 + cn_stride);
378 c2 = (float*) ((uintptr_t) c2 + cn_stride);
379 c3 = (float*) ((uintptr_t) c3 + cn_stride);
380 c4 = (float*) ((uintptr_t) c4 + cn_stride);
381 c5 = (float*) ((uintptr_t) c5 + cn_stride);
382 c6 = (float*) ((uintptr_t) c6 + cn_stride);
383 c7 = (float*) ((uintptr_t) c7 + cn_stride);
384
385 nc -= 8;
386 } else {
387 if (nc & 4) {
388 vst1q_f32(c7, vout7x0123); c7 += 4;
389 vout7x0123 = vout7x4567;
390 vst1q_f32(c6, vout6x0123); c6 += 4;
391 vout6x0123 = vout6x4567;
392 vst1q_f32(c5, vout5x0123); c5 += 4;
393 vout5x0123 = vout5x4567;
394 vst1q_f32(c4, vout4x0123); c4 += 4;
395 vout4x0123 = vout4x4567;
396 vst1q_f32(c3, vout3x0123); c3 += 4;
397 vout3x0123 = vout3x4567;
398 vst1q_f32(c2, vout2x0123); c2 += 4;
399 vout2x0123 = vout2x4567;
400 vst1q_f32(c1, vout1x0123); c1 += 4;
401 vout1x0123 = vout1x4567;
402 vst1q_f32(c0, vout0x0123); c0 += 4;
403 vout0x0123 = vout0x4567;
404 }
405 float32x2_t vout7x01 = vget_low_f32(vout7x0123);
406 float32x2_t vout6x01 = vget_low_f32(vout6x0123);
407 float32x2_t vout5x01 = vget_low_f32(vout5x0123);
408 float32x2_t vout4x01 = vget_low_f32(vout4x0123);
409 float32x2_t vout3x01 = vget_low_f32(vout3x0123);
410 float32x2_t vout2x01 = vget_low_f32(vout2x0123);
411 float32x2_t vout1x01 = vget_low_f32(vout1x0123);
412 float32x2_t vout0x01 = vget_low_f32(vout0x0123);
413 if (nc & 2) {
414 vst1_f32(c7, vout7x01); c7 += 2;
415 vst1_f32(c6, vout6x01); c6 += 2;
416 vst1_f32(c5, vout5x01); c5 += 2;
417 vst1_f32(c4, vout4x01); c4 += 2;
418 vst1_f32(c3, vout3x01); c3 += 2;
419 vst1_f32(c2, vout2x01); c2 += 2;
420 vst1_f32(c1, vout1x01); c1 += 2;
421 vst1_f32(c0, vout0x01); c0 += 2;
422 vout7x01 = vget_high_f32(vout7x0123);
423 vout6x01 = vget_high_f32(vout6x0123);
424 vout5x01 = vget_high_f32(vout5x0123);
425 vout4x01 = vget_high_f32(vout4x0123);
426 vout3x01 = vget_high_f32(vout3x0123);
427 vout2x01 = vget_high_f32(vout2x0123);
428 vout1x01 = vget_high_f32(vout1x0123);
429 vout0x01 = vget_high_f32(vout0x0123);
430 }
431 if (nc & 1) {
432 vst1_lane_f32(c7, vout7x01, 0);
433 vst1_lane_f32(c6, vout6x01, 0);
434 vst1_lane_f32(c5, vout5x01, 0);
435 vst1_lane_f32(c4, vout4x01, 0);
436 vst1_lane_f32(c3, vout3x01, 0);
437 vst1_lane_f32(c2, vout2x01, 0);
438 vst1_lane_f32(c1, vout1x01, 0);
439 vst1_lane_f32(c0, vout0x01, 0);
440 }
441 nc = 0;
442 }
443 } while (nc != 0);
444 }