Debian Codegraph @

src/qd8-f32-qb4w-gemm/gen/qd8-f32-qb4w-gemm-6x16c8-minmax-neoni8mm.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-gemm/c8-neoni8mm.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2023 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/gemm.h"
15 #include "xnnpack/math.h"
16
17
18 void xnn_qd8_f32_qb4w_gemm_minmax_ukernel_6x16c8__neoni8mm(
19 size_t mr,
20 size_t nc,
21 size_t kc,
22 const int8_t* restrict a,
23 size_t a_stride,
24 const void* restrict w,
25 float* restrict c,
26 size_t cm_stride,
27 size_t cn_stride,
28 const struct xnn_f32_qb4w_minmax_params params[restrict XNN_MIN_ELEMENTS(1)],
29 const struct xnn_qd8_quantization_params quantization_params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
30 {
31 assert(mr != 0);
32 assert(mr <= 6);
33 assert(nc != 0);
34 assert(kc != 0);
35 assert(kc % sizeof(int8_t) == 0);
36 assert(a != NULL);
37 assert(w != NULL);
38 assert(c != NULL);
39
40 kc = round_up_po2(kc, 8 * sizeof(int8_t));
41 size_t bl = params->scalar.blocksize;
42 assert(bl <= kc);
43 assert(bl != 0);
44 assert(bl % 32 == 0);
45 const int8_t* a0 = a;
46 float* c0 = c;
47 const int8_t* a1 = (const int8_t*) ((uintptr_t) a0 + a_stride);
48 float* c1 = (float*) ((uintptr_t) c0 + cm_stride);
49 if XNN_UNPREDICTABLE(mr < 2) {
50 a1 = a0;
51 c1 = c0;
52 }
53 const int8_t* a2 = (const int8_t*) ((uintptr_t) a1 + a_stride);
54 float* c2 = (float*) ((uintptr_t) c1 + cm_stride);
55 if XNN_UNPREDICTABLE(mr <= 2) {
56 a2 = a1;
57 c2 = c1;
58 }
59 const int8_t* a3 = (const int8_t*) ((uintptr_t) a2 + a_stride);
60 float* c3 = (float*) ((uintptr_t) c2 + cm_stride);
61 if XNN_UNPREDICTABLE(mr < 4) {
62 a3 = a2;
63 c3 = c2;
64 }
65 const int8_t* a4 = (const int8_t*) ((uintptr_t) a3 + a_stride);
66 float* c4 = (float*) ((uintptr_t) c3 + cm_stride);
67 if XNN_UNPREDICTABLE(mr <= 4) {
68 a4 = a3;
69 c4 = c3;
70 }
71 const int8_t* a5 = (const int8_t*) ((uintptr_t) a4 + a_stride);
72 float* c5 = (float*) ((uintptr_t) c4 + cm_stride);
73 if XNN_UNPREDICTABLE(mr != 6) {
74 a5 = a4;
75 c5 = c4;
76 }
77 const int8x16_t vmask = vmovq_n_s8(INT8_C(0xF0));
78
79 // Loop over groups of 16 columns.
80 do {
81 // Initialize accumulators with scaled vksum. 16 scaled vksum values are loaded from the
82 // weight matrix, at the start of the group of 16 columns.
83 const float32x4_t vinput_zero_point01 = vcvtq_f32_s32(vld1q_s32(&quantization_params[0].zero_point));
84 const float32x4_t vksum0123 = vld1q_f32(w); w = (const float*) w + 4;
85 float32x4_t vout0x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point01), 0);
86 float32x4_t vout1x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point01), 0);
87 const float32x4_t vksum4567 = vld1q_f32(w); w = (const float*) w + 4;
88 float32x4_t vout0x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point01), 0);
89 float32x4_t vout1x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point01), 0);
90 const float32x4_t vksum89AB = vld1q_f32(w); w = (const float*) w + 4;
91 float32x4_t vout0x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point01), 0);
92 float32x4_t vout1x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point01), 0);
93 const float32x4_t vksumCDEF = vld1q_f32(w); w = (const float*) w + 4;
94 float32x4_t vout0xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point01), 0);
95 float32x4_t vout1xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point01), 0);
96 const float32x4_t vinput_zero_point23 = vcvtq_f32_s32(vld1q_s32(&quantization_params[2].zero_point));
97 float32x4_t vout2x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point23), 0);
98 float32x4_t vout3x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point23), 0);
99 float32x4_t vout2x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point23), 0);
100 float32x4_t vout3x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point23), 0);
101 float32x4_t vout2x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point23), 0);
102 float32x4_t vout3x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point23), 0);
103 float32x4_t vout2xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point23), 0);
104 float32x4_t vout3xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point23), 0);
105 const float32x4_t vinput_zero_point45 = vcvtq_f32_s32(vld1q_s32(&quantization_params[4].zero_point));
106 float32x4_t vout4x0123 = vmulq_lane_f32(vksum0123, vget_low_f32(vinput_zero_point45), 0);
107 float32x4_t vout5x0123 = vmulq_lane_f32(vksum0123, vget_high_f32(vinput_zero_point45), 0);
108 float32x4_t vout4x4567 = vmulq_lane_f32(vksum4567, vget_low_f32(vinput_zero_point45), 0);
109 float32x4_t vout5x4567 = vmulq_lane_f32(vksum4567, vget_high_f32(vinput_zero_point45), 0);
110 float32x4_t vout4x89AB = vmulq_lane_f32(vksum89AB, vget_low_f32(vinput_zero_point45), 0);
111 float32x4_t vout5x89AB = vmulq_lane_f32(vksum89AB, vget_high_f32(vinput_zero_point45), 0);
112 float32x4_t vout4xCDEF = vmulq_lane_f32(vksumCDEF, vget_low_f32(vinput_zero_point45), 0);
113 float32x4_t vout5xCDEF = vmulq_lane_f32(vksumCDEF, vget_high_f32(vinput_zero_point45), 0);
114
115
116 for (size_t kb=0; kb < kc; kb += bl) {
117 int32x4_t vacc01x01 = vdupq_n_s32(0);
118 int32x4_t vacc01x23 = vdupq_n_s32(0);
119 int32x4_t vacc01x45 = vdupq_n_s32(0);
120 int32x4_t vacc01x67 = vdupq_n_s32(0);
121 int32x4_t vacc01x89 = vdupq_n_s32(0);
122 int32x4_t vacc01xAB = vdupq_n_s32(0);
123 int32x4_t vacc01xCD = vdupq_n_s32(0);
124 int32x4_t vacc01xEF = vdupq_n_s32(0);
125 int32x4_t vacc23x01 = vdupq_n_s32(0);
126 int32x4_t vacc23x23 = vdupq_n_s32(0);
127 int32x4_t vacc23x45 = vdupq_n_s32(0);
128 int32x4_t vacc23x67 = vdupq_n_s32(0);
129 int32x4_t vacc23x89 = vdupq_n_s32(0);
130 int32x4_t vacc23xAB = vdupq_n_s32(0);
131 int32x4_t vacc23xCD = vdupq_n_s32(0);
132 int32x4_t vacc23xEF = vdupq_n_s32(0);
133 int32x4_t vacc45x01 = vdupq_n_s32(0);
134 int32x4_t vacc45x23 = vdupq_n_s32(0);
135 int32x4_t vacc45x45 = vdupq_n_s32(0);
136 int32x4_t vacc45x67 = vdupq_n_s32(0);
137 int32x4_t vacc45x89 = vdupq_n_s32(0);
138 int32x4_t vacc45xAB = vdupq_n_s32(0);
139 int32x4_t vacc45xCD = vdupq_n_s32(0);
140 int32x4_t vacc45xEF = vdupq_n_s32(0);
141
142 size_t k = bl;
143 // 2x partial unrolled loop to load 8 bytes at a time.
144
145 uint64x2x2_t va01x0123456789ABCDEF;
146 va01x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
147 va01x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
148 uint64x2x2_t va23x0123456789ABCDEF;
149 va23x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
150 va23x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
151 uint64x2x2_t va45x0123456789ABCDEF;
152 va45x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
153 va45x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
154
155 while (k >= 16 * sizeof(int8_t)) {
156 // Load a 6x16 block of activations.
157 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a0, va01x0123456789ABCDEF, 0); a0 += 16;
158 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a2, va23x0123456789ABCDEF, 0); a2 += 16;
159 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a4, va45x0123456789ABCDEF, 0); a4 += 16;
160 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a1, va01x0123456789ABCDEF, 1); a1 += 16;
161 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a3, va23x0123456789ABCDEF, 1); a3 += 16;
162 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a5, va45x0123456789ABCDEF, 1); a5 += 16;
163
164 const int8x16_t va01x01234567 = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]);
165 const int8x16_t va01x89ABCDEF = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]);
166 const int8x16_t va23x01234567 = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]);
167 const int8x16_t va23x89ABCDEF = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]);
168 const int8x16_t va45x01234567 = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]);
169 const int8x16_t va45x89ABCDEF = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]);
170
171 // Load a 16x16 block of weights.
172 const int8x16_t vb01x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
173 const int8x16_t vb23x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
174 const int8x16_t vb45x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
175 const int8x16_t vb67x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
176 const int8x16_t vb89x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
177 const int8x16_t vbABx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
178 const int8x16_t vbCDx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
179 const int8x16_t vbEFx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
180 const int8x16_t vb01x01234567 = vshlq_n_s8(vb01x0123456789ABCDEF, 4);
181 const int8x16_t vb23x01234567 = vshlq_n_s8(vb23x0123456789ABCDEF, 4);
182 const int8x16_t vb45x01234567 = vshlq_n_s8(vb45x0123456789ABCDEF, 4);
183 const int8x16_t vb67x01234567 = vshlq_n_s8(vb67x0123456789ABCDEF, 4);
184 const int8x16_t vb89x01234567 = vshlq_n_s8(vb89x0123456789ABCDEF, 4);
185 const int8x16_t vbABx01234567 = vshlq_n_s8(vbABx0123456789ABCDEF, 4);
186 const int8x16_t vbCDx01234567 = vshlq_n_s8(vbCDx0123456789ABCDEF, 4);
187 const int8x16_t vbEFx01234567 = vshlq_n_s8(vbEFx0123456789ABCDEF, 4);
188 const int8x16_t vb01x89ABCDEF = vandq_s8(vb01x0123456789ABCDEF, vmask);
189 const int8x16_t vb23x89ABCDEF = vandq_s8(vb23x0123456789ABCDEF, vmask);
190 const int8x16_t vb45x89ABCDEF = vandq_s8(vb45x0123456789ABCDEF, vmask);
191 const int8x16_t vb67x89ABCDEF = vandq_s8(vb67x0123456789ABCDEF, vmask);
192 const int8x16_t vb89x89ABCDEF = vandq_s8(vb89x0123456789ABCDEF, vmask);
193 const int8x16_t vbABx89ABCDEF = vandq_s8(vbABx0123456789ABCDEF, vmask);
194 const int8x16_t vbCDx89ABCDEF = vandq_s8(vbCDx0123456789ABCDEF, vmask);
195 const int8x16_t vbEFx89ABCDEF = vandq_s8(vbEFx0123456789ABCDEF, vmask);
196
197 // Multiply-accumulate: 6x8 * 8x16 --> 6x16.
198 vacc01x01 = vmmlaq_s32(vacc01x01, va01x01234567, vb01x01234567);
199 vacc01x23 = vmmlaq_s32(vacc01x23, va01x01234567, vb23x01234567);
200 vacc01x45 = vmmlaq_s32(vacc01x45, va01x01234567, vb45x01234567);
201 vacc01x67 = vmmlaq_s32(vacc01x67, va01x01234567, vb67x01234567);
202 vacc01x89 = vmmlaq_s32(vacc01x89, va01x01234567, vb89x01234567);
203 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x01234567, vbABx01234567);
204 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x01234567, vbCDx01234567);
205 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x01234567, vbEFx01234567);
206 vacc23x01 = vmmlaq_s32(vacc23x01, va23x01234567, vb01x01234567);
207 vacc23x23 = vmmlaq_s32(vacc23x23, va23x01234567, vb23x01234567);
208 vacc23x45 = vmmlaq_s32(vacc23x45, va23x01234567, vb45x01234567);
209 vacc23x67 = vmmlaq_s32(vacc23x67, va23x01234567, vb67x01234567);
210 vacc23x89 = vmmlaq_s32(vacc23x89, va23x01234567, vb89x01234567);
211 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x01234567, vbABx01234567);
212 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x01234567, vbCDx01234567);
213 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x01234567, vbEFx01234567);
214 vacc45x01 = vmmlaq_s32(vacc45x01, va45x01234567, vb01x01234567);
215 vacc45x23 = vmmlaq_s32(vacc45x23, va45x01234567, vb23x01234567);
216 vacc45x45 = vmmlaq_s32(vacc45x45, va45x01234567, vb45x01234567);
217 vacc45x67 = vmmlaq_s32(vacc45x67, va45x01234567, vb67x01234567);
218 vacc45x89 = vmmlaq_s32(vacc45x89, va45x01234567, vb89x01234567);
219 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x01234567, vbABx01234567);
220 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x01234567, vbCDx01234567);
221 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x01234567, vbEFx01234567);
222 vacc01x01 = vmmlaq_s32(vacc01x01, va01x89ABCDEF, vb01x89ABCDEF);
223 vacc01x23 = vmmlaq_s32(vacc01x23, va01x89ABCDEF, vb23x89ABCDEF);
224 vacc01x45 = vmmlaq_s32(vacc01x45, va01x89ABCDEF, vb45x89ABCDEF);
225 vacc01x67 = vmmlaq_s32(vacc01x67, va01x89ABCDEF, vb67x89ABCDEF);
226 vacc01x89 = vmmlaq_s32(vacc01x89, va01x89ABCDEF, vb89x89ABCDEF);
227 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x89ABCDEF, vbABx89ABCDEF);
228 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x89ABCDEF, vbCDx89ABCDEF);
229 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x89ABCDEF, vbEFx89ABCDEF);
230 vacc23x01 = vmmlaq_s32(vacc23x01, va23x89ABCDEF, vb01x89ABCDEF);
231 vacc23x23 = vmmlaq_s32(vacc23x23, va23x89ABCDEF, vb23x89ABCDEF);
232 vacc23x45 = vmmlaq_s32(vacc23x45, va23x89ABCDEF, vb45x89ABCDEF);
233 vacc23x67 = vmmlaq_s32(vacc23x67, va23x89ABCDEF, vb67x89ABCDEF);
234 vacc23x89 = vmmlaq_s32(vacc23x89, va23x89ABCDEF, vb89x89ABCDEF);
235 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x89ABCDEF, vbABx89ABCDEF);
236 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x89ABCDEF, vbCDx89ABCDEF);
237 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x89ABCDEF, vbEFx89ABCDEF);
238 vacc45x01 = vmmlaq_s32(vacc45x01, va45x89ABCDEF, vb01x89ABCDEF);
239 vacc45x23 = vmmlaq_s32(vacc45x23, va45x89ABCDEF, vb23x89ABCDEF);
240 vacc45x45 = vmmlaq_s32(vacc45x45, va45x89ABCDEF, vb45x89ABCDEF);
241 vacc45x67 = vmmlaq_s32(vacc45x67, va45x89ABCDEF, vb67x89ABCDEF);
242 vacc45x89 = vmmlaq_s32(vacc45x89, va45x89ABCDEF, vb89x89ABCDEF);
243 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x89ABCDEF, vbABx89ABCDEF);
244 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x89ABCDEF, vbCDx89ABCDEF);
245 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x89ABCDEF, vbEFx89ABCDEF);
246
247 k -= 16 * sizeof(int8_t);
248 }
249 // Handle up to 8 final positions of `k`
250 if XNN_UNLIKELY(k != 0) {
251 // Load a 6x8 block of activations.
252 uint64x2_t va01x01234567 = vld1q_dup_u64((const void*) a0); a0 += 8;
253 uint64x2_t va23x01234567 = vld1q_dup_u64((const void*) a2); a2 += 8;
254 uint64x2_t va45x01234567 = vld1q_dup_u64((const void*) a4); a4 += 8;
255 va01x01234567 = vld1q_lane_u64((const void*) a1, va01x01234567, 1); a1 += 8;
256 va23x01234567 = vld1q_lane_u64((const void*) a3, va23x01234567, 1); a3 += 8;
257 va45x01234567 = vld1q_lane_u64((const void*) a5, va45x01234567, 1); a5 += 8;
258
259 // Load a 16x16 block of weights.
260 const int8x16_t vb01x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
261 const int8x16_t vb23x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
262 const int8x16_t vb45x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
263 const int8x16_t vb67x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
264 const int8x16_t vb89x0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
265 const int8x16_t vbABx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
266 const int8x16_t vbCDx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
267 const int8x16_t vbEFx0123456789ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
268 const int8x16_t vb01x01234567 = vshlq_n_s8(vb01x0123456789ABCDEF, 4);
269 const int8x16_t vb23x01234567 = vshlq_n_s8(vb23x0123456789ABCDEF, 4);
270 const int8x16_t vb45x01234567 = vshlq_n_s8(vb45x0123456789ABCDEF, 4);
271 const int8x16_t vb67x01234567 = vshlq_n_s8(vb67x0123456789ABCDEF, 4);
272 const int8x16_t vb89x01234567 = vshlq_n_s8(vb89x0123456789ABCDEF, 4);
273 const int8x16_t vbABx01234567 = vshlq_n_s8(vbABx0123456789ABCDEF, 4);
274 const int8x16_t vbCDx01234567 = vshlq_n_s8(vbCDx0123456789ABCDEF, 4);
275 const int8x16_t vbEFx01234567 = vshlq_n_s8(vbEFx0123456789ABCDEF, 4);
276
277 // Multiply-accumulate: 6x4 * 4x16 --> 6x16.
278 vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x01234567), vb01x01234567);
279 vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x01234567), vb23x01234567);
280 vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x01234567), vb45x01234567);
281 vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x01234567), vb67x01234567);
282 vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x01234567), vb89x01234567);
283 vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x01234567), vbABx01234567);
284 vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x01234567), vbCDx01234567);
285 vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x01234567), vbEFx01234567);
286 vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x01234567), vb01x01234567);
287 vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x01234567), vb23x01234567);
288 vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x01234567), vb45x01234567);
289 vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x01234567), vb67x01234567);
290 vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x01234567), vb89x01234567);
291 vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x01234567), vbABx01234567);
292 vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x01234567), vbCDx01234567);
293 vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x01234567), vbEFx01234567);
294 vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x01234567), vb01x01234567);
295 vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x01234567), vb23x01234567);
296 vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x01234567), vb45x01234567);
297 vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x01234567), vb67x01234567);
298 vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x01234567), vb89x01234567);
299 vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x01234567), vbABx01234567);
300 vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x01234567), vbCDx01234567);
301 vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x01234567), vbEFx01234567);
302 }
303
304 int32x4_t vacc0x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
305 int32x4_t vacc1x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
306 int32x4_t vacc0x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
307 int32x4_t vacc1x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
308 int32x4_t vacc0x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
309 int32x4_t vacc1x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
310 int32x4_t vacc0xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
311 int32x4_t vacc1xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
312 int32x4_t vacc2x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
313 int32x4_t vacc3x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
314 int32x4_t vacc2x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
315 int32x4_t vacc3x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
316 int32x4_t vacc2x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
317 int32x4_t vacc3x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
318 int32x4_t vacc2xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
319 int32x4_t vacc3xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
320 int32x4_t vacc4x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
321 int32x4_t vacc5x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
322 int32x4_t vacc4x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
323 int32x4_t vacc5x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
324 int32x4_t vacc4x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
325 int32x4_t vacc5x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
326 int32x4_t vacc4xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
327 int32x4_t vacc5xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
328 const float32x4_t vfilter_output_scale0123 = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4;
329 const float32x4_t vfilter_output_scale4567 = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4;
330 const float32x4_t vfilter_output_scale89AB = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4;
331 const float32x4_t vfilter_output_scaleCDEF = vreinterpretq_f32_u32(vshll_n_u16(vld1_u16(w), 16)); w = (const uint16_t*) w + 4;
332 float32x4_t vf0x0123 = vcvtq_f32_s32(vacc0x0123);
333 vout0x0123 = vfmaq_f32(vout0x0123, vf0x0123, vfilter_output_scale0123);
334 float32x4_t vf0x4567 = vcvtq_f32_s32(vacc0x4567);
335 vout0x4567 = vfmaq_f32(vout0x4567, vf0x4567, vfilter_output_scale4567);
336 float32x4_t vf0x89AB = vcvtq_f32_s32(vacc0x89AB);
337 vout0x89AB = vfmaq_f32(vout0x89AB, vf0x89AB, vfilter_output_scale89AB);
338 float32x4_t vf0xCDEF = vcvtq_f32_s32(vacc0xCDEF);
339 vout0xCDEF = vfmaq_f32(vout0xCDEF, vf0xCDEF, vfilter_output_scaleCDEF);
340 float32x4_t vf1x0123 = vcvtq_f32_s32(vacc1x0123);
341 vout1x0123 = vfmaq_f32(vout1x0123, vf1x0123, vfilter_output_scale0123);
342 float32x4_t vf1x4567 = vcvtq_f32_s32(vacc1x4567);
343 vout1x4567 = vfmaq_f32(vout1x4567, vf1x4567, vfilter_output_scale4567);
344 float32x4_t vf1x89AB = vcvtq_f32_s32(vacc1x89AB);
345 vout1x89AB = vfmaq_f32(vout1x89AB, vf1x89AB, vfilter_output_scale89AB);
346 float32x4_t vf1xCDEF = vcvtq_f32_s32(vacc1xCDEF);
347 vout1xCDEF = vfmaq_f32(vout1xCDEF, vf1xCDEF, vfilter_output_scaleCDEF);
348 float32x4_t vf2x0123 = vcvtq_f32_s32(vacc2x0123);
349 vout2x0123 = vfmaq_f32(vout2x0123, vf2x0123, vfilter_output_scale0123);
350 float32x4_t vf2x4567 = vcvtq_f32_s32(vacc2x4567);
351 vout2x4567 = vfmaq_f32(vout2x4567, vf2x4567, vfilter_output_scale4567);
352 float32x4_t vf2x89AB = vcvtq_f32_s32(vacc2x89AB);
353 vout2x89AB = vfmaq_f32(vout2x89AB, vf2x89AB, vfilter_output_scale89AB);
354 float32x4_t vf2xCDEF = vcvtq_f32_s32(vacc2xCDEF);
355 vout2xCDEF = vfmaq_f32(vout2xCDEF, vf2xCDEF, vfilter_output_scaleCDEF);
356 float32x4_t vf3x0123 = vcvtq_f32_s32(vacc3x0123);
357 vout3x0123 = vfmaq_f32(vout3x0123, vf3x0123, vfilter_output_scale0123);
358 float32x4_t vf3x4567 = vcvtq_f32_s32(vacc3x4567);
359 vout3x4567 = vfmaq_f32(vout3x4567, vf3x4567, vfilter_output_scale4567);
360 float32x4_t vf3x89AB = vcvtq_f32_s32(vacc3x89AB);
361 vout3x89AB = vfmaq_f32(vout3x89AB, vf3x89AB, vfilter_output_scale89AB);
362 float32x4_t vf3xCDEF = vcvtq_f32_s32(vacc3xCDEF);
363 vout3xCDEF = vfmaq_f32(vout3xCDEF, vf3xCDEF, vfilter_output_scaleCDEF);
364 float32x4_t vf4x0123 = vcvtq_f32_s32(vacc4x0123);
365 vout4x0123 = vfmaq_f32(vout4x0123, vf4x0123, vfilter_output_scale0123);
366 float32x4_t vf4x4567 = vcvtq_f32_s32(vacc4x4567);
367 vout4x4567 = vfmaq_f32(vout4x4567, vf4x4567, vfilter_output_scale4567);
368 float32x4_t vf4x89AB = vcvtq_f32_s32(vacc4x89AB);
369 vout4x89AB = vfmaq_f32(vout4x89AB, vf4x89AB, vfilter_output_scale89AB);
370 float32x4_t vf4xCDEF = vcvtq_f32_s32(vacc4xCDEF);
371 vout4xCDEF = vfmaq_f32(vout4xCDEF, vf4xCDEF, vfilter_output_scaleCDEF);
372 float32x4_t vf5x0123 = vcvtq_f32_s32(vacc5x0123);
373 vout5x0123 = vfmaq_f32(vout5x0123, vf5x0123, vfilter_output_scale0123);
374 float32x4_t vf5x4567 = vcvtq_f32_s32(vacc5x4567);
375 vout5x4567 = vfmaq_f32(vout5x4567, vf5x4567, vfilter_output_scale4567);
376 float32x4_t vf5x89AB = vcvtq_f32_s32(vacc5x89AB);
377 vout5x89AB = vfmaq_f32(vout5x89AB, vf5x89AB, vfilter_output_scale89AB);
378 float32x4_t vf5xCDEF = vcvtq_f32_s32(vacc5xCDEF);
379 vout5xCDEF = vfmaq_f32(vout5xCDEF, vf5xCDEF, vfilter_output_scaleCDEF);
380 }
381
382 const float32x4_t vinput_scale01 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[0].zero_point));
383 vout0x0123 = vmulq_lane_f32(vout0x0123, vget_low_f32(vinput_scale01), 1);
384 vout1x0123 = vmulq_lane_f32(vout1x0123, vget_high_f32(vinput_scale01), 1);
385 vout0x4567 = vmulq_lane_f32(vout0x4567, vget_low_f32(vinput_scale01), 1);
386 vout1x4567 = vmulq_lane_f32(vout1x4567, vget_high_f32(vinput_scale01), 1);
387 vout0x89AB = vmulq_lane_f32(vout0x89AB, vget_low_f32(vinput_scale01), 1);
388 vout1x89AB = vmulq_lane_f32(vout1x89AB, vget_high_f32(vinput_scale01), 1);
389 vout0xCDEF = vmulq_lane_f32(vout0xCDEF, vget_low_f32(vinput_scale01), 1);
390 vout1xCDEF = vmulq_lane_f32(vout1xCDEF, vget_high_f32(vinput_scale01), 1);
391 const float32x4_t vinput_scale23 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[2].zero_point));
392 vout2x0123 = vmulq_lane_f32(vout2x0123, vget_low_f32(vinput_scale23), 1);
393 vout3x0123 = vmulq_lane_f32(vout3x0123, vget_high_f32(vinput_scale23), 1);
394 vout2x4567 = vmulq_lane_f32(vout2x4567, vget_low_f32(vinput_scale23), 1);
395 vout3x4567 = vmulq_lane_f32(vout3x4567, vget_high_f32(vinput_scale23), 1);
396 vout2x89AB = vmulq_lane_f32(vout2x89AB, vget_low_f32(vinput_scale23), 1);
397 vout3x89AB = vmulq_lane_f32(vout3x89AB, vget_high_f32(vinput_scale23), 1);
398 vout2xCDEF = vmulq_lane_f32(vout2xCDEF, vget_low_f32(vinput_scale23), 1);
399 vout3xCDEF = vmulq_lane_f32(vout3xCDEF, vget_high_f32(vinput_scale23), 1);
400 const float32x4_t vinput_scale45 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[4].zero_point));
401 vout4x0123 = vmulq_lane_f32(vout4x0123, vget_low_f32(vinput_scale45), 1);
402 vout5x0123 = vmulq_lane_f32(vout5x0123, vget_high_f32(vinput_scale45), 1);
403 vout4x4567 = vmulq_lane_f32(vout4x4567, vget_low_f32(vinput_scale45), 1);
404 vout5x4567 = vmulq_lane_f32(vout5x4567, vget_high_f32(vinput_scale45), 1);
405 vout4x89AB = vmulq_lane_f32(vout4x89AB, vget_low_f32(vinput_scale45), 1);
406 vout5x89AB = vmulq_lane_f32(vout5x89AB, vget_high_f32(vinput_scale45), 1);
407 vout4xCDEF = vmulq_lane_f32(vout4xCDEF, vget_low_f32(vinput_scale45), 1);
408 vout5xCDEF = vmulq_lane_f32(vout5xCDEF, vget_high_f32(vinput_scale45), 1);
409
410
411 const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4;
412 vout0x0123 = vaddq_f32(vbias0123, vout0x0123);
413 vout1x0123 = vaddq_f32(vbias0123, vout1x0123);
414 vout2x0123 = vaddq_f32(vbias0123, vout2x0123);
415 vout3x0123 = vaddq_f32(vbias0123, vout3x0123);
416 vout4x0123 = vaddq_f32(vbias0123, vout4x0123);
417 vout5x0123 = vaddq_f32(vbias0123, vout5x0123);
418 const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4;
419 vout0x4567 = vaddq_f32(vbias4567, vout0x4567);
420 vout1x4567 = vaddq_f32(vbias4567, vout1x4567);
421 vout2x4567 = vaddq_f32(vbias4567, vout2x4567);
422 vout3x4567 = vaddq_f32(vbias4567, vout3x4567);
423 vout4x4567 = vaddq_f32(vbias4567, vout4x4567);
424 vout5x4567 = vaddq_f32(vbias4567, vout5x4567);
425 const float32x4_t vbias89AB = vld1q_f32(w); w = (const float*) w + 4;
426 vout0x89AB = vaddq_f32(vbias89AB, vout0x89AB);
427 vout1x89AB = vaddq_f32(vbias89AB, vout1x89AB);
428 vout2x89AB = vaddq_f32(vbias89AB, vout2x89AB);
429 vout3x89AB = vaddq_f32(vbias89AB, vout3x89AB);
430 vout4x89AB = vaddq_f32(vbias89AB, vout4x89AB);
431 vout5x89AB = vaddq_f32(vbias89AB, vout5x89AB);
432 const float32x4_t vbiasCDEF = vld1q_f32(w); w = (const float*) w + 4;
433 vout0xCDEF = vaddq_f32(vbiasCDEF, vout0xCDEF);
434 vout1xCDEF = vaddq_f32(vbiasCDEF, vout1xCDEF);
435 vout2xCDEF = vaddq_f32(vbiasCDEF, vout2xCDEF);
436 vout3xCDEF = vaddq_f32(vbiasCDEF, vout3xCDEF);
437 vout4xCDEF = vaddq_f32(vbiasCDEF, vout4xCDEF);
438 vout5xCDEF = vaddq_f32(vbiasCDEF, vout5xCDEF);
439
440 const float32x4_t voutput_min = vld1q_dup_f32(&params->scalar.min);
441 vout0x0123 = vmaxq_f32(vout0x0123, voutput_min);
442 vout0x4567 = vmaxq_f32(vout0x4567, voutput_min);
443 vout0x89AB = vmaxq_f32(vout0x89AB, voutput_min);
444 vout0xCDEF = vmaxq_f32(vout0xCDEF, voutput_min);
445 vout1x0123 = vmaxq_f32(vout1x0123, voutput_min);
446 vout1x4567 = vmaxq_f32(vout1x4567, voutput_min);
447 vout1x89AB = vmaxq_f32(vout1x89AB, voutput_min);
448 vout1xCDEF = vmaxq_f32(vout1xCDEF, voutput_min);
449 vout2x0123 = vmaxq_f32(vout2x0123, voutput_min);
450 vout2x4567 = vmaxq_f32(vout2x4567, voutput_min);
451 vout2x89AB = vmaxq_f32(vout2x89AB, voutput_min);
452 vout2xCDEF = vmaxq_f32(vout2xCDEF, voutput_min);
453 vout3x0123 = vmaxq_f32(vout3x0123, voutput_min);
454 vout3x4567 = vmaxq_f32(vout3x4567, voutput_min);
455 vout3x89AB = vmaxq_f32(vout3x89AB, voutput_min);
456 vout3xCDEF = vmaxq_f32(vout3xCDEF, voutput_min);
457 vout4x0123 = vmaxq_f32(vout4x0123, voutput_min);
458 vout4x4567 = vmaxq_f32(vout4x4567, voutput_min);
459 vout4x89AB = vmaxq_f32(vout4x89AB, voutput_min);
460 vout4xCDEF = vmaxq_f32(vout4xCDEF, voutput_min);
461 vout5x0123 = vmaxq_f32(vout5x0123, voutput_min);
462 vout5x4567 = vmaxq_f32(vout5x4567, voutput_min);
463 vout5x89AB = vmaxq_f32(vout5x89AB, voutput_min);
464 vout5xCDEF = vmaxq_f32(vout5xCDEF, voutput_min);
465
466 const float32x4_t voutput_max = vld1q_dup_f32(&params->scalar.max);
467 vout0x0123 = vminq_f32(vout0x0123, voutput_max);
468 vout0x4567 = vminq_f32(vout0x4567, voutput_max);
469 vout0x89AB = vminq_f32(vout0x89AB, voutput_max);
470 vout0xCDEF = vminq_f32(vout0xCDEF, voutput_max);
471 vout1x0123 = vminq_f32(vout1x0123, voutput_max);
472 vout1x4567 = vminq_f32(vout1x4567, voutput_max);
473 vout1x89AB = vminq_f32(vout1x89AB, voutput_max);
474 vout1xCDEF = vminq_f32(vout1xCDEF, voutput_max);
475 vout2x0123 = vminq_f32(vout2x0123, voutput_max);
476 vout2x4567 = vminq_f32(vout2x4567, voutput_max);
477 vout2x89AB = vminq_f32(vout2x89AB, voutput_max);
478 vout2xCDEF = vminq_f32(vout2xCDEF, voutput_max);
479 vout3x0123 = vminq_f32(vout3x0123, voutput_max);
480 vout3x4567 = vminq_f32(vout3x4567, voutput_max);
481 vout3x89AB = vminq_f32(vout3x89AB, voutput_max);
482 vout3xCDEF = vminq_f32(vout3xCDEF, voutput_max);
483 vout4x0123 = vminq_f32(vout4x0123, voutput_max);
484 vout4x4567 = vminq_f32(vout4x4567, voutput_max);
485 vout4x89AB = vminq_f32(vout4x89AB, voutput_max);
486 vout4xCDEF = vminq_f32(vout4xCDEF, voutput_max);
487 vout5x0123 = vminq_f32(vout5x0123, voutput_max);
488 vout5x4567 = vminq_f32(vout5x4567, voutput_max);
489 vout5x89AB = vminq_f32(vout5x89AB, voutput_max);
490 vout5xCDEF = vminq_f32(vout5xCDEF, voutput_max);
491
492 if XNN_LIKELY(nc >= 16) {
493 vst1q_f32(c0, vout0x0123);
494 vst1q_f32(c0 + 4, vout0x4567);
495 vst1q_f32(c0 + 8, vout0x89AB);
496 vst1q_f32(c0 + 12, vout0xCDEF);
497 vst1q_f32(c1, vout1x0123);
498 vst1q_f32(c1 + 4, vout1x4567);
499 vst1q_f32(c1 + 8, vout1x89AB);
500 vst1q_f32(c1 + 12, vout1xCDEF);
501 vst1q_f32(c2, vout2x0123);
502 vst1q_f32(c2 + 4, vout2x4567);
503 vst1q_f32(c2 + 8, vout2x89AB);
504 vst1q_f32(c2 + 12, vout2xCDEF);
505 vst1q_f32(c3, vout3x0123);
506 vst1q_f32(c3 + 4, vout3x4567);
507 vst1q_f32(c3 + 8, vout3x89AB);
508 vst1q_f32(c3 + 12, vout3xCDEF);
509 vst1q_f32(c4, vout4x0123);
510 vst1q_f32(c4 + 4, vout4x4567);
511 vst1q_f32(c4 + 8, vout4x89AB);
512 vst1q_f32(c4 + 12, vout4xCDEF);
513 vst1q_f32(c5, vout5x0123);
514 vst1q_f32(c5 + 4, vout5x4567);
515 vst1q_f32(c5 + 8, vout5x89AB);
516 vst1q_f32(c5 + 12, vout5xCDEF);
517
518 a0 = (const int8_t*) ((uintptr_t) a0 - kc);
519 a1 = (const int8_t*) ((uintptr_t) a1 - kc);
520 a2 = (const int8_t*) ((uintptr_t) a2 - kc);
521 a3 = (const int8_t*) ((uintptr_t) a3 - kc);
522 a4 = (const int8_t*) ((uintptr_t) a4 - kc);
523 a5 = (const int8_t*) ((uintptr_t) a5 - kc);
524
525 c0 = (float*) ((uintptr_t) c0 + cn_stride);
526 c1 = (float*) ((uintptr_t) c1 + cn_stride);
527 c2 = (float*) ((uintptr_t) c2 + cn_stride);
528 c3 = (float*) ((uintptr_t) c3 + cn_stride);
529 c4 = (float*) ((uintptr_t) c4 + cn_stride);
530 c5 = (float*) ((uintptr_t) c5 + cn_stride);
531
532 nc -= 16;
533 } else {
534 if (nc & 8) {
535 vst1q_f32(c0, vout0x0123); c0 += 4;
536 vout0x0123 = vout0x89AB;
537 vst1q_f32(c1, vout1x0123); c1 += 4;
538 vout1x0123 = vout1x89AB;
539 vst1q_f32(c2, vout2x0123); c2 += 4;
540 vout2x0123 = vout2x89AB;
541 vst1q_f32(c3, vout3x0123); c3 += 4;
542 vout3x0123 = vout3x89AB;
543 vst1q_f32(c4, vout4x0123); c4 += 4;
544 vout4x0123 = vout4x89AB;
545 vst1q_f32(c5, vout5x0123); c5 += 4;
546 vout5x0123 = vout5x89AB;
547 vst1q_f32(c0, vout0x4567); c0 += 4;
548 vout0x4567 = vout0xCDEF;
549 vst1q_f32(c1, vout1x4567); c1 += 4;
550 vout1x4567 = vout1xCDEF;
551 vst1q_f32(c2, vout2x4567); c2 += 4;
552 vout2x4567 = vout2xCDEF;
553 vst1q_f32(c3, vout3x4567); c3 += 4;
554 vout3x4567 = vout3xCDEF;
555 vst1q_f32(c4, vout4x4567); c4 += 4;
556 vout4x4567 = vout4xCDEF;
557 vst1q_f32(c5, vout5x4567); c5 += 4;
558 vout5x4567 = vout5xCDEF;
559 }
560 if (nc & 4) {
561 vst1q_f32(c0, vout0x0123); c0 += 4;
562 vout0x0123 = vout0x4567;
563 vst1q_f32(c1, vout1x0123); c1 += 4;
564 vout1x0123 = vout1x4567;
565 vst1q_f32(c2, vout2x0123); c2 += 4;
566 vout2x0123 = vout2x4567;
567 vst1q_f32(c3, vout3x0123); c3 += 4;
568 vout3x0123 = vout3x4567;
569 vst1q_f32(c4, vout4x0123); c4 += 4;
570 vout4x0123 = vout4x4567;
571 vst1q_f32(c5, vout5x0123); c5 += 4;
572 vout5x0123 = vout5x4567;
573 }
574 float32x2_t vout0x01 = vget_low_f32(vout0x0123);
575 float32x2_t vout1x01 = vget_low_f32(vout1x0123);
576 float32x2_t vout2x01 = vget_low_f32(vout2x0123);
577 float32x2_t vout3x01 = vget_low_f32(vout3x0123);
578 float32x2_t vout4x01 = vget_low_f32(vout4x0123);
579 float32x2_t vout5x01 = vget_low_f32(vout5x0123);
580 if (nc & 2) {
581 vst1_f32(c0, vout0x01); c0 += 2;
582 vst1_f32(c1, vout1x01); c1 += 2;
583 vst1_f32(c2, vout2x01); c2 += 2;
584 vst1_f32(c3, vout3x01); c3 += 2;
585 vst1_f32(c4, vout4x01); c4 += 2;
586 vst1_f32(c5, vout5x01); c5 += 2;
587 vout0x01 = vget_high_f32(vout0x0123);
588 vout1x01 = vget_high_f32(vout1x0123);
589 vout2x01 = vget_high_f32(vout2x0123);
590 vout3x01 = vget_high_f32(vout3x0123);
591 vout4x01 = vget_high_f32(vout4x0123);
592 vout5x01 = vget_high_f32(vout5x0123);
593 }
594 if (nc & 1) {
595 vst1_lane_f32(c0, vout0x01, 0);
596 vst1_lane_f32(c1, vout1x01, 0);
597 vst1_lane_f32(c2, vout2x01, 0);
598 vst1_lane_f32(c3, vout3x01, 0);
599 vst1_lane_f32(c4, vout4x01, 0);
600 vst1_lane_f32(c5, vout5x01, 0);
601 }
602 nc = 0;
603 }
604 } while (nc != 0);
605 }