Debian Codegraph @

src/qd8-f32-qc8w-gemm/gen/qd8-f32-qc8w-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_qc8w_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 union xnn_f32_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 const int8_t* a0 = a;
42 float* c0 = c;
43 const int8_t* a1 = (const int8_t*) ((uintptr_t) a0 + a_stride);
44 float* c1 = (float*) ((uintptr_t) c0 + cm_stride);
45 if XNN_UNPREDICTABLE(mr < 2) {
46 a1 = a0;
47 c1 = c0;
48 }
49 const int8_t* a2 = (const int8_t*) ((uintptr_t) a1 + a_stride);
50 float* c2 = (float*) ((uintptr_t) c1 + cm_stride);
51 if XNN_UNPREDICTABLE(mr <= 2) {
52 a2 = a1;
53 c2 = c1;
54 }
55 const int8_t* a3 = (const int8_t*) ((uintptr_t) a2 + a_stride);
56 float* c3 = (float*) ((uintptr_t) c2 + cm_stride);
57 if XNN_UNPREDICTABLE(mr < 4) {
58 a3 = a2;
59 c3 = c2;
60 }
61 const int8_t* a4 = (const int8_t*) ((uintptr_t) a3 + a_stride);
62 float* c4 = (float*) ((uintptr_t) c3 + cm_stride);
63 if XNN_UNPREDICTABLE(mr <= 4) {
64 a4 = a3;
65 c4 = c3;
66 }
67 const int8_t* a5 = (const int8_t*) ((uintptr_t) a4 + a_stride);
68 float* c5 = (float*) ((uintptr_t) c4 + cm_stride);
69 if XNN_UNPREDICTABLE(mr != 6) {
70 a5 = a4;
71 c5 = c4;
72 }
73
74 // Loop over groups of 16 columns.
75 do {
76 // Initialize accumulators with bias. 16 bias values are loaded from the
77 // weight matrix, at the start of the group of 16 columns.
78 const int32x4_t vinput_zero_point01 = vld1q_s32(&quantization_params[0].zero_point);
79 const int32x4_t vksum0123 = vld1q_s32(w); w = (const int32_t*) w + 4;
80 const int32x4_t vksumzp0x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point01), 0);
81 const int32x4_t vksumzp1x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point01), 0);
82 const int32x4_t vksum4567 = vld1q_s32(w); w = (const int32_t*) w + 4;
83 const int32x4_t vksumzp0x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point01), 0);
84 const int32x4_t vksumzp1x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point01), 0);
85 const int32x4_t vksum89AB = vld1q_s32(w); w = (const int32_t*) w + 4;
86 const int32x4_t vksumzp0x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point01), 0);
87 const int32x4_t vksumzp1x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point01), 0);
88 const int32x4_t vksumCDEF = vld1q_s32(w); w = (const int32_t*) w + 4;
89 const int32x4_t vksumzp0xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point01), 0);
90 const int32x4_t vksumzp1xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point01), 0);
91 const int32x4_t vinput_zero_point23 = vld1q_s32(&quantization_params[2].zero_point);
92 const int32x4_t vksumzp2x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point23), 0);
93 const int32x4_t vksumzp3x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point23), 0);
94 const int32x4_t vksumzp2x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point23), 0);
95 const int32x4_t vksumzp3x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point23), 0);
96 const int32x4_t vksumzp2x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point23), 0);
97 const int32x4_t vksumzp3x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point23), 0);
98 const int32x4_t vksumzp2xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point23), 0);
99 const int32x4_t vksumzp3xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point23), 0);
100 const int32x4_t vinput_zero_point45 = vld1q_s32(&quantization_params[4].zero_point);
101 const int32x4_t vksumzp4x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point45), 0);
102 const int32x4_t vksumzp5x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point45), 0);
103 const int32x4_t vksumzp4x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point45), 0);
104 const int32x4_t vksumzp5x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point45), 0);
105 const int32x4_t vksumzp4x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point45), 0);
106 const int32x4_t vksumzp5x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point45), 0);
107 const int32x4_t vksumzp4xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point45), 0);
108 const int32x4_t vksumzp5xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point45), 0);
109
110 int32x4_t vacc01x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x0123), vreinterpretq_u64_s32(vksumzp1x0123)));
111 int32x4_t vacc01x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x0123), vreinterpretq_u64_s32(vksumzp1x0123)));
112 int32x4_t vacc01x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x4567), vreinterpretq_u64_s32(vksumzp1x4567)));
113 int32x4_t vacc01x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x4567), vreinterpretq_u64_s32(vksumzp1x4567)));
114 int32x4_t vacc01x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x89AB), vreinterpretq_u64_s32(vksumzp1x89AB)));
115 int32x4_t vacc01xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x89AB), vreinterpretq_u64_s32(vksumzp1x89AB)));
116 int32x4_t vacc01xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xCDEF), vreinterpretq_u64_s32(vksumzp1xCDEF)));
117 int32x4_t vacc01xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xCDEF), vreinterpretq_u64_s32(vksumzp1xCDEF)));
118 int32x4_t vacc23x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x0123), vreinterpretq_u64_s32(vksumzp3x0123)));
119 int32x4_t vacc23x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x0123), vreinterpretq_u64_s32(vksumzp3x0123)));
120 int32x4_t vacc23x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x4567), vreinterpretq_u64_s32(vksumzp3x4567)));
121 int32x4_t vacc23x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x4567), vreinterpretq_u64_s32(vksumzp3x4567)));
122 int32x4_t vacc23x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x89AB), vreinterpretq_u64_s32(vksumzp3x89AB)));
123 int32x4_t vacc23xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x89AB), vreinterpretq_u64_s32(vksumzp3x89AB)));
124 int32x4_t vacc23xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xCDEF), vreinterpretq_u64_s32(vksumzp3xCDEF)));
125 int32x4_t vacc23xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xCDEF), vreinterpretq_u64_s32(vksumzp3xCDEF)));
126 int32x4_t vacc45x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x0123), vreinterpretq_u64_s32(vksumzp5x0123)));
127 int32x4_t vacc45x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x0123), vreinterpretq_u64_s32(vksumzp5x0123)));
128 int32x4_t vacc45x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x4567), vreinterpretq_u64_s32(vksumzp5x4567)));
129 int32x4_t vacc45x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x4567), vreinterpretq_u64_s32(vksumzp5x4567)));
130 int32x4_t vacc45x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x89AB), vreinterpretq_u64_s32(vksumzp5x89AB)));
131 int32x4_t vacc45xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x89AB), vreinterpretq_u64_s32(vksumzp5x89AB)));
132 int32x4_t vacc45xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xCDEF), vreinterpretq_u64_s32(vksumzp5xCDEF)));
133 int32x4_t vacc45xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xCDEF), vreinterpretq_u64_s32(vksumzp5xCDEF)));
134
135 // Inner accumulation loop along the 16 columns.
136 size_t k = kc;
137 // 2x partial unrolled loop to load 8 bytes at a time.
138
139 uint64x2x2_t va01x0123456789ABCDEF;
140 va01x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
141 va01x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
142 uint64x2x2_t va23x0123456789ABCDEF;
143 va23x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
144 va23x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
145 uint64x2x2_t va45x0123456789ABCDEF;
146 va45x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
147 va45x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
148
149 while (k >= 16 * sizeof(int8_t)) {
150 // Load a 6x16 block of activations.
151 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a0, va01x0123456789ABCDEF, 0); a0 += 16;
152 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a2, va23x0123456789ABCDEF, 0); a2 += 16;
153 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a4, va45x0123456789ABCDEF, 0); a4 += 16;
154 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a1, va01x0123456789ABCDEF, 1); a1 += 16;
155 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a3, va23x0123456789ABCDEF, 1); a3 += 16;
156 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a5, va45x0123456789ABCDEF, 1); a5 += 16;
157
158 const int8x16_t va01x01234567 = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]);
159 const int8x16_t va01x89ABCDEF = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]);
160 const int8x16_t va23x01234567 = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]);
161 const int8x16_t va23x89ABCDEF = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]);
162 const int8x16_t va45x01234567 = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]);
163 const int8x16_t va45x89ABCDEF = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]);
164
165 // Load a 16x16 block of weights.
166 const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
167 const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
168 const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
169 const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
170 const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
171 const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
172 const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
173 const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
174 const int8x16_t vb01x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
175 const int8x16_t vb23x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
176 const int8x16_t vb45x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
177 const int8x16_t vb67x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
178 const int8x16_t vb89x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
179 const int8x16_t vbABx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
180 const int8x16_t vbCDx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
181 const int8x16_t vbEFx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
182
183 // Multiply-accumulate: 6x8 * 8x16 --> 6x16.
184 vacc01x01 = vmmlaq_s32(vacc01x01, va01x01234567, vb01x01234567);
185 vacc01x23 = vmmlaq_s32(vacc01x23, va01x01234567, vb23x01234567);
186 vacc01x45 = vmmlaq_s32(vacc01x45, va01x01234567, vb45x01234567);
187 vacc01x67 = vmmlaq_s32(vacc01x67, va01x01234567, vb67x01234567);
188 vacc01x89 = vmmlaq_s32(vacc01x89, va01x01234567, vb89x01234567);
189 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x01234567, vbABx01234567);
190 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x01234567, vbCDx01234567);
191 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x01234567, vbEFx01234567);
192 vacc23x01 = vmmlaq_s32(vacc23x01, va23x01234567, vb01x01234567);
193 vacc23x23 = vmmlaq_s32(vacc23x23, va23x01234567, vb23x01234567);
194 vacc23x45 = vmmlaq_s32(vacc23x45, va23x01234567, vb45x01234567);
195 vacc23x67 = vmmlaq_s32(vacc23x67, va23x01234567, vb67x01234567);
196 vacc23x89 = vmmlaq_s32(vacc23x89, va23x01234567, vb89x01234567);
197 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x01234567, vbABx01234567);
198 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x01234567, vbCDx01234567);
199 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x01234567, vbEFx01234567);
200 vacc45x01 = vmmlaq_s32(vacc45x01, va45x01234567, vb01x01234567);
201 vacc45x23 = vmmlaq_s32(vacc45x23, va45x01234567, vb23x01234567);
202 vacc45x45 = vmmlaq_s32(vacc45x45, va45x01234567, vb45x01234567);
203 vacc45x67 = vmmlaq_s32(vacc45x67, va45x01234567, vb67x01234567);
204 vacc45x89 = vmmlaq_s32(vacc45x89, va45x01234567, vb89x01234567);
205 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x01234567, vbABx01234567);
206 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x01234567, vbCDx01234567);
207 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x01234567, vbEFx01234567);
208 vacc01x01 = vmmlaq_s32(vacc01x01, va01x89ABCDEF, vb01x89ABCDEF);
209 vacc01x23 = vmmlaq_s32(vacc01x23, va01x89ABCDEF, vb23x89ABCDEF);
210 vacc01x45 = vmmlaq_s32(vacc01x45, va01x89ABCDEF, vb45x89ABCDEF);
211 vacc01x67 = vmmlaq_s32(vacc01x67, va01x89ABCDEF, vb67x89ABCDEF);
212 vacc01x89 = vmmlaq_s32(vacc01x89, va01x89ABCDEF, vb89x89ABCDEF);
213 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x89ABCDEF, vbABx89ABCDEF);
214 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x89ABCDEF, vbCDx89ABCDEF);
215 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x89ABCDEF, vbEFx89ABCDEF);
216 vacc23x01 = vmmlaq_s32(vacc23x01, va23x89ABCDEF, vb01x89ABCDEF);
217 vacc23x23 = vmmlaq_s32(vacc23x23, va23x89ABCDEF, vb23x89ABCDEF);
218 vacc23x45 = vmmlaq_s32(vacc23x45, va23x89ABCDEF, vb45x89ABCDEF);
219 vacc23x67 = vmmlaq_s32(vacc23x67, va23x89ABCDEF, vb67x89ABCDEF);
220 vacc23x89 = vmmlaq_s32(vacc23x89, va23x89ABCDEF, vb89x89ABCDEF);
221 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x89ABCDEF, vbABx89ABCDEF);
222 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x89ABCDEF, vbCDx89ABCDEF);
223 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x89ABCDEF, vbEFx89ABCDEF);
224 vacc45x01 = vmmlaq_s32(vacc45x01, va45x89ABCDEF, vb01x89ABCDEF);
225 vacc45x23 = vmmlaq_s32(vacc45x23, va45x89ABCDEF, vb23x89ABCDEF);
226 vacc45x45 = vmmlaq_s32(vacc45x45, va45x89ABCDEF, vb45x89ABCDEF);
227 vacc45x67 = vmmlaq_s32(vacc45x67, va45x89ABCDEF, vb67x89ABCDEF);
228 vacc45x89 = vmmlaq_s32(vacc45x89, va45x89ABCDEF, vb89x89ABCDEF);
229 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x89ABCDEF, vbABx89ABCDEF);
230 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x89ABCDEF, vbCDx89ABCDEF);
231 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x89ABCDEF, vbEFx89ABCDEF);
232
233 k -= 16 * sizeof(int8_t);
234 }
235 // Handle up to 8 final positions of `k`
236 if XNN_UNLIKELY(k != 0) {
237 // Load a 6x8 block of activations.
238 uint64x2_t va01x01234567 = vld1q_dup_u64((const void*) a0); a0 += 8;
239 uint64x2_t va23x01234567 = vld1q_dup_u64((const void*) a2); a2 += 8;
240 uint64x2_t va45x01234567 = vld1q_dup_u64((const void*) a4); a4 += 8;
241 va01x01234567 = vld1q_lane_u64((const void*) a1, va01x01234567, 1); a1 += 8;
242 va23x01234567 = vld1q_lane_u64((const void*) a3, va23x01234567, 1); a3 += 8;
243 va45x01234567 = vld1q_lane_u64((const void*) a5, va45x01234567, 1); a5 += 8;
244
245 // Load a 16x16 block of weights.
246 const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
247 const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
248 const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
249 const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
250 const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
251 const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
252 const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
253 const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
254
255 // Multiply-accumulate: 6x4 * 4x16 --> 6x16.
256 vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x01234567), vb01x01234567);
257 vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x01234567), vb23x01234567);
258 vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x01234567), vb45x01234567);
259 vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x01234567), vb67x01234567);
260 vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x01234567), vb89x01234567);
261 vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x01234567), vbABx01234567);
262 vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x01234567), vbCDx01234567);
263 vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x01234567), vbEFx01234567);
264 vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x01234567), vb01x01234567);
265 vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x01234567), vb23x01234567);
266 vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x01234567), vb45x01234567);
267 vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x01234567), vb67x01234567);
268 vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x01234567), vb89x01234567);
269 vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x01234567), vbABx01234567);
270 vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x01234567), vbCDx01234567);
271 vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x01234567), vbEFx01234567);
272 vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x01234567), vb01x01234567);
273 vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x01234567), vb23x01234567);
274 vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x01234567), vb45x01234567);
275 vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x01234567), vb67x01234567);
276 vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x01234567), vb89x01234567);
277 vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x01234567), vbABx01234567);
278 vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x01234567), vbCDx01234567);
279 vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x01234567), vbEFx01234567);
280 }
281
282 int32x4_t vacc0x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
283 int32x4_t vacc1x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
284 int32x4_t vacc0x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
285 int32x4_t vacc1x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
286 int32x4_t vacc0x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
287 int32x4_t vacc1x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
288 int32x4_t vacc0xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
289 int32x4_t vacc1xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
290 int32x4_t vacc2x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
291 int32x4_t vacc3x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
292 int32x4_t vacc2x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
293 int32x4_t vacc3x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
294 int32x4_t vacc2x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
295 int32x4_t vacc3x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
296 int32x4_t vacc2xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
297 int32x4_t vacc3xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
298 int32x4_t vacc4x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
299 int32x4_t vacc5x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
300 int32x4_t vacc4x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
301 int32x4_t vacc5x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
302 int32x4_t vacc4x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
303 int32x4_t vacc5x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
304 int32x4_t vacc4xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
305 int32x4_t vacc5xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
306 float32x4_t vout0x0123 = vcvtq_f32_s32(vacc0x0123);
307 float32x4_t vout0x4567 = vcvtq_f32_s32(vacc0x4567);
308 float32x4_t vout0x89AB = vcvtq_f32_s32(vacc0x89AB);
309 float32x4_t vout0xCDEF = vcvtq_f32_s32(vacc0xCDEF);
310 float32x4_t vout1x0123 = vcvtq_f32_s32(vacc1x0123);
311 float32x4_t vout1x4567 = vcvtq_f32_s32(vacc1x4567);
312 float32x4_t vout1x89AB = vcvtq_f32_s32(vacc1x89AB);
313 float32x4_t vout1xCDEF = vcvtq_f32_s32(vacc1xCDEF);
314 float32x4_t vout2x0123 = vcvtq_f32_s32(vacc2x0123);
315 float32x4_t vout2x4567 = vcvtq_f32_s32(vacc2x4567);
316 float32x4_t vout2x89AB = vcvtq_f32_s32(vacc2x89AB);
317 float32x4_t vout2xCDEF = vcvtq_f32_s32(vacc2xCDEF);
318 float32x4_t vout3x0123 = vcvtq_f32_s32(vacc3x0123);
319 float32x4_t vout3x4567 = vcvtq_f32_s32(vacc3x4567);
320 float32x4_t vout3x89AB = vcvtq_f32_s32(vacc3x89AB);
321 float32x4_t vout3xCDEF = vcvtq_f32_s32(vacc3xCDEF);
322 float32x4_t vout4x0123 = vcvtq_f32_s32(vacc4x0123);
323 float32x4_t vout4x4567 = vcvtq_f32_s32(vacc4x4567);
324 float32x4_t vout4x89AB = vcvtq_f32_s32(vacc4x89AB);
325 float32x4_t vout4xCDEF = vcvtq_f32_s32(vacc4xCDEF);
326 float32x4_t vout5x0123 = vcvtq_f32_s32(vacc5x0123);
327 float32x4_t vout5x4567 = vcvtq_f32_s32(vacc5x4567);
328 float32x4_t vout5x89AB = vcvtq_f32_s32(vacc5x89AB);
329 float32x4_t vout5xCDEF = vcvtq_f32_s32(vacc5xCDEF);
330
331 const float32x4_t vinput_scale01 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[0].zero_point));
332 vout0x0123 = vmulq_lane_f32(vout0x0123, vget_low_f32(vinput_scale01), 1);
333 vout1x0123 = vmulq_lane_f32(vout1x0123, vget_high_f32(vinput_scale01), 1);
334 vout0x4567 = vmulq_lane_f32(vout0x4567, vget_low_f32(vinput_scale01), 1);
335 vout1x4567 = vmulq_lane_f32(vout1x4567, vget_high_f32(vinput_scale01), 1);
336 vout0x89AB = vmulq_lane_f32(vout0x89AB, vget_low_f32(vinput_scale01), 1);
337 vout1x89AB = vmulq_lane_f32(vout1x89AB, vget_high_f32(vinput_scale01), 1);
338 vout0xCDEF = vmulq_lane_f32(vout0xCDEF, vget_low_f32(vinput_scale01), 1);
339 vout1xCDEF = vmulq_lane_f32(vout1xCDEF, vget_high_f32(vinput_scale01), 1);
340 const float32x4_t vinput_scale23 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[2].zero_point));
341 vout2x0123 = vmulq_lane_f32(vout2x0123, vget_low_f32(vinput_scale23), 1);
342 vout3x0123 = vmulq_lane_f32(vout3x0123, vget_high_f32(vinput_scale23), 1);
343 vout2x4567 = vmulq_lane_f32(vout2x4567, vget_low_f32(vinput_scale23), 1);
344 vout3x4567 = vmulq_lane_f32(vout3x4567, vget_high_f32(vinput_scale23), 1);
345 vout2x89AB = vmulq_lane_f32(vout2x89AB, vget_low_f32(vinput_scale23), 1);
346 vout3x89AB = vmulq_lane_f32(vout3x89AB, vget_high_f32(vinput_scale23), 1);
347 vout2xCDEF = vmulq_lane_f32(vout2xCDEF, vget_low_f32(vinput_scale23), 1);
348 vout3xCDEF = vmulq_lane_f32(vout3xCDEF, vget_high_f32(vinput_scale23), 1);
349 const float32x4_t vinput_scale45 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[4].zero_point));
350 vout4x0123 = vmulq_lane_f32(vout4x0123, vget_low_f32(vinput_scale45), 1);
351 vout5x0123 = vmulq_lane_f32(vout5x0123, vget_high_f32(vinput_scale45), 1);
352 vout4x4567 = vmulq_lane_f32(vout4x4567, vget_low_f32(vinput_scale45), 1);
353 vout5x4567 = vmulq_lane_f32(vout5x4567, vget_high_f32(vinput_scale45), 1);
354 vout4x89AB = vmulq_lane_f32(vout4x89AB, vget_low_f32(vinput_scale45), 1);
355 vout5x89AB = vmulq_lane_f32(vout5x89AB, vget_high_f32(vinput_scale45), 1);
356 vout4xCDEF = vmulq_lane_f32(vout4xCDEF, vget_low_f32(vinput_scale45), 1);
357 vout5xCDEF = vmulq_lane_f32(vout5xCDEF, vget_high_f32(vinput_scale45), 1);
358
359 const float32x4_t vfilter_output_scale0123 = vld1q_f32(w); w = (const float*) w + 4;
360 const float32x4_t vfilter_output_scale4567 = vld1q_f32(w); w = (const float*) w + 4;
361 const float32x4_t vfilter_output_scale89AB = vld1q_f32(w); w = (const float*) w + 4;
362 const float32x4_t vfilter_output_scaleCDEF = vld1q_f32(w); w = (const float*) w + 4;
363
364 const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4;
365 vout0x0123 = vfmaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
366 vout1x0123 = vfmaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
367 vout2x0123 = vfmaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
368 vout3x0123 = vfmaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
369 vout4x0123 = vfmaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
370 vout5x0123 = vfmaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
371 const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4;
372 vout0x4567 = vfmaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
373 vout1x4567 = vfmaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
374 vout2x4567 = vfmaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
375 vout3x4567 = vfmaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
376 vout4x4567 = vfmaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
377 vout5x4567 = vfmaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
378 const float32x4_t vbias89AB = vld1q_f32(w); w = (const float*) w + 4;
379 vout0x89AB = vfmaq_f32(vbias89AB, vout0x89AB, vfilter_output_scale89AB);
380 vout1x89AB = vfmaq_f32(vbias89AB, vout1x89AB, vfilter_output_scale89AB);
381 vout2x89AB = vfmaq_f32(vbias89AB, vout2x89AB, vfilter_output_scale89AB);
382 vout3x89AB = vfmaq_f32(vbias89AB, vout3x89AB, vfilter_output_scale89AB);
383 vout4x89AB = vfmaq_f32(vbias89AB, vout4x89AB, vfilter_output_scale89AB);
384 vout5x89AB = vfmaq_f32(vbias89AB, vout5x89AB, vfilter_output_scale89AB);
385 const float32x4_t vbiasCDEF = vld1q_f32(w); w = (const float*) w + 4;
386 vout0xCDEF = vfmaq_f32(vbiasCDEF, vout0xCDEF, vfilter_output_scaleCDEF);
387 vout1xCDEF = vfmaq_f32(vbiasCDEF, vout1xCDEF, vfilter_output_scaleCDEF);
388 vout2xCDEF = vfmaq_f32(vbiasCDEF, vout2xCDEF, vfilter_output_scaleCDEF);
389 vout3xCDEF = vfmaq_f32(vbiasCDEF, vout3xCDEF, vfilter_output_scaleCDEF);
390 vout4xCDEF = vfmaq_f32(vbiasCDEF, vout4xCDEF, vfilter_output_scaleCDEF);
391 vout5xCDEF = vfmaq_f32(vbiasCDEF, vout5xCDEF, vfilter_output_scaleCDEF);
392
393 const float32x4_t voutput_min = vld1q_dup_f32(&params->scalar.min);
394 vout0x0123 = vmaxq_f32(vout0x0123, voutput_min);
395 vout0x4567 = vmaxq_f32(vout0x4567, voutput_min);
396 vout0x89AB = vmaxq_f32(vout0x89AB, voutput_min);
397 vout0xCDEF = vmaxq_f32(vout0xCDEF, voutput_min);
398 vout1x0123 = vmaxq_f32(vout1x0123, voutput_min);
399 vout1x4567 = vmaxq_f32(vout1x4567, voutput_min);
400 vout1x89AB = vmaxq_f32(vout1x89AB, voutput_min);
401 vout1xCDEF = vmaxq_f32(vout1xCDEF, voutput_min);
402 vout2x0123 = vmaxq_f32(vout2x0123, voutput_min);
403 vout2x4567 = vmaxq_f32(vout2x4567, voutput_min);
404 vout2x89AB = vmaxq_f32(vout2x89AB, voutput_min);
405 vout2xCDEF = vmaxq_f32(vout2xCDEF, voutput_min);
406 vout3x0123 = vmaxq_f32(vout3x0123, voutput_min);
407 vout3x4567 = vmaxq_f32(vout3x4567, voutput_min);
408 vout3x89AB = vmaxq_f32(vout3x89AB, voutput_min);
409 vout3xCDEF = vmaxq_f32(vout3xCDEF, voutput_min);
410 vout4x0123 = vmaxq_f32(vout4x0123, voutput_min);
411 vout4x4567 = vmaxq_f32(vout4x4567, voutput_min);
412 vout4x89AB = vmaxq_f32(vout4x89AB, voutput_min);
413 vout4xCDEF = vmaxq_f32(vout4xCDEF, voutput_min);
414 vout5x0123 = vmaxq_f32(vout5x0123, voutput_min);
415 vout5x4567 = vmaxq_f32(vout5x4567, voutput_min);
416 vout5x89AB = vmaxq_f32(vout5x89AB, voutput_min);
417 vout5xCDEF = vmaxq_f32(vout5xCDEF, voutput_min);
418
419 const float32x4_t voutput_max = vld1q_dup_f32(&params->scalar.max);
420 vout0x0123 = vminq_f32(vout0x0123, voutput_max);
421 vout0x4567 = vminq_f32(vout0x4567, voutput_max);
422 vout0x89AB = vminq_f32(vout0x89AB, voutput_max);
423 vout0xCDEF = vminq_f32(vout0xCDEF, voutput_max);
424 vout1x0123 = vminq_f32(vout1x0123, voutput_max);
425 vout1x4567 = vminq_f32(vout1x4567, voutput_max);
426 vout1x89AB = vminq_f32(vout1x89AB, voutput_max);
427 vout1xCDEF = vminq_f32(vout1xCDEF, voutput_max);
428 vout2x0123 = vminq_f32(vout2x0123, voutput_max);
429 vout2x4567 = vminq_f32(vout2x4567, voutput_max);
430 vout2x89AB = vminq_f32(vout2x89AB, voutput_max);
431 vout2xCDEF = vminq_f32(vout2xCDEF, voutput_max);
432 vout3x0123 = vminq_f32(vout3x0123, voutput_max);
433 vout3x4567 = vminq_f32(vout3x4567, voutput_max);
434 vout3x89AB = vminq_f32(vout3x89AB, voutput_max);
435 vout3xCDEF = vminq_f32(vout3xCDEF, voutput_max);
436 vout4x0123 = vminq_f32(vout4x0123, voutput_max);
437 vout4x4567 = vminq_f32(vout4x4567, voutput_max);
438 vout4x89AB = vminq_f32(vout4x89AB, voutput_max);
439 vout4xCDEF = vminq_f32(vout4xCDEF, voutput_max);
440 vout5x0123 = vminq_f32(vout5x0123, voutput_max);
441 vout5x4567 = vminq_f32(vout5x4567, voutput_max);
442 vout5x89AB = vminq_f32(vout5x89AB, voutput_max);
443 vout5xCDEF = vminq_f32(vout5xCDEF, voutput_max);
444
445 if XNN_LIKELY(nc >= 16) {
446 vst1q_f32(c0, vout0x0123);
447 vst1q_f32(c0 + 4, vout0x4567);
448 vst1q_f32(c0 + 8, vout0x89AB);
449 vst1q_f32(c0 + 12, vout0xCDEF);
450 vst1q_f32(c1, vout1x0123);
451 vst1q_f32(c1 + 4, vout1x4567);
452 vst1q_f32(c1 + 8, vout1x89AB);
453 vst1q_f32(c1 + 12, vout1xCDEF);
454 vst1q_f32(c2, vout2x0123);
455 vst1q_f32(c2 + 4, vout2x4567);
456 vst1q_f32(c2 + 8, vout2x89AB);
457 vst1q_f32(c2 + 12, vout2xCDEF);
458 vst1q_f32(c3, vout3x0123);
459 vst1q_f32(c3 + 4, vout3x4567);
460 vst1q_f32(c3 + 8, vout3x89AB);
461 vst1q_f32(c3 + 12, vout3xCDEF);
462 vst1q_f32(c4, vout4x0123);
463 vst1q_f32(c4 + 4, vout4x4567);
464 vst1q_f32(c4 + 8, vout4x89AB);
465 vst1q_f32(c4 + 12, vout4xCDEF);
466 vst1q_f32(c5, vout5x0123);
467 vst1q_f32(c5 + 4, vout5x4567);
468 vst1q_f32(c5 + 8, vout5x89AB);
469 vst1q_f32(c5 + 12, vout5xCDEF);
470
471 a0 = (const int8_t*) ((uintptr_t) a0 - kc);
472 a1 = (const int8_t*) ((uintptr_t) a1 - kc);
473 a2 = (const int8_t*) ((uintptr_t) a2 - kc);
474 a3 = (const int8_t*) ((uintptr_t) a3 - kc);
475 a4 = (const int8_t*) ((uintptr_t) a4 - kc);
476 a5 = (const int8_t*) ((uintptr_t) a5 - kc);
477
478 c0 = (float*) ((uintptr_t) c0 + cn_stride);
479 c1 = (float*) ((uintptr_t) c1 + cn_stride);
480 c2 = (float*) ((uintptr_t) c2 + cn_stride);
481 c3 = (float*) ((uintptr_t) c3 + cn_stride);
482 c4 = (float*) ((uintptr_t) c4 + cn_stride);
483 c5 = (float*) ((uintptr_t) c5 + cn_stride);
484
485 nc -= 16;
486 } else {
487 if (nc & 8) {
488 vst1q_f32(c0, vout0x0123); c0 += 4;
489 vout0x0123 = vout0x89AB;
490 vst1q_f32(c1, vout1x0123); c1 += 4;
491 vout1x0123 = vout1x89AB;
492 vst1q_f32(c2, vout2x0123); c2 += 4;
493 vout2x0123 = vout2x89AB;
494 vst1q_f32(c3, vout3x0123); c3 += 4;
495 vout3x0123 = vout3x89AB;
496 vst1q_f32(c4, vout4x0123); c4 += 4;
497 vout4x0123 = vout4x89AB;
498 vst1q_f32(c5, vout5x0123); c5 += 4;
499 vout5x0123 = vout5x89AB;
500 vst1q_f32(c0, vout0x4567); c0 += 4;
501 vout0x4567 = vout0xCDEF;
502 vst1q_f32(c1, vout1x4567); c1 += 4;
503 vout1x4567 = vout1xCDEF;
504 vst1q_f32(c2, vout2x4567); c2 += 4;
505 vout2x4567 = vout2xCDEF;
506 vst1q_f32(c3, vout3x4567); c3 += 4;
507 vout3x4567 = vout3xCDEF;
508 vst1q_f32(c4, vout4x4567); c4 += 4;
509 vout4x4567 = vout4xCDEF;
510 vst1q_f32(c5, vout5x4567); c5 += 4;
511 vout5x4567 = vout5xCDEF;
512 }
513 if (nc & 4) {
514 vst1q_f32(c0, vout0x0123); c0 += 4;
515 vout0x0123 = vout0x4567;
516 vst1q_f32(c1, vout1x0123); c1 += 4;
517 vout1x0123 = vout1x4567;
518 vst1q_f32(c2, vout2x0123); c2 += 4;
519 vout2x0123 = vout2x4567;
520 vst1q_f32(c3, vout3x0123); c3 += 4;
521 vout3x0123 = vout3x4567;
522 vst1q_f32(c4, vout4x0123); c4 += 4;
523 vout4x0123 = vout4x4567;
524 vst1q_f32(c5, vout5x0123); c5 += 4;
525 vout5x0123 = vout5x4567;
526 }
527 float32x2_t vout0x01 = vget_low_f32(vout0x0123);
528 float32x2_t vout1x01 = vget_low_f32(vout1x0123);
529 float32x2_t vout2x01 = vget_low_f32(vout2x0123);
530 float32x2_t vout3x01 = vget_low_f32(vout3x0123);
531 float32x2_t vout4x01 = vget_low_f32(vout4x0123);
532 float32x2_t vout5x01 = vget_low_f32(vout5x0123);
533 if (nc & 2) {
534 vst1_f32(c0, vout0x01); c0 += 2;
535 vst1_f32(c1, vout1x01); c1 += 2;
536 vst1_f32(c2, vout2x01); c2 += 2;
537 vst1_f32(c3, vout3x01); c3 += 2;
538 vst1_f32(c4, vout4x01); c4 += 2;
539 vst1_f32(c5, vout5x01); c5 += 2;
540 vout0x01 = vget_high_f32(vout0x0123);
541 vout1x01 = vget_high_f32(vout1x0123);
542 vout2x01 = vget_high_f32(vout2x0123);
543 vout3x01 = vget_high_f32(vout3x0123);
544 vout4x01 = vget_high_f32(vout4x0123);
545 vout5x01 = vget_high_f32(vout5x0123);
546 }
547 if (nc & 1) {
548 vst1_lane_f32(c0, vout0x01, 0);
549 vst1_lane_f32(c1, vout1x01, 0);
550 vst1_lane_f32(c2, vout2x01, 0);
551 vst1_lane_f32(c3, vout3x01, 0);
552 vst1_lane_f32(c4, vout4x01, 0);
553 vst1_lane_f32(c5, vout5x01, 0);
554 }
555 nc = 0;
556 }
557 } while (nc != 0);
558 }