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