1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-dwconv/unipass-neon-mul16.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/dwconv.h>
15 #include <xnnpack/intrinsics-polyfill.h>
16
17
xnn_qs8_dwconv_minmax_fp32_ukernel_up32x25__neonv8_mul16(size_t channels,size_t output_width,const int8_t ** input,const void * weights,int8_t * output,size_t input_stride,size_t output_increment,size_t input_offset,const int8_t * zero,const union xnn_qs8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS (1)])18 void xnn_qs8_dwconv_minmax_fp32_ukernel_up32x25__neonv8_mul16(
19 size_t channels,
20 size_t output_width,
21 const int8_t** input,
22 const void* weights,
23 int8_t* output,
24 size_t input_stride,
25 size_t output_increment,
26 size_t input_offset,
27 const int8_t* zero,
28 const union xnn_qs8_conv_minmax_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
29 {
30 assert(channels != 0);
31 assert(output_width != 0);
32
33 const float32x4_t vscale = vld1q_dup_f32(¶ms->fp32_neonv8.scale);
34 const int16x8_t voutput_zero_point = vld1q_dup_s16(¶ms->fp32_neonv8.output_zero_point);
35 const int8x16_t voutput_min = vld1q_dup_s8(¶ms->fp32_neonv8.output_min);
36 const int8x16_t voutput_max = vld1q_dup_s8(¶ms->fp32_neonv8.output_max);
37 do {
38 const int8_t* i0 = input[0];
39 assert(i0 != NULL);
40 if XNN_UNPREDICTABLE(i0 != zero) {
41 i0 = (const int8_t*) ((uintptr_t) i0 + input_offset);
42 }
43 const int8_t* i1 = input[1];
44 assert(i1 != NULL);
45 if XNN_UNPREDICTABLE(i1 != zero) {
46 i1 = (const int8_t*) ((uintptr_t) i1 + input_offset);
47 }
48 const int8_t* i2 = input[2];
49 assert(i2 != NULL);
50 if XNN_UNPREDICTABLE(i2 != zero) {
51 i2 = (const int8_t*) ((uintptr_t) i2 + input_offset);
52 }
53 const int8_t* i3 = input[3];
54 assert(i3 != NULL);
55 if XNN_UNPREDICTABLE(i3 != zero) {
56 i3 = (const int8_t*) ((uintptr_t) i3 + input_offset);
57 }
58 const int8_t* i4 = input[4];
59 assert(i4 != NULL);
60 if XNN_UNPREDICTABLE(i4 != zero) {
61 i4 = (const int8_t*) ((uintptr_t) i4 + input_offset);
62 }
63 const int8_t* i5 = input[5];
64 assert(i5 != NULL);
65 if XNN_UNPREDICTABLE(i5 != zero) {
66 i5 = (const int8_t*) ((uintptr_t) i5 + input_offset);
67 }
68 const int8_t* i6 = input[6];
69 assert(i6 != NULL);
70 if XNN_UNPREDICTABLE(i6 != zero) {
71 i6 = (const int8_t*) ((uintptr_t) i6 + input_offset);
72 }
73 const int8_t* i7 = input[7];
74 assert(i7 != NULL);
75 if XNN_UNPREDICTABLE(i7 != zero) {
76 i7 = (const int8_t*) ((uintptr_t) i7 + input_offset);
77 }
78 const int8_t* i8 = input[8];
79 assert(i8 != NULL);
80 if XNN_UNPREDICTABLE(i8 != zero) {
81 i8 = (const int8_t*) ((uintptr_t) i8 + input_offset);
82 }
83 const int8_t* i9 = input[9];
84 assert(i9 != NULL);
85 if XNN_UNPREDICTABLE(i9 != zero) {
86 i9 = (const int8_t*) ((uintptr_t) i9 + input_offset);
87 }
88 const int8_t* i10 = input[10];
89 assert(i10 != NULL);
90 if XNN_UNPREDICTABLE(i10 != zero) {
91 i10 = (const int8_t*) ((uintptr_t) i10 + input_offset);
92 }
93 const int8_t* i11 = input[11];
94 assert(i11 != NULL);
95 if XNN_UNPREDICTABLE(i11 != zero) {
96 i11 = (const int8_t*) ((uintptr_t) i11 + input_offset);
97 }
98 const int8_t* i12 = input[12];
99 assert(i12 != NULL);
100 if XNN_UNPREDICTABLE(i12 != zero) {
101 i12 = (const int8_t*) ((uintptr_t) i12 + input_offset);
102 }
103 const int8_t* i13 = input[13];
104 assert(i13 != NULL);
105 if XNN_UNPREDICTABLE(i13 != zero) {
106 i13 = (const int8_t*) ((uintptr_t) i13 + input_offset);
107 }
108 const int8_t* i14 = input[14];
109 assert(i14 != NULL);
110 if XNN_UNPREDICTABLE(i14 != zero) {
111 i14 = (const int8_t*) ((uintptr_t) i14 + input_offset);
112 }
113 const int8_t* i15 = input[15];
114 assert(i15 != NULL);
115 if XNN_UNPREDICTABLE(i15 != zero) {
116 i15 = (const int8_t*) ((uintptr_t) i15 + input_offset);
117 }
118 const int8_t* i16 = input[16];
119 assert(i16 != NULL);
120 if XNN_UNPREDICTABLE(i16 != zero) {
121 i16 = (const int8_t*) ((uintptr_t) i16 + input_offset);
122 }
123 const int8_t* i17 = input[17];
124 assert(i17 != NULL);
125 if XNN_UNPREDICTABLE(i17 != zero) {
126 i17 = (const int8_t*) ((uintptr_t) i17 + input_offset);
127 }
128 const int8_t* i18 = input[18];
129 assert(i18 != NULL);
130 if XNN_UNPREDICTABLE(i18 != zero) {
131 i18 = (const int8_t*) ((uintptr_t) i18 + input_offset);
132 }
133 const int8_t* i19 = input[19];
134 assert(i19 != NULL);
135 if XNN_UNPREDICTABLE(i19 != zero) {
136 i19 = (const int8_t*) ((uintptr_t) i19 + input_offset);
137 }
138 const int8_t* i20 = input[20];
139 assert(i20 != NULL);
140 if XNN_UNPREDICTABLE(i20 != zero) {
141 i20 = (const int8_t*) ((uintptr_t) i20 + input_offset);
142 }
143 const int8_t* i21 = input[21];
144 assert(i21 != NULL);
145 if XNN_UNPREDICTABLE(i21 != zero) {
146 i21 = (const int8_t*) ((uintptr_t) i21 + input_offset);
147 }
148 const int8_t* i22 = input[22];
149 assert(i22 != NULL);
150 if XNN_UNPREDICTABLE(i22 != zero) {
151 i22 = (const int8_t*) ((uintptr_t) i22 + input_offset);
152 }
153 const int8_t* i23 = input[23];
154 assert(i23 != NULL);
155 if XNN_UNPREDICTABLE(i23 != zero) {
156 i23 = (const int8_t*) ((uintptr_t) i23 + input_offset);
157 }
158 const int8_t* i24 = input[24];
159 assert(i24 != NULL);
160 if XNN_UNPREDICTABLE(i24 != zero) {
161 i24 = (const int8_t*) ((uintptr_t) i24 + input_offset);
162 }
163 input = (const int8_t**) ((uintptr_t) input + input_stride);
164
165 size_t c = channels;
166 const void* w = weights;
167 for (; c >= 32; c -= 32) {
168 int32x4_t vacc0123 = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
169 int32x4_t vacc4567 = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
170 int32x4_t vacc89AB = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
171 int32x4_t vaccCDEF = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
172 int32x4_t vaccGHIJ = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
173 int32x4_t vaccKLMN = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
174 int32x4_t vaccOPQR = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
175 int32x4_t vaccSTUV = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
176
177
178 const int16x8_t vi0x01234567 = vmovl_s8(vld1_s8(i0)); i0 += 8;
179 const int16x8_t vk0x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
180 const int16x8_t vi0x89ABCDEF = vmovl_s8(vld1_s8(i0)); i0 += 8;
181 const int16x8_t vk0x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
182 const int16x8_t vi0xGHIJKLMN = vmovl_s8(vld1_s8(i0)); i0 += 8;
183 const int16x8_t vk0xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
184 const int16x8_t vi0xOPQRSTUV = vmovl_s8(vld1_s8(i0)); i0 += 8;
185 const int16x8_t vk0xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
186
187 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi0x01234567), vget_low_s16(vk0x01234567));
188 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi0x01234567), vget_high_s16(vk0x01234567));
189 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi0x89ABCDEF), vget_low_s16(vk0x89ABCDEF));
190 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi0x89ABCDEF), vget_high_s16(vk0x89ABCDEF));
191 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi0xGHIJKLMN), vget_low_s16(vk0xGHIJKLMN));
192 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi0xGHIJKLMN), vget_high_s16(vk0xGHIJKLMN));
193 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi0xOPQRSTUV), vget_low_s16(vk0xOPQRSTUV));
194 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi0xOPQRSTUV), vget_high_s16(vk0xOPQRSTUV));
195
196 const int16x8_t vi1x01234567 = vmovl_s8(vld1_s8(i1)); i1 += 8;
197 const int16x8_t vk1x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
198 const int16x8_t vi1x89ABCDEF = vmovl_s8(vld1_s8(i1)); i1 += 8;
199 const int16x8_t vk1x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
200 const int16x8_t vi1xGHIJKLMN = vmovl_s8(vld1_s8(i1)); i1 += 8;
201 const int16x8_t vk1xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
202 const int16x8_t vi1xOPQRSTUV = vmovl_s8(vld1_s8(i1)); i1 += 8;
203 const int16x8_t vk1xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
204
205 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi1x01234567), vget_low_s16(vk1x01234567));
206 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi1x01234567), vget_high_s16(vk1x01234567));
207 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi1x89ABCDEF), vget_low_s16(vk1x89ABCDEF));
208 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi1x89ABCDEF), vget_high_s16(vk1x89ABCDEF));
209 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi1xGHIJKLMN), vget_low_s16(vk1xGHIJKLMN));
210 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi1xGHIJKLMN), vget_high_s16(vk1xGHIJKLMN));
211 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi1xOPQRSTUV), vget_low_s16(vk1xOPQRSTUV));
212 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi1xOPQRSTUV), vget_high_s16(vk1xOPQRSTUV));
213
214 const int16x8_t vi2x01234567 = vmovl_s8(vld1_s8(i2)); i2 += 8;
215 const int16x8_t vk2x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
216 const int16x8_t vi2x89ABCDEF = vmovl_s8(vld1_s8(i2)); i2 += 8;
217 const int16x8_t vk2x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
218 const int16x8_t vi2xGHIJKLMN = vmovl_s8(vld1_s8(i2)); i2 += 8;
219 const int16x8_t vk2xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
220 const int16x8_t vi2xOPQRSTUV = vmovl_s8(vld1_s8(i2)); i2 += 8;
221 const int16x8_t vk2xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
222
223 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi2x01234567), vget_low_s16(vk2x01234567));
224 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi2x01234567), vget_high_s16(vk2x01234567));
225 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi2x89ABCDEF), vget_low_s16(vk2x89ABCDEF));
226 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi2x89ABCDEF), vget_high_s16(vk2x89ABCDEF));
227 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi2xGHIJKLMN), vget_low_s16(vk2xGHIJKLMN));
228 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi2xGHIJKLMN), vget_high_s16(vk2xGHIJKLMN));
229 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi2xOPQRSTUV), vget_low_s16(vk2xOPQRSTUV));
230 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi2xOPQRSTUV), vget_high_s16(vk2xOPQRSTUV));
231
232 const int16x8_t vi3x01234567 = vmovl_s8(vld1_s8(i3)); i3 += 8;
233 const int16x8_t vk3x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
234 const int16x8_t vi3x89ABCDEF = vmovl_s8(vld1_s8(i3)); i3 += 8;
235 const int16x8_t vk3x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
236 const int16x8_t vi3xGHIJKLMN = vmovl_s8(vld1_s8(i3)); i3 += 8;
237 const int16x8_t vk3xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
238 const int16x8_t vi3xOPQRSTUV = vmovl_s8(vld1_s8(i3)); i3 += 8;
239 const int16x8_t vk3xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
240
241 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi3x01234567), vget_low_s16(vk3x01234567));
242 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi3x01234567), vget_high_s16(vk3x01234567));
243 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi3x89ABCDEF), vget_low_s16(vk3x89ABCDEF));
244 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi3x89ABCDEF), vget_high_s16(vk3x89ABCDEF));
245 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi3xGHIJKLMN), vget_low_s16(vk3xGHIJKLMN));
246 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi3xGHIJKLMN), vget_high_s16(vk3xGHIJKLMN));
247 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi3xOPQRSTUV), vget_low_s16(vk3xOPQRSTUV));
248 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi3xOPQRSTUV), vget_high_s16(vk3xOPQRSTUV));
249
250 const int16x8_t vi4x01234567 = vmovl_s8(vld1_s8(i4)); i4 += 8;
251 const int16x8_t vk4x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
252 const int16x8_t vi4x89ABCDEF = vmovl_s8(vld1_s8(i4)); i4 += 8;
253 const int16x8_t vk4x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
254 const int16x8_t vi4xGHIJKLMN = vmovl_s8(vld1_s8(i4)); i4 += 8;
255 const int16x8_t vk4xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
256 const int16x8_t vi4xOPQRSTUV = vmovl_s8(vld1_s8(i4)); i4 += 8;
257 const int16x8_t vk4xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
258
259 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi4x01234567), vget_low_s16(vk4x01234567));
260 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi4x01234567), vget_high_s16(vk4x01234567));
261 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi4x89ABCDEF), vget_low_s16(vk4x89ABCDEF));
262 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi4x89ABCDEF), vget_high_s16(vk4x89ABCDEF));
263 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi4xGHIJKLMN), vget_low_s16(vk4xGHIJKLMN));
264 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi4xGHIJKLMN), vget_high_s16(vk4xGHIJKLMN));
265 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi4xOPQRSTUV), vget_low_s16(vk4xOPQRSTUV));
266 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi4xOPQRSTUV), vget_high_s16(vk4xOPQRSTUV));
267
268 const int16x8_t vi5x01234567 = vmovl_s8(vld1_s8(i5)); i5 += 8;
269 const int16x8_t vk5x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
270 const int16x8_t vi5x89ABCDEF = vmovl_s8(vld1_s8(i5)); i5 += 8;
271 const int16x8_t vk5x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
272 const int16x8_t vi5xGHIJKLMN = vmovl_s8(vld1_s8(i5)); i5 += 8;
273 const int16x8_t vk5xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
274 const int16x8_t vi5xOPQRSTUV = vmovl_s8(vld1_s8(i5)); i5 += 8;
275 const int16x8_t vk5xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
276
277 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi5x01234567), vget_low_s16(vk5x01234567));
278 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi5x01234567), vget_high_s16(vk5x01234567));
279 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi5x89ABCDEF), vget_low_s16(vk5x89ABCDEF));
280 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi5x89ABCDEF), vget_high_s16(vk5x89ABCDEF));
281 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi5xGHIJKLMN), vget_low_s16(vk5xGHIJKLMN));
282 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi5xGHIJKLMN), vget_high_s16(vk5xGHIJKLMN));
283 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi5xOPQRSTUV), vget_low_s16(vk5xOPQRSTUV));
284 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi5xOPQRSTUV), vget_high_s16(vk5xOPQRSTUV));
285
286 const int16x8_t vi6x01234567 = vmovl_s8(vld1_s8(i6)); i6 += 8;
287 const int16x8_t vk6x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
288 const int16x8_t vi6x89ABCDEF = vmovl_s8(vld1_s8(i6)); i6 += 8;
289 const int16x8_t vk6x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
290 const int16x8_t vi6xGHIJKLMN = vmovl_s8(vld1_s8(i6)); i6 += 8;
291 const int16x8_t vk6xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
292 const int16x8_t vi6xOPQRSTUV = vmovl_s8(vld1_s8(i6)); i6 += 8;
293 const int16x8_t vk6xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
294
295 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi6x01234567), vget_low_s16(vk6x01234567));
296 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi6x01234567), vget_high_s16(vk6x01234567));
297 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi6x89ABCDEF), vget_low_s16(vk6x89ABCDEF));
298 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi6x89ABCDEF), vget_high_s16(vk6x89ABCDEF));
299 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi6xGHIJKLMN), vget_low_s16(vk6xGHIJKLMN));
300 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi6xGHIJKLMN), vget_high_s16(vk6xGHIJKLMN));
301 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi6xOPQRSTUV), vget_low_s16(vk6xOPQRSTUV));
302 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi6xOPQRSTUV), vget_high_s16(vk6xOPQRSTUV));
303
304 const int16x8_t vi7x01234567 = vmovl_s8(vld1_s8(i7)); i7 += 8;
305 const int16x8_t vk7x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
306 const int16x8_t vi7x89ABCDEF = vmovl_s8(vld1_s8(i7)); i7 += 8;
307 const int16x8_t vk7x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
308 const int16x8_t vi7xGHIJKLMN = vmovl_s8(vld1_s8(i7)); i7 += 8;
309 const int16x8_t vk7xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
310 const int16x8_t vi7xOPQRSTUV = vmovl_s8(vld1_s8(i7)); i7 += 8;
311 const int16x8_t vk7xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
312
313 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi7x01234567), vget_low_s16(vk7x01234567));
314 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi7x01234567), vget_high_s16(vk7x01234567));
315 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi7x89ABCDEF), vget_low_s16(vk7x89ABCDEF));
316 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi7x89ABCDEF), vget_high_s16(vk7x89ABCDEF));
317 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi7xGHIJKLMN), vget_low_s16(vk7xGHIJKLMN));
318 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi7xGHIJKLMN), vget_high_s16(vk7xGHIJKLMN));
319 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi7xOPQRSTUV), vget_low_s16(vk7xOPQRSTUV));
320 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi7xOPQRSTUV), vget_high_s16(vk7xOPQRSTUV));
321
322 const int16x8_t vi8x01234567 = vmovl_s8(vld1_s8(i8)); i8 += 8;
323 const int16x8_t vk8x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
324 const int16x8_t vi8x89ABCDEF = vmovl_s8(vld1_s8(i8)); i8 += 8;
325 const int16x8_t vk8x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
326 const int16x8_t vi8xGHIJKLMN = vmovl_s8(vld1_s8(i8)); i8 += 8;
327 const int16x8_t vk8xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
328 const int16x8_t vi8xOPQRSTUV = vmovl_s8(vld1_s8(i8)); i8 += 8;
329 const int16x8_t vk8xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
330
331 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi8x01234567), vget_low_s16(vk8x01234567));
332 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi8x01234567), vget_high_s16(vk8x01234567));
333 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi8x89ABCDEF), vget_low_s16(vk8x89ABCDEF));
334 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi8x89ABCDEF), vget_high_s16(vk8x89ABCDEF));
335 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi8xGHIJKLMN), vget_low_s16(vk8xGHIJKLMN));
336 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi8xGHIJKLMN), vget_high_s16(vk8xGHIJKLMN));
337 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi8xOPQRSTUV), vget_low_s16(vk8xOPQRSTUV));
338 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi8xOPQRSTUV), vget_high_s16(vk8xOPQRSTUV));
339
340 const int16x8_t vi9x01234567 = vmovl_s8(vld1_s8(i9)); i9 += 8;
341 const int16x8_t vk9x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
342 const int16x8_t vi9x89ABCDEF = vmovl_s8(vld1_s8(i9)); i9 += 8;
343 const int16x8_t vk9x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
344 const int16x8_t vi9xGHIJKLMN = vmovl_s8(vld1_s8(i9)); i9 += 8;
345 const int16x8_t vk9xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
346 const int16x8_t vi9xOPQRSTUV = vmovl_s8(vld1_s8(i9)); i9 += 8;
347 const int16x8_t vk9xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
348
349 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi9x01234567), vget_low_s16(vk9x01234567));
350 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi9x01234567), vget_high_s16(vk9x01234567));
351 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi9x89ABCDEF), vget_low_s16(vk9x89ABCDEF));
352 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi9x89ABCDEF), vget_high_s16(vk9x89ABCDEF));
353 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi9xGHIJKLMN), vget_low_s16(vk9xGHIJKLMN));
354 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi9xGHIJKLMN), vget_high_s16(vk9xGHIJKLMN));
355 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi9xOPQRSTUV), vget_low_s16(vk9xOPQRSTUV));
356 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi9xOPQRSTUV), vget_high_s16(vk9xOPQRSTUV));
357
358 const int16x8_t vi10x01234567 = vmovl_s8(vld1_s8(i10)); i10 += 8;
359 const int16x8_t vk10x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
360 const int16x8_t vi10x89ABCDEF = vmovl_s8(vld1_s8(i10)); i10 += 8;
361 const int16x8_t vk10x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
362 const int16x8_t vi10xGHIJKLMN = vmovl_s8(vld1_s8(i10)); i10 += 8;
363 const int16x8_t vk10xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
364 const int16x8_t vi10xOPQRSTUV = vmovl_s8(vld1_s8(i10)); i10 += 8;
365 const int16x8_t vk10xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
366
367 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi10x01234567), vget_low_s16(vk10x01234567));
368 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi10x01234567), vget_high_s16(vk10x01234567));
369 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi10x89ABCDEF), vget_low_s16(vk10x89ABCDEF));
370 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi10x89ABCDEF), vget_high_s16(vk10x89ABCDEF));
371 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi10xGHIJKLMN), vget_low_s16(vk10xGHIJKLMN));
372 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi10xGHIJKLMN), vget_high_s16(vk10xGHIJKLMN));
373 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi10xOPQRSTUV), vget_low_s16(vk10xOPQRSTUV));
374 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi10xOPQRSTUV), vget_high_s16(vk10xOPQRSTUV));
375
376 const int16x8_t vi11x01234567 = vmovl_s8(vld1_s8(i11)); i11 += 8;
377 const int16x8_t vk11x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
378 const int16x8_t vi11x89ABCDEF = vmovl_s8(vld1_s8(i11)); i11 += 8;
379 const int16x8_t vk11x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
380 const int16x8_t vi11xGHIJKLMN = vmovl_s8(vld1_s8(i11)); i11 += 8;
381 const int16x8_t vk11xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
382 const int16x8_t vi11xOPQRSTUV = vmovl_s8(vld1_s8(i11)); i11 += 8;
383 const int16x8_t vk11xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
384
385 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi11x01234567), vget_low_s16(vk11x01234567));
386 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi11x01234567), vget_high_s16(vk11x01234567));
387 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi11x89ABCDEF), vget_low_s16(vk11x89ABCDEF));
388 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi11x89ABCDEF), vget_high_s16(vk11x89ABCDEF));
389 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi11xGHIJKLMN), vget_low_s16(vk11xGHIJKLMN));
390 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi11xGHIJKLMN), vget_high_s16(vk11xGHIJKLMN));
391 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi11xOPQRSTUV), vget_low_s16(vk11xOPQRSTUV));
392 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi11xOPQRSTUV), vget_high_s16(vk11xOPQRSTUV));
393
394 const int16x8_t vi12x01234567 = vmovl_s8(vld1_s8(i12)); i12 += 8;
395 const int16x8_t vk12x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
396 const int16x8_t vi12x89ABCDEF = vmovl_s8(vld1_s8(i12)); i12 += 8;
397 const int16x8_t vk12x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
398 const int16x8_t vi12xGHIJKLMN = vmovl_s8(vld1_s8(i12)); i12 += 8;
399 const int16x8_t vk12xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
400 const int16x8_t vi12xOPQRSTUV = vmovl_s8(vld1_s8(i12)); i12 += 8;
401 const int16x8_t vk12xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
402
403 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi12x01234567), vget_low_s16(vk12x01234567));
404 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi12x01234567), vget_high_s16(vk12x01234567));
405 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi12x89ABCDEF), vget_low_s16(vk12x89ABCDEF));
406 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi12x89ABCDEF), vget_high_s16(vk12x89ABCDEF));
407 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi12xGHIJKLMN), vget_low_s16(vk12xGHIJKLMN));
408 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi12xGHIJKLMN), vget_high_s16(vk12xGHIJKLMN));
409 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi12xOPQRSTUV), vget_low_s16(vk12xOPQRSTUV));
410 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi12xOPQRSTUV), vget_high_s16(vk12xOPQRSTUV));
411
412 const int16x8_t vi13x01234567 = vmovl_s8(vld1_s8(i13)); i13 += 8;
413 const int16x8_t vk13x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
414 const int16x8_t vi13x89ABCDEF = vmovl_s8(vld1_s8(i13)); i13 += 8;
415 const int16x8_t vk13x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
416 const int16x8_t vi13xGHIJKLMN = vmovl_s8(vld1_s8(i13)); i13 += 8;
417 const int16x8_t vk13xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
418 const int16x8_t vi13xOPQRSTUV = vmovl_s8(vld1_s8(i13)); i13 += 8;
419 const int16x8_t vk13xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
420
421 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi13x01234567), vget_low_s16(vk13x01234567));
422 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi13x01234567), vget_high_s16(vk13x01234567));
423 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi13x89ABCDEF), vget_low_s16(vk13x89ABCDEF));
424 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi13x89ABCDEF), vget_high_s16(vk13x89ABCDEF));
425 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi13xGHIJKLMN), vget_low_s16(vk13xGHIJKLMN));
426 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi13xGHIJKLMN), vget_high_s16(vk13xGHIJKLMN));
427 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi13xOPQRSTUV), vget_low_s16(vk13xOPQRSTUV));
428 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi13xOPQRSTUV), vget_high_s16(vk13xOPQRSTUV));
429
430 const int16x8_t vi14x01234567 = vmovl_s8(vld1_s8(i14)); i14 += 8;
431 const int16x8_t vk14x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
432 const int16x8_t vi14x89ABCDEF = vmovl_s8(vld1_s8(i14)); i14 += 8;
433 const int16x8_t vk14x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
434 const int16x8_t vi14xGHIJKLMN = vmovl_s8(vld1_s8(i14)); i14 += 8;
435 const int16x8_t vk14xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
436 const int16x8_t vi14xOPQRSTUV = vmovl_s8(vld1_s8(i14)); i14 += 8;
437 const int16x8_t vk14xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
438
439 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi14x01234567), vget_low_s16(vk14x01234567));
440 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi14x01234567), vget_high_s16(vk14x01234567));
441 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi14x89ABCDEF), vget_low_s16(vk14x89ABCDEF));
442 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi14x89ABCDEF), vget_high_s16(vk14x89ABCDEF));
443 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi14xGHIJKLMN), vget_low_s16(vk14xGHIJKLMN));
444 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi14xGHIJKLMN), vget_high_s16(vk14xGHIJKLMN));
445 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi14xOPQRSTUV), vget_low_s16(vk14xOPQRSTUV));
446 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi14xOPQRSTUV), vget_high_s16(vk14xOPQRSTUV));
447
448 const int16x8_t vi15x01234567 = vmovl_s8(vld1_s8(i15)); i15 += 8;
449 const int16x8_t vk15x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
450 const int16x8_t vi15x89ABCDEF = vmovl_s8(vld1_s8(i15)); i15 += 8;
451 const int16x8_t vk15x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
452 const int16x8_t vi15xGHIJKLMN = vmovl_s8(vld1_s8(i15)); i15 += 8;
453 const int16x8_t vk15xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
454 const int16x8_t vi15xOPQRSTUV = vmovl_s8(vld1_s8(i15)); i15 += 8;
455 const int16x8_t vk15xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
456
457 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi15x01234567), vget_low_s16(vk15x01234567));
458 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi15x01234567), vget_high_s16(vk15x01234567));
459 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi15x89ABCDEF), vget_low_s16(vk15x89ABCDEF));
460 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi15x89ABCDEF), vget_high_s16(vk15x89ABCDEF));
461 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi15xGHIJKLMN), vget_low_s16(vk15xGHIJKLMN));
462 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi15xGHIJKLMN), vget_high_s16(vk15xGHIJKLMN));
463 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi15xOPQRSTUV), vget_low_s16(vk15xOPQRSTUV));
464 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi15xOPQRSTUV), vget_high_s16(vk15xOPQRSTUV));
465
466 const int16x8_t vi16x01234567 = vmovl_s8(vld1_s8(i16)); i16 += 8;
467 const int16x8_t vk16x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
468 const int16x8_t vi16x89ABCDEF = vmovl_s8(vld1_s8(i16)); i16 += 8;
469 const int16x8_t vk16x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
470 const int16x8_t vi16xGHIJKLMN = vmovl_s8(vld1_s8(i16)); i16 += 8;
471 const int16x8_t vk16xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
472 const int16x8_t vi16xOPQRSTUV = vmovl_s8(vld1_s8(i16)); i16 += 8;
473 const int16x8_t vk16xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
474
475 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi16x01234567), vget_low_s16(vk16x01234567));
476 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi16x01234567), vget_high_s16(vk16x01234567));
477 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi16x89ABCDEF), vget_low_s16(vk16x89ABCDEF));
478 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi16x89ABCDEF), vget_high_s16(vk16x89ABCDEF));
479 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi16xGHIJKLMN), vget_low_s16(vk16xGHIJKLMN));
480 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi16xGHIJKLMN), vget_high_s16(vk16xGHIJKLMN));
481 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi16xOPQRSTUV), vget_low_s16(vk16xOPQRSTUV));
482 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi16xOPQRSTUV), vget_high_s16(vk16xOPQRSTUV));
483
484 const int16x8_t vi17x01234567 = vmovl_s8(vld1_s8(i17)); i17 += 8;
485 const int16x8_t vk17x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
486 const int16x8_t vi17x89ABCDEF = vmovl_s8(vld1_s8(i17)); i17 += 8;
487 const int16x8_t vk17x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
488 const int16x8_t vi17xGHIJKLMN = vmovl_s8(vld1_s8(i17)); i17 += 8;
489 const int16x8_t vk17xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
490 const int16x8_t vi17xOPQRSTUV = vmovl_s8(vld1_s8(i17)); i17 += 8;
491 const int16x8_t vk17xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
492
493 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi17x01234567), vget_low_s16(vk17x01234567));
494 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi17x01234567), vget_high_s16(vk17x01234567));
495 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi17x89ABCDEF), vget_low_s16(vk17x89ABCDEF));
496 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi17x89ABCDEF), vget_high_s16(vk17x89ABCDEF));
497 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi17xGHIJKLMN), vget_low_s16(vk17xGHIJKLMN));
498 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi17xGHIJKLMN), vget_high_s16(vk17xGHIJKLMN));
499 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi17xOPQRSTUV), vget_low_s16(vk17xOPQRSTUV));
500 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi17xOPQRSTUV), vget_high_s16(vk17xOPQRSTUV));
501
502 const int16x8_t vi18x01234567 = vmovl_s8(vld1_s8(i18)); i18 += 8;
503 const int16x8_t vk18x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
504 const int16x8_t vi18x89ABCDEF = vmovl_s8(vld1_s8(i18)); i18 += 8;
505 const int16x8_t vk18x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
506 const int16x8_t vi18xGHIJKLMN = vmovl_s8(vld1_s8(i18)); i18 += 8;
507 const int16x8_t vk18xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
508 const int16x8_t vi18xOPQRSTUV = vmovl_s8(vld1_s8(i18)); i18 += 8;
509 const int16x8_t vk18xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
510
511 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi18x01234567), vget_low_s16(vk18x01234567));
512 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi18x01234567), vget_high_s16(vk18x01234567));
513 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi18x89ABCDEF), vget_low_s16(vk18x89ABCDEF));
514 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi18x89ABCDEF), vget_high_s16(vk18x89ABCDEF));
515 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi18xGHIJKLMN), vget_low_s16(vk18xGHIJKLMN));
516 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi18xGHIJKLMN), vget_high_s16(vk18xGHIJKLMN));
517 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi18xOPQRSTUV), vget_low_s16(vk18xOPQRSTUV));
518 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi18xOPQRSTUV), vget_high_s16(vk18xOPQRSTUV));
519
520 const int16x8_t vi19x01234567 = vmovl_s8(vld1_s8(i19)); i19 += 8;
521 const int16x8_t vk19x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
522 const int16x8_t vi19x89ABCDEF = vmovl_s8(vld1_s8(i19)); i19 += 8;
523 const int16x8_t vk19x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
524 const int16x8_t vi19xGHIJKLMN = vmovl_s8(vld1_s8(i19)); i19 += 8;
525 const int16x8_t vk19xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
526 const int16x8_t vi19xOPQRSTUV = vmovl_s8(vld1_s8(i19)); i19 += 8;
527 const int16x8_t vk19xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
528
529 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi19x01234567), vget_low_s16(vk19x01234567));
530 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi19x01234567), vget_high_s16(vk19x01234567));
531 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi19x89ABCDEF), vget_low_s16(vk19x89ABCDEF));
532 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi19x89ABCDEF), vget_high_s16(vk19x89ABCDEF));
533 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi19xGHIJKLMN), vget_low_s16(vk19xGHIJKLMN));
534 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi19xGHIJKLMN), vget_high_s16(vk19xGHIJKLMN));
535 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi19xOPQRSTUV), vget_low_s16(vk19xOPQRSTUV));
536 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi19xOPQRSTUV), vget_high_s16(vk19xOPQRSTUV));
537
538 const int16x8_t vi20x01234567 = vmovl_s8(vld1_s8(i20)); i20 += 8;
539 const int16x8_t vk20x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
540 const int16x8_t vi20x89ABCDEF = vmovl_s8(vld1_s8(i20)); i20 += 8;
541 const int16x8_t vk20x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
542 const int16x8_t vi20xGHIJKLMN = vmovl_s8(vld1_s8(i20)); i20 += 8;
543 const int16x8_t vk20xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
544 const int16x8_t vi20xOPQRSTUV = vmovl_s8(vld1_s8(i20)); i20 += 8;
545 const int16x8_t vk20xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
546
547 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi20x01234567), vget_low_s16(vk20x01234567));
548 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi20x01234567), vget_high_s16(vk20x01234567));
549 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi20x89ABCDEF), vget_low_s16(vk20x89ABCDEF));
550 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi20x89ABCDEF), vget_high_s16(vk20x89ABCDEF));
551 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi20xGHIJKLMN), vget_low_s16(vk20xGHIJKLMN));
552 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi20xGHIJKLMN), vget_high_s16(vk20xGHIJKLMN));
553 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi20xOPQRSTUV), vget_low_s16(vk20xOPQRSTUV));
554 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi20xOPQRSTUV), vget_high_s16(vk20xOPQRSTUV));
555
556 const int16x8_t vi21x01234567 = vmovl_s8(vld1_s8(i21)); i21 += 8;
557 const int16x8_t vk21x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
558 const int16x8_t vi21x89ABCDEF = vmovl_s8(vld1_s8(i21)); i21 += 8;
559 const int16x8_t vk21x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
560 const int16x8_t vi21xGHIJKLMN = vmovl_s8(vld1_s8(i21)); i21 += 8;
561 const int16x8_t vk21xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
562 const int16x8_t vi21xOPQRSTUV = vmovl_s8(vld1_s8(i21)); i21 += 8;
563 const int16x8_t vk21xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
564
565 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi21x01234567), vget_low_s16(vk21x01234567));
566 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi21x01234567), vget_high_s16(vk21x01234567));
567 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi21x89ABCDEF), vget_low_s16(vk21x89ABCDEF));
568 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi21x89ABCDEF), vget_high_s16(vk21x89ABCDEF));
569 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi21xGHIJKLMN), vget_low_s16(vk21xGHIJKLMN));
570 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi21xGHIJKLMN), vget_high_s16(vk21xGHIJKLMN));
571 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi21xOPQRSTUV), vget_low_s16(vk21xOPQRSTUV));
572 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi21xOPQRSTUV), vget_high_s16(vk21xOPQRSTUV));
573
574 const int16x8_t vi22x01234567 = vmovl_s8(vld1_s8(i22)); i22 += 8;
575 const int16x8_t vk22x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
576 const int16x8_t vi22x89ABCDEF = vmovl_s8(vld1_s8(i22)); i22 += 8;
577 const int16x8_t vk22x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
578 const int16x8_t vi22xGHIJKLMN = vmovl_s8(vld1_s8(i22)); i22 += 8;
579 const int16x8_t vk22xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
580 const int16x8_t vi22xOPQRSTUV = vmovl_s8(vld1_s8(i22)); i22 += 8;
581 const int16x8_t vk22xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
582
583 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi22x01234567), vget_low_s16(vk22x01234567));
584 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi22x01234567), vget_high_s16(vk22x01234567));
585 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi22x89ABCDEF), vget_low_s16(vk22x89ABCDEF));
586 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi22x89ABCDEF), vget_high_s16(vk22x89ABCDEF));
587 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi22xGHIJKLMN), vget_low_s16(vk22xGHIJKLMN));
588 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi22xGHIJKLMN), vget_high_s16(vk22xGHIJKLMN));
589 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi22xOPQRSTUV), vget_low_s16(vk22xOPQRSTUV));
590 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi22xOPQRSTUV), vget_high_s16(vk22xOPQRSTUV));
591
592 const int16x8_t vi23x01234567 = vmovl_s8(vld1_s8(i23)); i23 += 8;
593 const int16x8_t vk23x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
594 const int16x8_t vi23x89ABCDEF = vmovl_s8(vld1_s8(i23)); i23 += 8;
595 const int16x8_t vk23x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
596 const int16x8_t vi23xGHIJKLMN = vmovl_s8(vld1_s8(i23)); i23 += 8;
597 const int16x8_t vk23xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
598 const int16x8_t vi23xOPQRSTUV = vmovl_s8(vld1_s8(i23)); i23 += 8;
599 const int16x8_t vk23xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
600
601 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi23x01234567), vget_low_s16(vk23x01234567));
602 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi23x01234567), vget_high_s16(vk23x01234567));
603 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi23x89ABCDEF), vget_low_s16(vk23x89ABCDEF));
604 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi23x89ABCDEF), vget_high_s16(vk23x89ABCDEF));
605 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi23xGHIJKLMN), vget_low_s16(vk23xGHIJKLMN));
606 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi23xGHIJKLMN), vget_high_s16(vk23xGHIJKLMN));
607 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi23xOPQRSTUV), vget_low_s16(vk23xOPQRSTUV));
608 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi23xOPQRSTUV), vget_high_s16(vk23xOPQRSTUV));
609
610 const int16x8_t vi24x01234567 = vmovl_s8(vld1_s8(i24)); i24 += 8;
611 const int16x8_t vk24x01234567 = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
612 const int16x8_t vi24x89ABCDEF = vmovl_s8(vld1_s8(i24)); i24 += 8;
613 const int16x8_t vk24x89ABCDEF = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
614 const int16x8_t vi24xGHIJKLMN = vmovl_s8(vld1_s8(i24)); i24 += 8;
615 const int16x8_t vk24xGHIJKLMN = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
616 const int16x8_t vi24xOPQRSTUV = vmovl_s8(vld1_s8(i24)); i24 += 8;
617 const int16x8_t vk24xOPQRSTUV = vmovl_s8(vld1_s8(w)); w = (const void*) ((const int8_t*) w + 8);
618
619 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi24x01234567), vget_low_s16(vk24x01234567));
620 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi24x01234567), vget_high_s16(vk24x01234567));
621 vacc89AB = vmlal_s16(vacc89AB, vget_low_s16(vi24x89ABCDEF), vget_low_s16(vk24x89ABCDEF));
622 vaccCDEF = vmlal_s16(vaccCDEF, vget_high_s16(vi24x89ABCDEF), vget_high_s16(vk24x89ABCDEF));
623 vaccGHIJ = vmlal_s16(vaccGHIJ, vget_low_s16(vi24xGHIJKLMN), vget_low_s16(vk24xGHIJKLMN));
624 vaccKLMN = vmlal_s16(vaccKLMN, vget_high_s16(vi24xGHIJKLMN), vget_high_s16(vk24xGHIJKLMN));
625 vaccOPQR = vmlal_s16(vaccOPQR, vget_low_s16(vi24xOPQRSTUV), vget_low_s16(vk24xOPQRSTUV));
626 vaccSTUV = vmlal_s16(vaccSTUV, vget_high_s16(vi24xOPQRSTUV), vget_high_s16(vk24xOPQRSTUV));
627
628 float32x4_t vfpacc0123 = vcvtq_f32_s32(vacc0123);
629 float32x4_t vfpacc4567 = vcvtq_f32_s32(vacc4567);
630 float32x4_t vfpacc89AB = vcvtq_f32_s32(vacc89AB);
631 float32x4_t vfpaccCDEF = vcvtq_f32_s32(vaccCDEF);
632 float32x4_t vfpaccGHIJ = vcvtq_f32_s32(vaccGHIJ);
633 float32x4_t vfpaccKLMN = vcvtq_f32_s32(vaccKLMN);
634 float32x4_t vfpaccOPQR = vcvtq_f32_s32(vaccOPQR);
635 float32x4_t vfpaccSTUV = vcvtq_f32_s32(vaccSTUV);
636
637 vfpacc0123 = vmulq_f32(vfpacc0123, vscale);
638 vfpacc4567 = vmulq_f32(vfpacc4567, vscale);
639 vfpacc89AB = vmulq_f32(vfpacc89AB, vscale);
640 vfpaccCDEF = vmulq_f32(vfpaccCDEF, vscale);
641 vfpaccGHIJ = vmulq_f32(vfpaccGHIJ, vscale);
642 vfpaccKLMN = vmulq_f32(vfpaccKLMN, vscale);
643 vfpaccOPQR = vmulq_f32(vfpaccOPQR, vscale);
644 vfpaccSTUV = vmulq_f32(vfpaccSTUV, vscale);
645
646 vacc0123 = vcvtnq_s32_f32(vfpacc0123);
647 vacc4567 = vcvtnq_s32_f32(vfpacc4567);
648 vacc89AB = vcvtnq_s32_f32(vfpacc89AB);
649 vaccCDEF = vcvtnq_s32_f32(vfpaccCDEF);
650 vaccGHIJ = vcvtnq_s32_f32(vfpaccGHIJ);
651 vaccKLMN = vcvtnq_s32_f32(vfpaccKLMN);
652 vaccOPQR = vcvtnq_s32_f32(vfpaccOPQR);
653 vaccSTUV = vcvtnq_s32_f32(vfpaccSTUV);
654
655 #if XNN_ARCH_ARM64
656 int16x8_t vacc01234567 = vqmovn_high_s32(vqmovn_s32(vacc0123), vacc4567);
657 int16x8_t vacc89ABCDEF = vqmovn_high_s32(vqmovn_s32(vacc89AB), vaccCDEF);
658 int16x8_t vaccGHIJKLMN = vqmovn_high_s32(vqmovn_s32(vaccGHIJ), vaccKLMN);
659 int16x8_t vaccOPQRSTUV = vqmovn_high_s32(vqmovn_s32(vaccOPQR), vaccSTUV);
660
661 vacc01234567 = vqaddq_s16(vacc01234567, voutput_zero_point);
662 vacc89ABCDEF = vqaddq_s16(vacc89ABCDEF, voutput_zero_point);
663 vaccGHIJKLMN = vqaddq_s16(vaccGHIJKLMN, voutput_zero_point);
664 vaccOPQRSTUV = vqaddq_s16(vaccOPQRSTUV, voutput_zero_point);
665
666 int8x16_t vout0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc01234567), vacc89ABCDEF);
667 int8x16_t voutGHIJKLMNOPQRSTUV = vqmovn_high_s16(vqmovn_s16(vaccGHIJKLMN), vaccOPQRSTUV);
668 #else // !XNN_ARCH_ARM64
669 int16x8_t vacc01234567 = vcombine_s16(vqmovn_s32(vacc0123), vqmovn_s32(vacc4567));
670 int16x8_t vacc89ABCDEF = vcombine_s16(vqmovn_s32(vacc89AB), vqmovn_s32(vaccCDEF));
671 int16x8_t vaccGHIJKLMN = vcombine_s16(vqmovn_s32(vaccGHIJ), vqmovn_s32(vaccKLMN));
672 int16x8_t vaccOPQRSTUV = vcombine_s16(vqmovn_s32(vaccOPQR), vqmovn_s32(vaccSTUV));
673
674 vacc01234567 = vqaddq_s16(vacc01234567, voutput_zero_point);
675 vacc89ABCDEF = vqaddq_s16(vacc89ABCDEF, voutput_zero_point);
676 vaccGHIJKLMN = vqaddq_s16(vaccGHIJKLMN, voutput_zero_point);
677 vaccOPQRSTUV = vqaddq_s16(vaccOPQRSTUV, voutput_zero_point);
678
679 int8x16_t vout0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc01234567), vqmovn_s16(vacc89ABCDEF));
680 int8x16_t voutGHIJKLMNOPQRSTUV = vcombine_s8(vqmovn_s16(vaccGHIJKLMN), vqmovn_s16(vaccOPQRSTUV));
681 #endif // !XNN_ARCH_ARM64
682
683 vout0123456789ABCDEF = vmaxq_s8(vout0123456789ABCDEF, voutput_min);
684 voutGHIJKLMNOPQRSTUV = vmaxq_s8(voutGHIJKLMNOPQRSTUV, voutput_min);
685
686 vout0123456789ABCDEF = vminq_s8(vout0123456789ABCDEF, voutput_max);
687 voutGHIJKLMNOPQRSTUV = vminq_s8(voutGHIJKLMNOPQRSTUV, voutput_max);
688
689 vst1q_s8(output, vout0123456789ABCDEF); output += 16;
690 vst1q_s8(output, voutGHIJKLMNOPQRSTUV); output += 16;
691 }
692 if XNN_UNLIKELY(c != 0) {
693 const int8_t* k = (const int8_t*) ((const int32_t*) w + 32);
694 do {
695 int32x4_t vacc0123 = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
696 int32x4_t vacc4567 = vld1q_s32(w); w = (const void*) ((const int32_t*) w + 4);
697
698 const int16x8_t vi0x01234567 = vmovl_s8(vld1_s8(i0)); i0 += 8;
699 const int16x8_t vk0x01234567 = vmovl_s8(vld1_s8(k)); k += 8;
700
701 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi0x01234567), vget_low_s16(vk0x01234567));
702 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi0x01234567), vget_high_s16(vk0x01234567));
703 const int16x8_t vi1x01234567 = vmovl_s8(vld1_s8(i1)); i1 += 8;
704 const int16x8_t vk1x01234567 = vmovl_s8(vld1_s8((const void*) (k + 24)));
705
706 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi1x01234567), vget_low_s16(vk1x01234567));
707 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi1x01234567), vget_high_s16(vk1x01234567));
708 const int16x8_t vi2x01234567 = vmovl_s8(vld1_s8(i2)); i2 += 8;
709 const int16x8_t vk2x01234567 = vmovl_s8(vld1_s8((const void*) (k + 56)));
710
711 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi2x01234567), vget_low_s16(vk2x01234567));
712 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi2x01234567), vget_high_s16(vk2x01234567));
713 const int16x8_t vi3x01234567 = vmovl_s8(vld1_s8(i3)); i3 += 8;
714 const int16x8_t vk3x01234567 = vmovl_s8(vld1_s8((const void*) (k + 88)));
715
716 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi3x01234567), vget_low_s16(vk3x01234567));
717 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi3x01234567), vget_high_s16(vk3x01234567));
718 const int16x8_t vi4x01234567 = vmovl_s8(vld1_s8(i4)); i4 += 8;
719 const int16x8_t vk4x01234567 = vmovl_s8(vld1_s8((const void*) (k + 120)));
720
721 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi4x01234567), vget_low_s16(vk4x01234567));
722 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi4x01234567), vget_high_s16(vk4x01234567));
723 const int16x8_t vi5x01234567 = vmovl_s8(vld1_s8(i5)); i5 += 8;
724 const int16x8_t vk5x01234567 = vmovl_s8(vld1_s8((const void*) (k + 152)));
725
726 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi5x01234567), vget_low_s16(vk5x01234567));
727 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi5x01234567), vget_high_s16(vk5x01234567));
728 const int16x8_t vi6x01234567 = vmovl_s8(vld1_s8(i6)); i6 += 8;
729 const int16x8_t vk6x01234567 = vmovl_s8(vld1_s8((const void*) (k + 184)));
730
731 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi6x01234567), vget_low_s16(vk6x01234567));
732 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi6x01234567), vget_high_s16(vk6x01234567));
733 const int16x8_t vi7x01234567 = vmovl_s8(vld1_s8(i7)); i7 += 8;
734 const int16x8_t vk7x01234567 = vmovl_s8(vld1_s8((const void*) (k + 216)));
735
736 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi7x01234567), vget_low_s16(vk7x01234567));
737 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi7x01234567), vget_high_s16(vk7x01234567));
738 const int16x8_t vi8x01234567 = vmovl_s8(vld1_s8(i8)); i8 += 8;
739 const int16x8_t vk8x01234567 = vmovl_s8(vld1_s8((const void*) (k + 248)));
740
741 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi8x01234567), vget_low_s16(vk8x01234567));
742 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi8x01234567), vget_high_s16(vk8x01234567));
743 const int16x8_t vi9x01234567 = vmovl_s8(vld1_s8(i9)); i9 += 8;
744 const int16x8_t vk9x01234567 = vmovl_s8(vld1_s8((const void*) (k + 280)));
745
746 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi9x01234567), vget_low_s16(vk9x01234567));
747 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi9x01234567), vget_high_s16(vk9x01234567));
748 const int16x8_t vi10x01234567 = vmovl_s8(vld1_s8(i10)); i10 += 8;
749 const int16x8_t vk10x01234567 = vmovl_s8(vld1_s8((const void*) (k + 312)));
750
751 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi10x01234567), vget_low_s16(vk10x01234567));
752 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi10x01234567), vget_high_s16(vk10x01234567));
753 const int16x8_t vi11x01234567 = vmovl_s8(vld1_s8(i11)); i11 += 8;
754 const int16x8_t vk11x01234567 = vmovl_s8(vld1_s8((const void*) (k + 344)));
755
756 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi11x01234567), vget_low_s16(vk11x01234567));
757 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi11x01234567), vget_high_s16(vk11x01234567));
758 const int16x8_t vi12x01234567 = vmovl_s8(vld1_s8(i12)); i12 += 8;
759 const int16x8_t vk12x01234567 = vmovl_s8(vld1_s8((const void*) (k + 376)));
760
761 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi12x01234567), vget_low_s16(vk12x01234567));
762 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi12x01234567), vget_high_s16(vk12x01234567));
763 const int16x8_t vi13x01234567 = vmovl_s8(vld1_s8(i13)); i13 += 8;
764 const int16x8_t vk13x01234567 = vmovl_s8(vld1_s8((const void*) (k + 408)));
765
766 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi13x01234567), vget_low_s16(vk13x01234567));
767 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi13x01234567), vget_high_s16(vk13x01234567));
768 const int16x8_t vi14x01234567 = vmovl_s8(vld1_s8(i14)); i14 += 8;
769 const int16x8_t vk14x01234567 = vmovl_s8(vld1_s8((const void*) (k + 440)));
770
771 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi14x01234567), vget_low_s16(vk14x01234567));
772 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi14x01234567), vget_high_s16(vk14x01234567));
773 const int16x8_t vi15x01234567 = vmovl_s8(vld1_s8(i15)); i15 += 8;
774 const int16x8_t vk15x01234567 = vmovl_s8(vld1_s8((const void*) (k + 472)));
775
776 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi15x01234567), vget_low_s16(vk15x01234567));
777 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi15x01234567), vget_high_s16(vk15x01234567));
778 const int16x8_t vi16x01234567 = vmovl_s8(vld1_s8(i16)); i16 += 8;
779 const int16x8_t vk16x01234567 = vmovl_s8(vld1_s8((const void*) (k + 504)));
780
781 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi16x01234567), vget_low_s16(vk16x01234567));
782 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi16x01234567), vget_high_s16(vk16x01234567));
783 const int16x8_t vi17x01234567 = vmovl_s8(vld1_s8(i17)); i17 += 8;
784 const int16x8_t vk17x01234567 = vmovl_s8(vld1_s8((const void*) (k + 536)));
785
786 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi17x01234567), vget_low_s16(vk17x01234567));
787 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi17x01234567), vget_high_s16(vk17x01234567));
788 const int16x8_t vi18x01234567 = vmovl_s8(vld1_s8(i18)); i18 += 8;
789 const int16x8_t vk18x01234567 = vmovl_s8(vld1_s8((const void*) (k + 568)));
790
791 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi18x01234567), vget_low_s16(vk18x01234567));
792 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi18x01234567), vget_high_s16(vk18x01234567));
793 const int16x8_t vi19x01234567 = vmovl_s8(vld1_s8(i19)); i19 += 8;
794 const int16x8_t vk19x01234567 = vmovl_s8(vld1_s8((const void*) (k + 600)));
795
796 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi19x01234567), vget_low_s16(vk19x01234567));
797 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi19x01234567), vget_high_s16(vk19x01234567));
798 const int16x8_t vi20x01234567 = vmovl_s8(vld1_s8(i20)); i20 += 8;
799 const int16x8_t vk20x01234567 = vmovl_s8(vld1_s8((const void*) (k + 632)));
800
801 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi20x01234567), vget_low_s16(vk20x01234567));
802 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi20x01234567), vget_high_s16(vk20x01234567));
803 const int16x8_t vi21x01234567 = vmovl_s8(vld1_s8(i21)); i21 += 8;
804 const int16x8_t vk21x01234567 = vmovl_s8(vld1_s8((const void*) (k + 664)));
805
806 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi21x01234567), vget_low_s16(vk21x01234567));
807 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi21x01234567), vget_high_s16(vk21x01234567));
808 const int16x8_t vi22x01234567 = vmovl_s8(vld1_s8(i22)); i22 += 8;
809 const int16x8_t vk22x01234567 = vmovl_s8(vld1_s8((const void*) (k + 696)));
810
811 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi22x01234567), vget_low_s16(vk22x01234567));
812 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi22x01234567), vget_high_s16(vk22x01234567));
813 const int16x8_t vi23x01234567 = vmovl_s8(vld1_s8(i23)); i23 += 8;
814 const int16x8_t vk23x01234567 = vmovl_s8(vld1_s8((const void*) (k + 728)));
815
816 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi23x01234567), vget_low_s16(vk23x01234567));
817 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi23x01234567), vget_high_s16(vk23x01234567));
818 const int16x8_t vi24x01234567 = vmovl_s8(vld1_s8(i24)); i24 += 8;
819 const int16x8_t vk24x01234567 = vmovl_s8(vld1_s8((const void*) (k + 760)));
820
821 vacc0123 = vmlal_s16(vacc0123, vget_low_s16(vi24x01234567), vget_low_s16(vk24x01234567));
822 vacc4567 = vmlal_s16(vacc4567, vget_high_s16(vi24x01234567), vget_high_s16(vk24x01234567));
823
824 float32x4_t vfpacc0123 = vcvtq_f32_s32(vacc0123);
825 float32x4_t vfpacc4567 = vcvtq_f32_s32(vacc4567);
826
827 vfpacc0123 = vmulq_f32(vfpacc0123, vscale);
828 vfpacc4567 = vmulq_f32(vfpacc4567, vscale);
829
830 vacc0123 = vcvtnq_s32_f32(vfpacc0123);
831 vacc4567 = vcvtnq_s32_f32(vfpacc4567);
832
833 #if XNN_ARCH_ARM64
834 int16x8_t vacc01234567 = vqmovn_high_s32(vqmovn_s32(vacc0123), vacc4567);
835 #else
836 int16x8_t vacc01234567 = vcombine_s16(vqmovn_s32(vacc0123), vqmovn_s32(vacc4567));
837 #endif
838 vacc01234567 = vqaddq_s16(vacc01234567, voutput_zero_point);
839
840 int8x8_t vout01234567 = vqmovn_s16(vacc01234567);
841 vout01234567 = vmax_s8(vout01234567, vget_low_s8(voutput_min));
842 vout01234567 = vmin_s8(vout01234567, vget_low_s8(voutput_max));
843
844 if XNN_LIKELY(c >= 8) {
845 vst1_s8(output, vout01234567); output += 8;
846 c -= 8;
847 } else {
848 if (c & 4) {
849 vst1_lane_u32((void*) output, vreinterpret_u32_s8(vout01234567), 0); output += 4;
850 vout01234567 = vext_s8(vout01234567, vout01234567, 4);
851 }
852 if (c & 2) {
853 vst1_lane_u16((void*) output, vreinterpret_u16_s8(vout01234567), 0); output += 2;
854 vout01234567 = vext_s8(vout01234567, vout01234567, 2);
855 }
856 if (c & 1) {
857 vst1_lane_s8(output, vout01234567, 0); output += 1;
858 }
859 c = 0;
860 }
861 } while (c != 0);
862 }
863
864 output = (int8_t*) ((uintptr_t) output + output_increment);
865 } while (--output_width != 0);
866 }
867