Debian Codegraph @

src/qd8-f16-qc8w-gemm/gen/qd8-f16-qc8w-gemm-8x32c8-minmax-neoni8mm.c

raw
1 // Auto-generated file. Do not edit!
2 // Template: src/qs8-gemm/c8-neoni8mm.c.in
3 // Generator: tools/xngen
4 //
5 // Copyright 2023 Google LLC
6 //
7 // This source code is licensed under the BSD-style license found in the
8 // LICENSE file in the root directory of this source tree.
9
10 #include <assert.h>
11
12 #include <arm_neon.h>
13
14 #include "xnnpack/gemm.h"
15 #include "xnnpack/math.h"
16
17
18 void xnn_qd8_f16_qc8w_gemm_minmax_ukernel_8x32c8__neoni8mm(
19 size_t mr,
20 size_t nc,
21 size_t kc,
22 const int8_t* restrict a,
23 size_t a_stride,
24 const void* restrict w,
25 xnn_float16* restrict c,
26 size_t cm_stride,
27 size_t cn_stride,
28 const union xnn_f16_minmax_params params[restrict XNN_MIN_ELEMENTS(1)],
29 const struct xnn_qd8_quantization_params quantization_params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS
30 {
31 assert(mr != 0);
32 assert(mr <= 8);
33 assert(nc != 0);
34 assert(kc != 0);
35 assert(kc % sizeof(int8_t) == 0);
36 assert(a != NULL);
37 assert(w != NULL);
38 assert(c != NULL);
39
40 kc = round_up_po2(kc, 8 * sizeof(int8_t));
41 const int8_t* a0 = a;
42 uint16_t* c0 = (uint16_t*) c;
43 const int8_t* a1 = (const int8_t*) ((uintptr_t) a0 + a_stride);
44 uint16_t* c1 = (uint16_t*) ((uintptr_t) c0 + cm_stride);
45 if XNN_UNPREDICTABLE(mr < 2) {
46 a1 = a0;
47 c1 = c0;
48 }
49 const int8_t* a2 = (const int8_t*) ((uintptr_t) a1 + a_stride);
50 uint16_t* c2 = (uint16_t*) ((uintptr_t) c1 + cm_stride);
51 if XNN_UNPREDICTABLE(mr <= 2) {
52 a2 = a1;
53 c2 = c1;
54 }
55 const int8_t* a3 = (const int8_t*) ((uintptr_t) a2 + a_stride);
56 uint16_t* c3 = (uint16_t*) ((uintptr_t) c2 + cm_stride);
57 if XNN_UNPREDICTABLE(mr < 4) {
58 a3 = a2;
59 c3 = c2;
60 }
61 const int8_t* a4 = (const int8_t*) ((uintptr_t) a3 + a_stride);
62 uint16_t* c4 = (uint16_t*) ((uintptr_t) c3 + cm_stride);
63 if XNN_UNPREDICTABLE(mr <= 4) {
64 a4 = a3;
65 c4 = c3;
66 }
67 const int8_t* a5 = (const int8_t*) ((uintptr_t) a4 + a_stride);
68 uint16_t* c5 = (uint16_t*) ((uintptr_t) c4 + cm_stride);
69 if XNN_UNPREDICTABLE(mr < 6) {
70 a5 = a4;
71 c5 = c4;
72 }
73 const int8_t* a6 = (const int8_t*) ((uintptr_t) a5 + a_stride);
74 uint16_t* c6 = (uint16_t*) ((uintptr_t) c5 + cm_stride);
75 if XNN_UNPREDICTABLE(mr <= 6) {
76 a6 = a5;
77 c6 = c5;
78 }
79 const int8_t* a7 = (const int8_t*) ((uintptr_t) a6 + a_stride);
80 uint16_t* c7 = (uint16_t*) ((uintptr_t) c6 + cm_stride);
81 if XNN_UNPREDICTABLE(mr != 8) {
82 a7 = a6;
83 c7 = c6;
84 }
85
86 // Loop over groups of 32 columns.
87 do {
88 // Initialize accumulators with bias. 32 bias values are loaded from the
89 // weight matrix, at the start of the group of 32 columns.
90 const int32x4_t vinput_zero_point01 = vld1q_s32(&quantization_params[0].zero_point);
91 const int32x4_t vksum0123 = vld1q_s32(w); w = (const int32_t*) w + 4;
92 const int32x4_t vksumzp0x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point01), 0);
93 const int32x4_t vksumzp1x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point01), 0);
94 const int32x4_t vksum4567 = vld1q_s32(w); w = (const int32_t*) w + 4;
95 const int32x4_t vksumzp0x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point01), 0);
96 const int32x4_t vksumzp1x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point01), 0);
97 const int32x4_t vksum89AB = vld1q_s32(w); w = (const int32_t*) w + 4;
98 const int32x4_t vksumzp0x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point01), 0);
99 const int32x4_t vksumzp1x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point01), 0);
100 const int32x4_t vksumCDEF = vld1q_s32(w); w = (const int32_t*) w + 4;
101 const int32x4_t vksumzp0xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point01), 0);
102 const int32x4_t vksumzp1xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point01), 0);
103 const int32x4_t vksumGHIJ = vld1q_s32(w); w = (const int32_t*) w + 4;
104 const int32x4_t vksumzp0xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_low_s32(vinput_zero_point01), 0);
105 const int32x4_t vksumzp1xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_high_s32(vinput_zero_point01), 0);
106 const int32x4_t vksumKLMN = vld1q_s32(w); w = (const int32_t*) w + 4;
107 const int32x4_t vksumzp0xKLMN = vmulq_lane_s32(vksumKLMN, vget_low_s32(vinput_zero_point01), 0);
108 const int32x4_t vksumzp1xKLMN = vmulq_lane_s32(vksumKLMN, vget_high_s32(vinput_zero_point01), 0);
109 const int32x4_t vksumOPQR = vld1q_s32(w); w = (const int32_t*) w + 4;
110 const int32x4_t vksumzp0xOPQR = vmulq_lane_s32(vksumOPQR, vget_low_s32(vinput_zero_point01), 0);
111 const int32x4_t vksumzp1xOPQR = vmulq_lane_s32(vksumOPQR, vget_high_s32(vinput_zero_point01), 0);
112 const int32x4_t vksumSTUV = vld1q_s32(w); w = (const int32_t*) w + 4;
113 const int32x4_t vksumzp0xSTUV = vmulq_lane_s32(vksumSTUV, vget_low_s32(vinput_zero_point01), 0);
114 const int32x4_t vksumzp1xSTUV = vmulq_lane_s32(vksumSTUV, vget_high_s32(vinput_zero_point01), 0);
115 const int32x4_t vinput_zero_point23 = vld1q_s32(&quantization_params[2].zero_point);
116 const int32x4_t vksumzp2x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point23), 0);
117 const int32x4_t vksumzp3x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point23), 0);
118 const int32x4_t vksumzp2x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point23), 0);
119 const int32x4_t vksumzp3x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point23), 0);
120 const int32x4_t vksumzp2x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point23), 0);
121 const int32x4_t vksumzp3x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point23), 0);
122 const int32x4_t vksumzp2xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point23), 0);
123 const int32x4_t vksumzp3xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point23), 0);
124 const int32x4_t vksumzp2xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_low_s32(vinput_zero_point23), 0);
125 const int32x4_t vksumzp3xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_high_s32(vinput_zero_point23), 0);
126 const int32x4_t vksumzp2xKLMN = vmulq_lane_s32(vksumKLMN, vget_low_s32(vinput_zero_point23), 0);
127 const int32x4_t vksumzp3xKLMN = vmulq_lane_s32(vksumKLMN, vget_high_s32(vinput_zero_point23), 0);
128 const int32x4_t vksumzp2xOPQR = vmulq_lane_s32(vksumOPQR, vget_low_s32(vinput_zero_point23), 0);
129 const int32x4_t vksumzp3xOPQR = vmulq_lane_s32(vksumOPQR, vget_high_s32(vinput_zero_point23), 0);
130 const int32x4_t vksumzp2xSTUV = vmulq_lane_s32(vksumSTUV, vget_low_s32(vinput_zero_point23), 0);
131 const int32x4_t vksumzp3xSTUV = vmulq_lane_s32(vksumSTUV, vget_high_s32(vinput_zero_point23), 0);
132 const int32x4_t vinput_zero_point45 = vld1q_s32(&quantization_params[4].zero_point);
133 const int32x4_t vksumzp4x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point45), 0);
134 const int32x4_t vksumzp5x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point45), 0);
135 const int32x4_t vksumzp4x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point45), 0);
136 const int32x4_t vksumzp5x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point45), 0);
137 const int32x4_t vksumzp4x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point45), 0);
138 const int32x4_t vksumzp5x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point45), 0);
139 const int32x4_t vksumzp4xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point45), 0);
140 const int32x4_t vksumzp5xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point45), 0);
141 const int32x4_t vksumzp4xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_low_s32(vinput_zero_point45), 0);
142 const int32x4_t vksumzp5xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_high_s32(vinput_zero_point45), 0);
143 const int32x4_t vksumzp4xKLMN = vmulq_lane_s32(vksumKLMN, vget_low_s32(vinput_zero_point45), 0);
144 const int32x4_t vksumzp5xKLMN = vmulq_lane_s32(vksumKLMN, vget_high_s32(vinput_zero_point45), 0);
145 const int32x4_t vksumzp4xOPQR = vmulq_lane_s32(vksumOPQR, vget_low_s32(vinput_zero_point45), 0);
146 const int32x4_t vksumzp5xOPQR = vmulq_lane_s32(vksumOPQR, vget_high_s32(vinput_zero_point45), 0);
147 const int32x4_t vksumzp4xSTUV = vmulq_lane_s32(vksumSTUV, vget_low_s32(vinput_zero_point45), 0);
148 const int32x4_t vksumzp5xSTUV = vmulq_lane_s32(vksumSTUV, vget_high_s32(vinput_zero_point45), 0);
149 const int32x4_t vinput_zero_point67 = vld1q_s32(&quantization_params[6].zero_point);
150 const int32x4_t vksumzp6x0123 = vmulq_lane_s32(vksum0123, vget_low_s32(vinput_zero_point67), 0);
151 const int32x4_t vksumzp7x0123 = vmulq_lane_s32(vksum0123, vget_high_s32(vinput_zero_point67), 0);
152 const int32x4_t vksumzp6x4567 = vmulq_lane_s32(vksum4567, vget_low_s32(vinput_zero_point67), 0);
153 const int32x4_t vksumzp7x4567 = vmulq_lane_s32(vksum4567, vget_high_s32(vinput_zero_point67), 0);
154 const int32x4_t vksumzp6x89AB = vmulq_lane_s32(vksum89AB, vget_low_s32(vinput_zero_point67), 0);
155 const int32x4_t vksumzp7x89AB = vmulq_lane_s32(vksum89AB, vget_high_s32(vinput_zero_point67), 0);
156 const int32x4_t vksumzp6xCDEF = vmulq_lane_s32(vksumCDEF, vget_low_s32(vinput_zero_point67), 0);
157 const int32x4_t vksumzp7xCDEF = vmulq_lane_s32(vksumCDEF, vget_high_s32(vinput_zero_point67), 0);
158 const int32x4_t vksumzp6xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_low_s32(vinput_zero_point67), 0);
159 const int32x4_t vksumzp7xGHIJ = vmulq_lane_s32(vksumGHIJ, vget_high_s32(vinput_zero_point67), 0);
160 const int32x4_t vksumzp6xKLMN = vmulq_lane_s32(vksumKLMN, vget_low_s32(vinput_zero_point67), 0);
161 const int32x4_t vksumzp7xKLMN = vmulq_lane_s32(vksumKLMN, vget_high_s32(vinput_zero_point67), 0);
162 const int32x4_t vksumzp6xOPQR = vmulq_lane_s32(vksumOPQR, vget_low_s32(vinput_zero_point67), 0);
163 const int32x4_t vksumzp7xOPQR = vmulq_lane_s32(vksumOPQR, vget_high_s32(vinput_zero_point67), 0);
164 const int32x4_t vksumzp6xSTUV = vmulq_lane_s32(vksumSTUV, vget_low_s32(vinput_zero_point67), 0);
165 const int32x4_t vksumzp7xSTUV = vmulq_lane_s32(vksumSTUV, vget_high_s32(vinput_zero_point67), 0);
166
167 int32x4_t vacc01x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x0123), vreinterpretq_u64_s32(vksumzp1x0123)));
168 int32x4_t vacc01x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x0123), vreinterpretq_u64_s32(vksumzp1x0123)));
169 int32x4_t vacc01x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x4567), vreinterpretq_u64_s32(vksumzp1x4567)));
170 int32x4_t vacc01x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x4567), vreinterpretq_u64_s32(vksumzp1x4567)));
171 int32x4_t vacc01x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0x89AB), vreinterpretq_u64_s32(vksumzp1x89AB)));
172 int32x4_t vacc01xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0x89AB), vreinterpretq_u64_s32(vksumzp1x89AB)));
173 int32x4_t vacc01xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xCDEF), vreinterpretq_u64_s32(vksumzp1xCDEF)));
174 int32x4_t vacc01xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xCDEF), vreinterpretq_u64_s32(vksumzp1xCDEF)));
175 int32x4_t vacc01xGH = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xGHIJ), vreinterpretq_u64_s32(vksumzp1xGHIJ)));
176 int32x4_t vacc01xIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xGHIJ), vreinterpretq_u64_s32(vksumzp1xGHIJ)));
177 int32x4_t vacc01xKL = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xKLMN), vreinterpretq_u64_s32(vksumzp1xKLMN)));
178 int32x4_t vacc01xMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xKLMN), vreinterpretq_u64_s32(vksumzp1xKLMN)));
179 int32x4_t vacc01xOP = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xOPQR), vreinterpretq_u64_s32(vksumzp1xOPQR)));
180 int32x4_t vacc01xQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xOPQR), vreinterpretq_u64_s32(vksumzp1xOPQR)));
181 int32x4_t vacc01xST = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp0xSTUV), vreinterpretq_u64_s32(vksumzp1xSTUV)));
182 int32x4_t vacc01xUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp0xSTUV), vreinterpretq_u64_s32(vksumzp1xSTUV)));
183 int32x4_t vacc23x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x0123), vreinterpretq_u64_s32(vksumzp3x0123)));
184 int32x4_t vacc23x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x0123), vreinterpretq_u64_s32(vksumzp3x0123)));
185 int32x4_t vacc23x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x4567), vreinterpretq_u64_s32(vksumzp3x4567)));
186 int32x4_t vacc23x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x4567), vreinterpretq_u64_s32(vksumzp3x4567)));
187 int32x4_t vacc23x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2x89AB), vreinterpretq_u64_s32(vksumzp3x89AB)));
188 int32x4_t vacc23xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2x89AB), vreinterpretq_u64_s32(vksumzp3x89AB)));
189 int32x4_t vacc23xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xCDEF), vreinterpretq_u64_s32(vksumzp3xCDEF)));
190 int32x4_t vacc23xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xCDEF), vreinterpretq_u64_s32(vksumzp3xCDEF)));
191 int32x4_t vacc23xGH = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xGHIJ), vreinterpretq_u64_s32(vksumzp3xGHIJ)));
192 int32x4_t vacc23xIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xGHIJ), vreinterpretq_u64_s32(vksumzp3xGHIJ)));
193 int32x4_t vacc23xKL = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xKLMN), vreinterpretq_u64_s32(vksumzp3xKLMN)));
194 int32x4_t vacc23xMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xKLMN), vreinterpretq_u64_s32(vksumzp3xKLMN)));
195 int32x4_t vacc23xOP = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xOPQR), vreinterpretq_u64_s32(vksumzp3xOPQR)));
196 int32x4_t vacc23xQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xOPQR), vreinterpretq_u64_s32(vksumzp3xOPQR)));
197 int32x4_t vacc23xST = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp2xSTUV), vreinterpretq_u64_s32(vksumzp3xSTUV)));
198 int32x4_t vacc23xUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp2xSTUV), vreinterpretq_u64_s32(vksumzp3xSTUV)));
199 int32x4_t vacc45x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x0123), vreinterpretq_u64_s32(vksumzp5x0123)));
200 int32x4_t vacc45x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x0123), vreinterpretq_u64_s32(vksumzp5x0123)));
201 int32x4_t vacc45x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x4567), vreinterpretq_u64_s32(vksumzp5x4567)));
202 int32x4_t vacc45x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x4567), vreinterpretq_u64_s32(vksumzp5x4567)));
203 int32x4_t vacc45x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4x89AB), vreinterpretq_u64_s32(vksumzp5x89AB)));
204 int32x4_t vacc45xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4x89AB), vreinterpretq_u64_s32(vksumzp5x89AB)));
205 int32x4_t vacc45xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xCDEF), vreinterpretq_u64_s32(vksumzp5xCDEF)));
206 int32x4_t vacc45xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xCDEF), vreinterpretq_u64_s32(vksumzp5xCDEF)));
207 int32x4_t vacc45xGH = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xGHIJ), vreinterpretq_u64_s32(vksumzp5xGHIJ)));
208 int32x4_t vacc45xIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xGHIJ), vreinterpretq_u64_s32(vksumzp5xGHIJ)));
209 int32x4_t vacc45xKL = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xKLMN), vreinterpretq_u64_s32(vksumzp5xKLMN)));
210 int32x4_t vacc45xMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xKLMN), vreinterpretq_u64_s32(vksumzp5xKLMN)));
211 int32x4_t vacc45xOP = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xOPQR), vreinterpretq_u64_s32(vksumzp5xOPQR)));
212 int32x4_t vacc45xQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xOPQR), vreinterpretq_u64_s32(vksumzp5xOPQR)));
213 int32x4_t vacc45xST = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp4xSTUV), vreinterpretq_u64_s32(vksumzp5xSTUV)));
214 int32x4_t vacc45xUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp4xSTUV), vreinterpretq_u64_s32(vksumzp5xSTUV)));
215 int32x4_t vacc67x01 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6x0123), vreinterpretq_u64_s32(vksumzp7x0123)));
216 int32x4_t vacc67x23 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6x0123), vreinterpretq_u64_s32(vksumzp7x0123)));
217 int32x4_t vacc67x45 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6x4567), vreinterpretq_u64_s32(vksumzp7x4567)));
218 int32x4_t vacc67x67 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6x4567), vreinterpretq_u64_s32(vksumzp7x4567)));
219 int32x4_t vacc67x89 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6x89AB), vreinterpretq_u64_s32(vksumzp7x89AB)));
220 int32x4_t vacc67xAB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6x89AB), vreinterpretq_u64_s32(vksumzp7x89AB)));
221 int32x4_t vacc67xCD = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6xCDEF), vreinterpretq_u64_s32(vksumzp7xCDEF)));
222 int32x4_t vacc67xEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6xCDEF), vreinterpretq_u64_s32(vksumzp7xCDEF)));
223 int32x4_t vacc67xGH = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6xGHIJ), vreinterpretq_u64_s32(vksumzp7xGHIJ)));
224 int32x4_t vacc67xIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6xGHIJ), vreinterpretq_u64_s32(vksumzp7xGHIJ)));
225 int32x4_t vacc67xKL = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6xKLMN), vreinterpretq_u64_s32(vksumzp7xKLMN)));
226 int32x4_t vacc67xMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6xKLMN), vreinterpretq_u64_s32(vksumzp7xKLMN)));
227 int32x4_t vacc67xOP = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6xOPQR), vreinterpretq_u64_s32(vksumzp7xOPQR)));
228 int32x4_t vacc67xQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6xOPQR), vreinterpretq_u64_s32(vksumzp7xOPQR)));
229 int32x4_t vacc67xST = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vksumzp6xSTUV), vreinterpretq_u64_s32(vksumzp7xSTUV)));
230 int32x4_t vacc67xUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vksumzp6xSTUV), vreinterpretq_u64_s32(vksumzp7xSTUV)));
231
232 // Inner accumulation loop along the 32 columns.
233 size_t k = kc;
234 // 2x partial unrolled loop to load 8 bytes at a time.
235
236 uint64x2x2_t va01x0123456789ABCDEF;
237 va01x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
238 va01x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
239 uint64x2x2_t va23x0123456789ABCDEF;
240 va23x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
241 va23x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
242 uint64x2x2_t va45x0123456789ABCDEF;
243 va45x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
244 va45x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
245 uint64x2x2_t va67x0123456789ABCDEF;
246 va67x0123456789ABCDEF.val[0] = vdupq_n_u64(0);
247 va67x0123456789ABCDEF.val[1] = vdupq_n_u64(0);
248
249 while (k >= 16 * sizeof(int8_t)) {
250 // Load a 8x16 block of activations.
251 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a0, va01x0123456789ABCDEF, 0); a0 += 16;
252 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a2, va23x0123456789ABCDEF, 0); a2 += 16;
253 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a4, va45x0123456789ABCDEF, 0); a4 += 16;
254 va67x0123456789ABCDEF = vld2q_lane_u64((const void*) a6, va67x0123456789ABCDEF, 0); a6 += 16;
255 va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a1, va01x0123456789ABCDEF, 1); a1 += 16;
256 va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a3, va23x0123456789ABCDEF, 1); a3 += 16;
257 va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a5, va45x0123456789ABCDEF, 1); a5 += 16;
258 va67x0123456789ABCDEF = vld2q_lane_u64((const void*) a7, va67x0123456789ABCDEF, 1); a7 += 16;
259
260 const int8x16_t va01x01234567 = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]);
261 const int8x16_t va01x89ABCDEF = vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]);
262 const int8x16_t va23x01234567 = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]);
263 const int8x16_t va23x89ABCDEF = vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]);
264 const int8x16_t va45x01234567 = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]);
265 const int8x16_t va45x89ABCDEF = vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]);
266 const int8x16_t va67x01234567 = vreinterpretq_s8_u64(va67x0123456789ABCDEF.val[0]);
267 const int8x16_t va67x89ABCDEF = vreinterpretq_s8_u64(va67x0123456789ABCDEF.val[1]);
268
269 // Load a 16x32 block of weights.
270 const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
271 const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
272 const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
273 const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
274 const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
275 const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
276 const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
277 const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
278 const int8x16_t vbGHx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
279 const int8x16_t vbIJx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
280 const int8x16_t vbKLx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
281 const int8x16_t vbMNx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
282 const int8x16_t vbOPx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
283 const int8x16_t vbQRx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
284 const int8x16_t vbSTx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
285 const int8x16_t vbUVx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
286 const int8x16_t vb01x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
287 const int8x16_t vb23x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
288 const int8x16_t vb45x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
289 const int8x16_t vb67x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
290 const int8x16_t vb89x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
291 const int8x16_t vbABx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
292 const int8x16_t vbCDx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
293 const int8x16_t vbEFx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
294 const int8x16_t vbGHx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
295 const int8x16_t vbIJx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
296 const int8x16_t vbKLx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
297 const int8x16_t vbMNx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
298 const int8x16_t vbOPx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
299 const int8x16_t vbQRx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
300 const int8x16_t vbSTx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
301 const int8x16_t vbUVx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16;
302
303 // Multiply-accumulate: 8x8 * 8x32 --> 8x32.
304 vacc01x01 = vmmlaq_s32(vacc01x01, va01x01234567, vb01x01234567);
305 vacc01x23 = vmmlaq_s32(vacc01x23, va01x01234567, vb23x01234567);
306 vacc01x45 = vmmlaq_s32(vacc01x45, va01x01234567, vb45x01234567);
307 vacc01x67 = vmmlaq_s32(vacc01x67, va01x01234567, vb67x01234567);
308 vacc01x89 = vmmlaq_s32(vacc01x89, va01x01234567, vb89x01234567);
309 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x01234567, vbABx01234567);
310 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x01234567, vbCDx01234567);
311 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x01234567, vbEFx01234567);
312 vacc01xGH = vmmlaq_s32(vacc01xGH, va01x01234567, vbGHx01234567);
313 vacc01xIJ = vmmlaq_s32(vacc01xIJ, va01x01234567, vbIJx01234567);
314 vacc01xKL = vmmlaq_s32(vacc01xKL, va01x01234567, vbKLx01234567);
315 vacc01xMN = vmmlaq_s32(vacc01xMN, va01x01234567, vbMNx01234567);
316 vacc01xOP = vmmlaq_s32(vacc01xOP, va01x01234567, vbOPx01234567);
317 vacc01xQR = vmmlaq_s32(vacc01xQR, va01x01234567, vbQRx01234567);
318 vacc01xST = vmmlaq_s32(vacc01xST, va01x01234567, vbSTx01234567);
319 vacc01xUV = vmmlaq_s32(vacc01xUV, va01x01234567, vbUVx01234567);
320 vacc23x01 = vmmlaq_s32(vacc23x01, va23x01234567, vb01x01234567);
321 vacc23x23 = vmmlaq_s32(vacc23x23, va23x01234567, vb23x01234567);
322 vacc23x45 = vmmlaq_s32(vacc23x45, va23x01234567, vb45x01234567);
323 vacc23x67 = vmmlaq_s32(vacc23x67, va23x01234567, vb67x01234567);
324 vacc23x89 = vmmlaq_s32(vacc23x89, va23x01234567, vb89x01234567);
325 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x01234567, vbABx01234567);
326 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x01234567, vbCDx01234567);
327 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x01234567, vbEFx01234567);
328 vacc23xGH = vmmlaq_s32(vacc23xGH, va23x01234567, vbGHx01234567);
329 vacc23xIJ = vmmlaq_s32(vacc23xIJ, va23x01234567, vbIJx01234567);
330 vacc23xKL = vmmlaq_s32(vacc23xKL, va23x01234567, vbKLx01234567);
331 vacc23xMN = vmmlaq_s32(vacc23xMN, va23x01234567, vbMNx01234567);
332 vacc23xOP = vmmlaq_s32(vacc23xOP, va23x01234567, vbOPx01234567);
333 vacc23xQR = vmmlaq_s32(vacc23xQR, va23x01234567, vbQRx01234567);
334 vacc23xST = vmmlaq_s32(vacc23xST, va23x01234567, vbSTx01234567);
335 vacc23xUV = vmmlaq_s32(vacc23xUV, va23x01234567, vbUVx01234567);
336 vacc45x01 = vmmlaq_s32(vacc45x01, va45x01234567, vb01x01234567);
337 vacc45x23 = vmmlaq_s32(vacc45x23, va45x01234567, vb23x01234567);
338 vacc45x45 = vmmlaq_s32(vacc45x45, va45x01234567, vb45x01234567);
339 vacc45x67 = vmmlaq_s32(vacc45x67, va45x01234567, vb67x01234567);
340 vacc45x89 = vmmlaq_s32(vacc45x89, va45x01234567, vb89x01234567);
341 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x01234567, vbABx01234567);
342 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x01234567, vbCDx01234567);
343 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x01234567, vbEFx01234567);
344 vacc45xGH = vmmlaq_s32(vacc45xGH, va45x01234567, vbGHx01234567);
345 vacc45xIJ = vmmlaq_s32(vacc45xIJ, va45x01234567, vbIJx01234567);
346 vacc45xKL = vmmlaq_s32(vacc45xKL, va45x01234567, vbKLx01234567);
347 vacc45xMN = vmmlaq_s32(vacc45xMN, va45x01234567, vbMNx01234567);
348 vacc45xOP = vmmlaq_s32(vacc45xOP, va45x01234567, vbOPx01234567);
349 vacc45xQR = vmmlaq_s32(vacc45xQR, va45x01234567, vbQRx01234567);
350 vacc45xST = vmmlaq_s32(vacc45xST, va45x01234567, vbSTx01234567);
351 vacc45xUV = vmmlaq_s32(vacc45xUV, va45x01234567, vbUVx01234567);
352 vacc67x01 = vmmlaq_s32(vacc67x01, va67x01234567, vb01x01234567);
353 vacc67x23 = vmmlaq_s32(vacc67x23, va67x01234567, vb23x01234567);
354 vacc67x45 = vmmlaq_s32(vacc67x45, va67x01234567, vb45x01234567);
355 vacc67x67 = vmmlaq_s32(vacc67x67, va67x01234567, vb67x01234567);
356 vacc67x89 = vmmlaq_s32(vacc67x89, va67x01234567, vb89x01234567);
357 vacc67xAB = vmmlaq_s32(vacc67xAB, va67x01234567, vbABx01234567);
358 vacc67xCD = vmmlaq_s32(vacc67xCD, va67x01234567, vbCDx01234567);
359 vacc67xEF = vmmlaq_s32(vacc67xEF, va67x01234567, vbEFx01234567);
360 vacc67xGH = vmmlaq_s32(vacc67xGH, va67x01234567, vbGHx01234567);
361 vacc67xIJ = vmmlaq_s32(vacc67xIJ, va67x01234567, vbIJx01234567);
362 vacc67xKL = vmmlaq_s32(vacc67xKL, va67x01234567, vbKLx01234567);
363 vacc67xMN = vmmlaq_s32(vacc67xMN, va67x01234567, vbMNx01234567);
364 vacc67xOP = vmmlaq_s32(vacc67xOP, va67x01234567, vbOPx01234567);
365 vacc67xQR = vmmlaq_s32(vacc67xQR, va67x01234567, vbQRx01234567);
366 vacc67xST = vmmlaq_s32(vacc67xST, va67x01234567, vbSTx01234567);
367 vacc67xUV = vmmlaq_s32(vacc67xUV, va67x01234567, vbUVx01234567);
368 vacc01x01 = vmmlaq_s32(vacc01x01, va01x89ABCDEF, vb01x89ABCDEF);
369 vacc01x23 = vmmlaq_s32(vacc01x23, va01x89ABCDEF, vb23x89ABCDEF);
370 vacc01x45 = vmmlaq_s32(vacc01x45, va01x89ABCDEF, vb45x89ABCDEF);
371 vacc01x67 = vmmlaq_s32(vacc01x67, va01x89ABCDEF, vb67x89ABCDEF);
372 vacc01x89 = vmmlaq_s32(vacc01x89, va01x89ABCDEF, vb89x89ABCDEF);
373 vacc01xAB = vmmlaq_s32(vacc01xAB, va01x89ABCDEF, vbABx89ABCDEF);
374 vacc01xCD = vmmlaq_s32(vacc01xCD, va01x89ABCDEF, vbCDx89ABCDEF);
375 vacc01xEF = vmmlaq_s32(vacc01xEF, va01x89ABCDEF, vbEFx89ABCDEF);
376 vacc01xGH = vmmlaq_s32(vacc01xGH, va01x89ABCDEF, vbGHx89ABCDEF);
377 vacc01xIJ = vmmlaq_s32(vacc01xIJ, va01x89ABCDEF, vbIJx89ABCDEF);
378 vacc01xKL = vmmlaq_s32(vacc01xKL, va01x89ABCDEF, vbKLx89ABCDEF);
379 vacc01xMN = vmmlaq_s32(vacc01xMN, va01x89ABCDEF, vbMNx89ABCDEF);
380 vacc01xOP = vmmlaq_s32(vacc01xOP, va01x89ABCDEF, vbOPx89ABCDEF);
381 vacc01xQR = vmmlaq_s32(vacc01xQR, va01x89ABCDEF, vbQRx89ABCDEF);
382 vacc01xST = vmmlaq_s32(vacc01xST, va01x89ABCDEF, vbSTx89ABCDEF);
383 vacc01xUV = vmmlaq_s32(vacc01xUV, va01x89ABCDEF, vbUVx89ABCDEF);
384 vacc23x01 = vmmlaq_s32(vacc23x01, va23x89ABCDEF, vb01x89ABCDEF);
385 vacc23x23 = vmmlaq_s32(vacc23x23, va23x89ABCDEF, vb23x89ABCDEF);
386 vacc23x45 = vmmlaq_s32(vacc23x45, va23x89ABCDEF, vb45x89ABCDEF);
387 vacc23x67 = vmmlaq_s32(vacc23x67, va23x89ABCDEF, vb67x89ABCDEF);
388 vacc23x89 = vmmlaq_s32(vacc23x89, va23x89ABCDEF, vb89x89ABCDEF);
389 vacc23xAB = vmmlaq_s32(vacc23xAB, va23x89ABCDEF, vbABx89ABCDEF);
390 vacc23xCD = vmmlaq_s32(vacc23xCD, va23x89ABCDEF, vbCDx89ABCDEF);
391 vacc23xEF = vmmlaq_s32(vacc23xEF, va23x89ABCDEF, vbEFx89ABCDEF);
392 vacc23xGH = vmmlaq_s32(vacc23xGH, va23x89ABCDEF, vbGHx89ABCDEF);
393 vacc23xIJ = vmmlaq_s32(vacc23xIJ, va23x89ABCDEF, vbIJx89ABCDEF);
394 vacc23xKL = vmmlaq_s32(vacc23xKL, va23x89ABCDEF, vbKLx89ABCDEF);
395 vacc23xMN = vmmlaq_s32(vacc23xMN, va23x89ABCDEF, vbMNx89ABCDEF);
396 vacc23xOP = vmmlaq_s32(vacc23xOP, va23x89ABCDEF, vbOPx89ABCDEF);
397 vacc23xQR = vmmlaq_s32(vacc23xQR, va23x89ABCDEF, vbQRx89ABCDEF);
398 vacc23xST = vmmlaq_s32(vacc23xST, va23x89ABCDEF, vbSTx89ABCDEF);
399 vacc23xUV = vmmlaq_s32(vacc23xUV, va23x89ABCDEF, vbUVx89ABCDEF);
400 vacc45x01 = vmmlaq_s32(vacc45x01, va45x89ABCDEF, vb01x89ABCDEF);
401 vacc45x23 = vmmlaq_s32(vacc45x23, va45x89ABCDEF, vb23x89ABCDEF);
402 vacc45x45 = vmmlaq_s32(vacc45x45, va45x89ABCDEF, vb45x89ABCDEF);
403 vacc45x67 = vmmlaq_s32(vacc45x67, va45x89ABCDEF, vb67x89ABCDEF);
404 vacc45x89 = vmmlaq_s32(vacc45x89, va45x89ABCDEF, vb89x89ABCDEF);
405 vacc45xAB = vmmlaq_s32(vacc45xAB, va45x89ABCDEF, vbABx89ABCDEF);
406 vacc45xCD = vmmlaq_s32(vacc45xCD, va45x89ABCDEF, vbCDx89ABCDEF);
407 vacc45xEF = vmmlaq_s32(vacc45xEF, va45x89ABCDEF, vbEFx89ABCDEF);
408 vacc45xGH = vmmlaq_s32(vacc45xGH, va45x89ABCDEF, vbGHx89ABCDEF);
409 vacc45xIJ = vmmlaq_s32(vacc45xIJ, va45x89ABCDEF, vbIJx89ABCDEF);
410 vacc45xKL = vmmlaq_s32(vacc45xKL, va45x89ABCDEF, vbKLx89ABCDEF);
411 vacc45xMN = vmmlaq_s32(vacc45xMN, va45x89ABCDEF, vbMNx89ABCDEF);
412 vacc45xOP = vmmlaq_s32(vacc45xOP, va45x89ABCDEF, vbOPx89ABCDEF);
413 vacc45xQR = vmmlaq_s32(vacc45xQR, va45x89ABCDEF, vbQRx89ABCDEF);
414 vacc45xST = vmmlaq_s32(vacc45xST, va45x89ABCDEF, vbSTx89ABCDEF);
415 vacc45xUV = vmmlaq_s32(vacc45xUV, va45x89ABCDEF, vbUVx89ABCDEF);
416 vacc67x01 = vmmlaq_s32(vacc67x01, va67x89ABCDEF, vb01x89ABCDEF);
417 vacc67x23 = vmmlaq_s32(vacc67x23, va67x89ABCDEF, vb23x89ABCDEF);
418 vacc67x45 = vmmlaq_s32(vacc67x45, va67x89ABCDEF, vb45x89ABCDEF);
419 vacc67x67 = vmmlaq_s32(vacc67x67, va67x89ABCDEF, vb67x89ABCDEF);
420 vacc67x89 = vmmlaq_s32(vacc67x89, va67x89ABCDEF, vb89x89ABCDEF);
421 vacc67xAB = vmmlaq_s32(vacc67xAB, va67x89ABCDEF, vbABx89ABCDEF);
422 vacc67xCD = vmmlaq_s32(vacc67xCD, va67x89ABCDEF, vbCDx89ABCDEF);
423 vacc67xEF = vmmlaq_s32(vacc67xEF, va67x89ABCDEF, vbEFx89ABCDEF);
424 vacc67xGH = vmmlaq_s32(vacc67xGH, va67x89ABCDEF, vbGHx89ABCDEF);
425 vacc67xIJ = vmmlaq_s32(vacc67xIJ, va67x89ABCDEF, vbIJx89ABCDEF);
426 vacc67xKL = vmmlaq_s32(vacc67xKL, va67x89ABCDEF, vbKLx89ABCDEF);
427 vacc67xMN = vmmlaq_s32(vacc67xMN, va67x89ABCDEF, vbMNx89ABCDEF);
428 vacc67xOP = vmmlaq_s32(vacc67xOP, va67x89ABCDEF, vbOPx89ABCDEF);
429 vacc67xQR = vmmlaq_s32(vacc67xQR, va67x89ABCDEF, vbQRx89ABCDEF);
430 vacc67xST = vmmlaq_s32(vacc67xST, va67x89ABCDEF, vbSTx89ABCDEF);
431 vacc67xUV = vmmlaq_s32(vacc67xUV, va67x89ABCDEF, vbUVx89ABCDEF);
432
433 k -= 16 * sizeof(int8_t);
434 }
435 // Handle up to 8 final positions of `k`
436 if XNN_UNLIKELY(k != 0) {
437 // Load a 8x8 block of activations.
438 uint64x2_t va01x01234567 = vld1q_dup_u64((const void*) a0); a0 += 8;
439 uint64x2_t va23x01234567 = vld1q_dup_u64((const void*) a2); a2 += 8;
440 uint64x2_t va45x01234567 = vld1q_dup_u64((const void*) a4); a4 += 8;
441 uint64x2_t va67x01234567 = vld1q_dup_u64((const void*) a6); a6 += 8;
442 va01x01234567 = vld1q_lane_u64((const void*) a1, va01x01234567, 1); a1 += 8;
443 va23x01234567 = vld1q_lane_u64((const void*) a3, va23x01234567, 1); a3 += 8;
444 va45x01234567 = vld1q_lane_u64((const void*) a5, va45x01234567, 1); a5 += 8;
445 va67x01234567 = vld1q_lane_u64((const void*) a7, va67x01234567, 1); a7 += 8;
446
447 // Load a 16x32 block of weights.
448 const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
449 const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
450 const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
451 const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
452 const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
453 const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
454 const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
455 const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
456 const int8x16_t vbGHx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
457 const int8x16_t vbIJx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
458 const int8x16_t vbKLx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
459 const int8x16_t vbMNx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
460 const int8x16_t vbOPx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
461 const int8x16_t vbQRx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
462 const int8x16_t vbSTx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
463 const int8x16_t vbUVx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16;
464
465 // Multiply-accumulate: 8x4 * 4x32 --> 8x32.
466 vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x01234567), vb01x01234567);
467 vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x01234567), vb23x01234567);
468 vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x01234567), vb45x01234567);
469 vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x01234567), vb67x01234567);
470 vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x01234567), vb89x01234567);
471 vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x01234567), vbABx01234567);
472 vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x01234567), vbCDx01234567);
473 vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x01234567), vbEFx01234567);
474 vacc01xGH = vmmlaq_s32(vacc01xGH, vreinterpretq_s8_u64(va01x01234567), vbGHx01234567);
475 vacc01xIJ = vmmlaq_s32(vacc01xIJ, vreinterpretq_s8_u64(va01x01234567), vbIJx01234567);
476 vacc01xKL = vmmlaq_s32(vacc01xKL, vreinterpretq_s8_u64(va01x01234567), vbKLx01234567);
477 vacc01xMN = vmmlaq_s32(vacc01xMN, vreinterpretq_s8_u64(va01x01234567), vbMNx01234567);
478 vacc01xOP = vmmlaq_s32(vacc01xOP, vreinterpretq_s8_u64(va01x01234567), vbOPx01234567);
479 vacc01xQR = vmmlaq_s32(vacc01xQR, vreinterpretq_s8_u64(va01x01234567), vbQRx01234567);
480 vacc01xST = vmmlaq_s32(vacc01xST, vreinterpretq_s8_u64(va01x01234567), vbSTx01234567);
481 vacc01xUV = vmmlaq_s32(vacc01xUV, vreinterpretq_s8_u64(va01x01234567), vbUVx01234567);
482 vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x01234567), vb01x01234567);
483 vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x01234567), vb23x01234567);
484 vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x01234567), vb45x01234567);
485 vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x01234567), vb67x01234567);
486 vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x01234567), vb89x01234567);
487 vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x01234567), vbABx01234567);
488 vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x01234567), vbCDx01234567);
489 vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x01234567), vbEFx01234567);
490 vacc23xGH = vmmlaq_s32(vacc23xGH, vreinterpretq_s8_u64(va23x01234567), vbGHx01234567);
491 vacc23xIJ = vmmlaq_s32(vacc23xIJ, vreinterpretq_s8_u64(va23x01234567), vbIJx01234567);
492 vacc23xKL = vmmlaq_s32(vacc23xKL, vreinterpretq_s8_u64(va23x01234567), vbKLx01234567);
493 vacc23xMN = vmmlaq_s32(vacc23xMN, vreinterpretq_s8_u64(va23x01234567), vbMNx01234567);
494 vacc23xOP = vmmlaq_s32(vacc23xOP, vreinterpretq_s8_u64(va23x01234567), vbOPx01234567);
495 vacc23xQR = vmmlaq_s32(vacc23xQR, vreinterpretq_s8_u64(va23x01234567), vbQRx01234567);
496 vacc23xST = vmmlaq_s32(vacc23xST, vreinterpretq_s8_u64(va23x01234567), vbSTx01234567);
497 vacc23xUV = vmmlaq_s32(vacc23xUV, vreinterpretq_s8_u64(va23x01234567), vbUVx01234567);
498 vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x01234567), vb01x01234567);
499 vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x01234567), vb23x01234567);
500 vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x01234567), vb45x01234567);
501 vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x01234567), vb67x01234567);
502 vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x01234567), vb89x01234567);
503 vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x01234567), vbABx01234567);
504 vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x01234567), vbCDx01234567);
505 vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x01234567), vbEFx01234567);
506 vacc45xGH = vmmlaq_s32(vacc45xGH, vreinterpretq_s8_u64(va45x01234567), vbGHx01234567);
507 vacc45xIJ = vmmlaq_s32(vacc45xIJ, vreinterpretq_s8_u64(va45x01234567), vbIJx01234567);
508 vacc45xKL = vmmlaq_s32(vacc45xKL, vreinterpretq_s8_u64(va45x01234567), vbKLx01234567);
509 vacc45xMN = vmmlaq_s32(vacc45xMN, vreinterpretq_s8_u64(va45x01234567), vbMNx01234567);
510 vacc45xOP = vmmlaq_s32(vacc45xOP, vreinterpretq_s8_u64(va45x01234567), vbOPx01234567);
511 vacc45xQR = vmmlaq_s32(vacc45xQR, vreinterpretq_s8_u64(va45x01234567), vbQRx01234567);
512 vacc45xST = vmmlaq_s32(vacc45xST, vreinterpretq_s8_u64(va45x01234567), vbSTx01234567);
513 vacc45xUV = vmmlaq_s32(vacc45xUV, vreinterpretq_s8_u64(va45x01234567), vbUVx01234567);
514 vacc67x01 = vmmlaq_s32(vacc67x01, vreinterpretq_s8_u64(va67x01234567), vb01x01234567);
515 vacc67x23 = vmmlaq_s32(vacc67x23, vreinterpretq_s8_u64(va67x01234567), vb23x01234567);
516 vacc67x45 = vmmlaq_s32(vacc67x45, vreinterpretq_s8_u64(va67x01234567), vb45x01234567);
517 vacc67x67 = vmmlaq_s32(vacc67x67, vreinterpretq_s8_u64(va67x01234567), vb67x01234567);
518 vacc67x89 = vmmlaq_s32(vacc67x89, vreinterpretq_s8_u64(va67x01234567), vb89x01234567);
519 vacc67xAB = vmmlaq_s32(vacc67xAB, vreinterpretq_s8_u64(va67x01234567), vbABx01234567);
520 vacc67xCD = vmmlaq_s32(vacc67xCD, vreinterpretq_s8_u64(va67x01234567), vbCDx01234567);
521 vacc67xEF = vmmlaq_s32(vacc67xEF, vreinterpretq_s8_u64(va67x01234567), vbEFx01234567);
522 vacc67xGH = vmmlaq_s32(vacc67xGH, vreinterpretq_s8_u64(va67x01234567), vbGHx01234567);
523 vacc67xIJ = vmmlaq_s32(vacc67xIJ, vreinterpretq_s8_u64(va67x01234567), vbIJx01234567);
524 vacc67xKL = vmmlaq_s32(vacc67xKL, vreinterpretq_s8_u64(va67x01234567), vbKLx01234567);
525 vacc67xMN = vmmlaq_s32(vacc67xMN, vreinterpretq_s8_u64(va67x01234567), vbMNx01234567);
526 vacc67xOP = vmmlaq_s32(vacc67xOP, vreinterpretq_s8_u64(va67x01234567), vbOPx01234567);
527 vacc67xQR = vmmlaq_s32(vacc67xQR, vreinterpretq_s8_u64(va67x01234567), vbQRx01234567);
528 vacc67xST = vmmlaq_s32(vacc67xST, vreinterpretq_s8_u64(va67x01234567), vbSTx01234567);
529 vacc67xUV = vmmlaq_s32(vacc67xUV, vreinterpretq_s8_u64(va67x01234567), vbUVx01234567);
530 }
531
532 int32x4_t vacc0x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
533 int32x4_t vacc1x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x01), vreinterpretq_u64_s32(vacc01x23)));
534 int32x4_t vacc0x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
535 int32x4_t vacc1x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x45), vreinterpretq_u64_s32(vacc01x67)));
536 int32x4_t vacc0x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
537 int32x4_t vacc1x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01x89), vreinterpretq_u64_s32(vacc01xAB)));
538 int32x4_t vacc0xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
539 int32x4_t vacc1xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xCD), vreinterpretq_u64_s32(vacc01xEF)));
540 int32x4_t vacc0xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xGH), vreinterpretq_u64_s32(vacc01xIJ)));
541 int32x4_t vacc1xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xGH), vreinterpretq_u64_s32(vacc01xIJ)));
542 int32x4_t vacc0xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xKL), vreinterpretq_u64_s32(vacc01xMN)));
543 int32x4_t vacc1xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xKL), vreinterpretq_u64_s32(vacc01xMN)));
544 int32x4_t vacc0xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xOP), vreinterpretq_u64_s32(vacc01xQR)));
545 int32x4_t vacc1xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xOP), vreinterpretq_u64_s32(vacc01xQR)));
546 int32x4_t vacc0xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc01xST), vreinterpretq_u64_s32(vacc01xUV)));
547 int32x4_t vacc1xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc01xST), vreinterpretq_u64_s32(vacc01xUV)));
548 int32x4_t vacc2x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
549 int32x4_t vacc3x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x01), vreinterpretq_u64_s32(vacc23x23)));
550 int32x4_t vacc2x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
551 int32x4_t vacc3x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x45), vreinterpretq_u64_s32(vacc23x67)));
552 int32x4_t vacc2x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
553 int32x4_t vacc3x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23x89), vreinterpretq_u64_s32(vacc23xAB)));
554 int32x4_t vacc2xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
555 int32x4_t vacc3xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xCD), vreinterpretq_u64_s32(vacc23xEF)));
556 int32x4_t vacc2xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xGH), vreinterpretq_u64_s32(vacc23xIJ)));
557 int32x4_t vacc3xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xGH), vreinterpretq_u64_s32(vacc23xIJ)));
558 int32x4_t vacc2xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xKL), vreinterpretq_u64_s32(vacc23xMN)));
559 int32x4_t vacc3xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xKL), vreinterpretq_u64_s32(vacc23xMN)));
560 int32x4_t vacc2xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xOP), vreinterpretq_u64_s32(vacc23xQR)));
561 int32x4_t vacc3xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xOP), vreinterpretq_u64_s32(vacc23xQR)));
562 int32x4_t vacc2xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc23xST), vreinterpretq_u64_s32(vacc23xUV)));
563 int32x4_t vacc3xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc23xST), vreinterpretq_u64_s32(vacc23xUV)));
564 int32x4_t vacc4x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
565 int32x4_t vacc5x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x01), vreinterpretq_u64_s32(vacc45x23)));
566 int32x4_t vacc4x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
567 int32x4_t vacc5x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x45), vreinterpretq_u64_s32(vacc45x67)));
568 int32x4_t vacc4x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
569 int32x4_t vacc5x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45x89), vreinterpretq_u64_s32(vacc45xAB)));
570 int32x4_t vacc4xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
571 int32x4_t vacc5xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xCD), vreinterpretq_u64_s32(vacc45xEF)));
572 int32x4_t vacc4xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xGH), vreinterpretq_u64_s32(vacc45xIJ)));
573 int32x4_t vacc5xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xGH), vreinterpretq_u64_s32(vacc45xIJ)));
574 int32x4_t vacc4xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xKL), vreinterpretq_u64_s32(vacc45xMN)));
575 int32x4_t vacc5xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xKL), vreinterpretq_u64_s32(vacc45xMN)));
576 int32x4_t vacc4xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xOP), vreinterpretq_u64_s32(vacc45xQR)));
577 int32x4_t vacc5xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xOP), vreinterpretq_u64_s32(vacc45xQR)));
578 int32x4_t vacc4xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc45xST), vreinterpretq_u64_s32(vacc45xUV)));
579 int32x4_t vacc5xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc45xST), vreinterpretq_u64_s32(vacc45xUV)));
580 int32x4_t vacc6x0123 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x01), vreinterpretq_u64_s32(vacc67x23)));
581 int32x4_t vacc7x0123 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x01), vreinterpretq_u64_s32(vacc67x23)));
582 int32x4_t vacc6x4567 = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x45), vreinterpretq_u64_s32(vacc67x67)));
583 int32x4_t vacc7x4567 = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x45), vreinterpretq_u64_s32(vacc67x67)));
584 int32x4_t vacc6x89AB = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67x89), vreinterpretq_u64_s32(vacc67xAB)));
585 int32x4_t vacc7x89AB = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67x89), vreinterpretq_u64_s32(vacc67xAB)));
586 int32x4_t vacc6xCDEF = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xCD), vreinterpretq_u64_s32(vacc67xEF)));
587 int32x4_t vacc7xCDEF = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xCD), vreinterpretq_u64_s32(vacc67xEF)));
588 int32x4_t vacc6xGHIJ = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xGH), vreinterpretq_u64_s32(vacc67xIJ)));
589 int32x4_t vacc7xGHIJ = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xGH), vreinterpretq_u64_s32(vacc67xIJ)));
590 int32x4_t vacc6xKLMN = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xKL), vreinterpretq_u64_s32(vacc67xMN)));
591 int32x4_t vacc7xKLMN = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xKL), vreinterpretq_u64_s32(vacc67xMN)));
592 int32x4_t vacc6xOPQR = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xOP), vreinterpretq_u64_s32(vacc67xQR)));
593 int32x4_t vacc7xOPQR = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xOP), vreinterpretq_u64_s32(vacc67xQR)));
594 int32x4_t vacc6xSTUV = vreinterpretq_s32_u64(vtrn1q_u64(vreinterpretq_u64_s32(vacc67xST), vreinterpretq_u64_s32(vacc67xUV)));
595 int32x4_t vacc7xSTUV = vreinterpretq_s32_u64(vtrn2q_u64(vreinterpretq_u64_s32(vacc67xST), vreinterpretq_u64_s32(vacc67xUV)));
596 float32x4_t vout0x0123 = vcvtq_f32_s32(vacc0x0123);
597 float32x4_t vout0x4567 = vcvtq_f32_s32(vacc0x4567);
598 float32x4_t vout0x89AB = vcvtq_f32_s32(vacc0x89AB);
599 float32x4_t vout0xCDEF = vcvtq_f32_s32(vacc0xCDEF);
600 float32x4_t vout0xGHIJ = vcvtq_f32_s32(vacc0xGHIJ);
601 float32x4_t vout0xKLMN = vcvtq_f32_s32(vacc0xKLMN);
602 float32x4_t vout0xOPQR = vcvtq_f32_s32(vacc0xOPQR);
603 float32x4_t vout0xSTUV = vcvtq_f32_s32(vacc0xSTUV);
604 float32x4_t vout1x0123 = vcvtq_f32_s32(vacc1x0123);
605 float32x4_t vout1x4567 = vcvtq_f32_s32(vacc1x4567);
606 float32x4_t vout1x89AB = vcvtq_f32_s32(vacc1x89AB);
607 float32x4_t vout1xCDEF = vcvtq_f32_s32(vacc1xCDEF);
608 float32x4_t vout1xGHIJ = vcvtq_f32_s32(vacc1xGHIJ);
609 float32x4_t vout1xKLMN = vcvtq_f32_s32(vacc1xKLMN);
610 float32x4_t vout1xOPQR = vcvtq_f32_s32(vacc1xOPQR);
611 float32x4_t vout1xSTUV = vcvtq_f32_s32(vacc1xSTUV);
612 float32x4_t vout2x0123 = vcvtq_f32_s32(vacc2x0123);
613 float32x4_t vout2x4567 = vcvtq_f32_s32(vacc2x4567);
614 float32x4_t vout2x89AB = vcvtq_f32_s32(vacc2x89AB);
615 float32x4_t vout2xCDEF = vcvtq_f32_s32(vacc2xCDEF);
616 float32x4_t vout2xGHIJ = vcvtq_f32_s32(vacc2xGHIJ);
617 float32x4_t vout2xKLMN = vcvtq_f32_s32(vacc2xKLMN);
618 float32x4_t vout2xOPQR = vcvtq_f32_s32(vacc2xOPQR);
619 float32x4_t vout2xSTUV = vcvtq_f32_s32(vacc2xSTUV);
620 float32x4_t vout3x0123 = vcvtq_f32_s32(vacc3x0123);
621 float32x4_t vout3x4567 = vcvtq_f32_s32(vacc3x4567);
622 float32x4_t vout3x89AB = vcvtq_f32_s32(vacc3x89AB);
623 float32x4_t vout3xCDEF = vcvtq_f32_s32(vacc3xCDEF);
624 float32x4_t vout3xGHIJ = vcvtq_f32_s32(vacc3xGHIJ);
625 float32x4_t vout3xKLMN = vcvtq_f32_s32(vacc3xKLMN);
626 float32x4_t vout3xOPQR = vcvtq_f32_s32(vacc3xOPQR);
627 float32x4_t vout3xSTUV = vcvtq_f32_s32(vacc3xSTUV);
628 float32x4_t vout4x0123 = vcvtq_f32_s32(vacc4x0123);
629 float32x4_t vout4x4567 = vcvtq_f32_s32(vacc4x4567);
630 float32x4_t vout4x89AB = vcvtq_f32_s32(vacc4x89AB);
631 float32x4_t vout4xCDEF = vcvtq_f32_s32(vacc4xCDEF);
632 float32x4_t vout4xGHIJ = vcvtq_f32_s32(vacc4xGHIJ);
633 float32x4_t vout4xKLMN = vcvtq_f32_s32(vacc4xKLMN);
634 float32x4_t vout4xOPQR = vcvtq_f32_s32(vacc4xOPQR);
635 float32x4_t vout4xSTUV = vcvtq_f32_s32(vacc4xSTUV);
636 float32x4_t vout5x0123 = vcvtq_f32_s32(vacc5x0123);
637 float32x4_t vout5x4567 = vcvtq_f32_s32(vacc5x4567);
638 float32x4_t vout5x89AB = vcvtq_f32_s32(vacc5x89AB);
639 float32x4_t vout5xCDEF = vcvtq_f32_s32(vacc5xCDEF);
640 float32x4_t vout5xGHIJ = vcvtq_f32_s32(vacc5xGHIJ);
641 float32x4_t vout5xKLMN = vcvtq_f32_s32(vacc5xKLMN);
642 float32x4_t vout5xOPQR = vcvtq_f32_s32(vacc5xOPQR);
643 float32x4_t vout5xSTUV = vcvtq_f32_s32(vacc5xSTUV);
644 float32x4_t vout6x0123 = vcvtq_f32_s32(vacc6x0123);
645 float32x4_t vout6x4567 = vcvtq_f32_s32(vacc6x4567);
646 float32x4_t vout6x89AB = vcvtq_f32_s32(vacc6x89AB);
647 float32x4_t vout6xCDEF = vcvtq_f32_s32(vacc6xCDEF);
648 float32x4_t vout6xGHIJ = vcvtq_f32_s32(vacc6xGHIJ);
649 float32x4_t vout6xKLMN = vcvtq_f32_s32(vacc6xKLMN);
650 float32x4_t vout6xOPQR = vcvtq_f32_s32(vacc6xOPQR);
651 float32x4_t vout6xSTUV = vcvtq_f32_s32(vacc6xSTUV);
652 float32x4_t vout7x0123 = vcvtq_f32_s32(vacc7x0123);
653 float32x4_t vout7x4567 = vcvtq_f32_s32(vacc7x4567);
654 float32x4_t vout7x89AB = vcvtq_f32_s32(vacc7x89AB);
655 float32x4_t vout7xCDEF = vcvtq_f32_s32(vacc7xCDEF);
656 float32x4_t vout7xGHIJ = vcvtq_f32_s32(vacc7xGHIJ);
657 float32x4_t vout7xKLMN = vcvtq_f32_s32(vacc7xKLMN);
658 float32x4_t vout7xOPQR = vcvtq_f32_s32(vacc7xOPQR);
659 float32x4_t vout7xSTUV = vcvtq_f32_s32(vacc7xSTUV);
660
661 const float32x4_t vinput_scale01 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[0].zero_point));
662 vout0x0123 = vmulq_lane_f32(vout0x0123, vget_low_f32(vinput_scale01), 1);
663 vout1x0123 = vmulq_lane_f32(vout1x0123, vget_high_f32(vinput_scale01), 1);
664 vout0x4567 = vmulq_lane_f32(vout0x4567, vget_low_f32(vinput_scale01), 1);
665 vout1x4567 = vmulq_lane_f32(vout1x4567, vget_high_f32(vinput_scale01), 1);
666 vout0x89AB = vmulq_lane_f32(vout0x89AB, vget_low_f32(vinput_scale01), 1);
667 vout1x89AB = vmulq_lane_f32(vout1x89AB, vget_high_f32(vinput_scale01), 1);
668 vout0xCDEF = vmulq_lane_f32(vout0xCDEF, vget_low_f32(vinput_scale01), 1);
669 vout1xCDEF = vmulq_lane_f32(vout1xCDEF, vget_high_f32(vinput_scale01), 1);
670 vout0xGHIJ = vmulq_lane_f32(vout0xGHIJ, vget_low_f32(vinput_scale01), 1);
671 vout1xGHIJ = vmulq_lane_f32(vout1xGHIJ, vget_high_f32(vinput_scale01), 1);
672 vout0xKLMN = vmulq_lane_f32(vout0xKLMN, vget_low_f32(vinput_scale01), 1);
673 vout1xKLMN = vmulq_lane_f32(vout1xKLMN, vget_high_f32(vinput_scale01), 1);
674 vout0xOPQR = vmulq_lane_f32(vout0xOPQR, vget_low_f32(vinput_scale01), 1);
675 vout1xOPQR = vmulq_lane_f32(vout1xOPQR, vget_high_f32(vinput_scale01), 1);
676 vout0xSTUV = vmulq_lane_f32(vout0xSTUV, vget_low_f32(vinput_scale01), 1);
677 vout1xSTUV = vmulq_lane_f32(vout1xSTUV, vget_high_f32(vinput_scale01), 1);
678 const float32x4_t vinput_scale23 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[2].zero_point));
679 vout2x0123 = vmulq_lane_f32(vout2x0123, vget_low_f32(vinput_scale23), 1);
680 vout3x0123 = vmulq_lane_f32(vout3x0123, vget_high_f32(vinput_scale23), 1);
681 vout2x4567 = vmulq_lane_f32(vout2x4567, vget_low_f32(vinput_scale23), 1);
682 vout3x4567 = vmulq_lane_f32(vout3x4567, vget_high_f32(vinput_scale23), 1);
683 vout2x89AB = vmulq_lane_f32(vout2x89AB, vget_low_f32(vinput_scale23), 1);
684 vout3x89AB = vmulq_lane_f32(vout3x89AB, vget_high_f32(vinput_scale23), 1);
685 vout2xCDEF = vmulq_lane_f32(vout2xCDEF, vget_low_f32(vinput_scale23), 1);
686 vout3xCDEF = vmulq_lane_f32(vout3xCDEF, vget_high_f32(vinput_scale23), 1);
687 vout2xGHIJ = vmulq_lane_f32(vout2xGHIJ, vget_low_f32(vinput_scale23), 1);
688 vout3xGHIJ = vmulq_lane_f32(vout3xGHIJ, vget_high_f32(vinput_scale23), 1);
689 vout2xKLMN = vmulq_lane_f32(vout2xKLMN, vget_low_f32(vinput_scale23), 1);
690 vout3xKLMN = vmulq_lane_f32(vout3xKLMN, vget_high_f32(vinput_scale23), 1);
691 vout2xOPQR = vmulq_lane_f32(vout2xOPQR, vget_low_f32(vinput_scale23), 1);
692 vout3xOPQR = vmulq_lane_f32(vout3xOPQR, vget_high_f32(vinput_scale23), 1);
693 vout2xSTUV = vmulq_lane_f32(vout2xSTUV, vget_low_f32(vinput_scale23), 1);
694 vout3xSTUV = vmulq_lane_f32(vout3xSTUV, vget_high_f32(vinput_scale23), 1);
695 const float32x4_t vinput_scale45 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[4].zero_point));
696 vout4x0123 = vmulq_lane_f32(vout4x0123, vget_low_f32(vinput_scale45), 1);
697 vout5x0123 = vmulq_lane_f32(vout5x0123, vget_high_f32(vinput_scale45), 1);
698 vout4x4567 = vmulq_lane_f32(vout4x4567, vget_low_f32(vinput_scale45), 1);
699 vout5x4567 = vmulq_lane_f32(vout5x4567, vget_high_f32(vinput_scale45), 1);
700 vout4x89AB = vmulq_lane_f32(vout4x89AB, vget_low_f32(vinput_scale45), 1);
701 vout5x89AB = vmulq_lane_f32(vout5x89AB, vget_high_f32(vinput_scale45), 1);
702 vout4xCDEF = vmulq_lane_f32(vout4xCDEF, vget_low_f32(vinput_scale45), 1);
703 vout5xCDEF = vmulq_lane_f32(vout5xCDEF, vget_high_f32(vinput_scale45), 1);
704 vout4xGHIJ = vmulq_lane_f32(vout4xGHIJ, vget_low_f32(vinput_scale45), 1);
705 vout5xGHIJ = vmulq_lane_f32(vout5xGHIJ, vget_high_f32(vinput_scale45), 1);
706 vout4xKLMN = vmulq_lane_f32(vout4xKLMN, vget_low_f32(vinput_scale45), 1);
707 vout5xKLMN = vmulq_lane_f32(vout5xKLMN, vget_high_f32(vinput_scale45), 1);
708 vout4xOPQR = vmulq_lane_f32(vout4xOPQR, vget_low_f32(vinput_scale45), 1);
709 vout5xOPQR = vmulq_lane_f32(vout5xOPQR, vget_high_f32(vinput_scale45), 1);
710 vout4xSTUV = vmulq_lane_f32(vout4xSTUV, vget_low_f32(vinput_scale45), 1);
711 vout5xSTUV = vmulq_lane_f32(vout5xSTUV, vget_high_f32(vinput_scale45), 1);
712 const float32x4_t vinput_scale67 = vreinterpretq_f32_s32(vld1q_s32(&quantization_params[6].zero_point));
713 vout6x0123 = vmulq_lane_f32(vout6x0123, vget_low_f32(vinput_scale67), 1);
714 vout7x0123 = vmulq_lane_f32(vout7x0123, vget_high_f32(vinput_scale67), 1);
715 vout6x4567 = vmulq_lane_f32(vout6x4567, vget_low_f32(vinput_scale67), 1);
716 vout7x4567 = vmulq_lane_f32(vout7x4567, vget_high_f32(vinput_scale67), 1);
717 vout6x89AB = vmulq_lane_f32(vout6x89AB, vget_low_f32(vinput_scale67), 1);
718 vout7x89AB = vmulq_lane_f32(vout7x89AB, vget_high_f32(vinput_scale67), 1);
719 vout6xCDEF = vmulq_lane_f32(vout6xCDEF, vget_low_f32(vinput_scale67), 1);
720 vout7xCDEF = vmulq_lane_f32(vout7xCDEF, vget_high_f32(vinput_scale67), 1);
721 vout6xGHIJ = vmulq_lane_f32(vout6xGHIJ, vget_low_f32(vinput_scale67), 1);
722 vout7xGHIJ = vmulq_lane_f32(vout7xGHIJ, vget_high_f32(vinput_scale67), 1);
723 vout6xKLMN = vmulq_lane_f32(vout6xKLMN, vget_low_f32(vinput_scale67), 1);
724 vout7xKLMN = vmulq_lane_f32(vout7xKLMN, vget_high_f32(vinput_scale67), 1);
725 vout6xOPQR = vmulq_lane_f32(vout6xOPQR, vget_low_f32(vinput_scale67), 1);
726 vout7xOPQR = vmulq_lane_f32(vout7xOPQR, vget_high_f32(vinput_scale67), 1);
727 vout6xSTUV = vmulq_lane_f32(vout6xSTUV, vget_low_f32(vinput_scale67), 1);
728 vout7xSTUV = vmulq_lane_f32(vout7xSTUV, vget_high_f32(vinput_scale67), 1);
729
730 const float32x4_t vfilter_output_scale0123 = vld1q_f32(w); w = (const float*) w + 4;
731 const float32x4_t vfilter_output_scale4567 = vld1q_f32(w); w = (const float*) w + 4;
732 const float32x4_t vfilter_output_scale89AB = vld1q_f32(w); w = (const float*) w + 4;
733 const float32x4_t vfilter_output_scaleCDEF = vld1q_f32(w); w = (const float*) w + 4;
734 const float32x4_t vfilter_output_scaleGHIJ = vld1q_f32(w); w = (const float*) w + 4;
735 const float32x4_t vfilter_output_scaleKLMN = vld1q_f32(w); w = (const float*) w + 4;
736 const float32x4_t vfilter_output_scaleOPQR = vld1q_f32(w); w = (const float*) w + 4;
737 const float32x4_t vfilter_output_scaleSTUV = vld1q_f32(w); w = (const float*) w + 4;
738
739 const float32x4_t vbias0123 = vld1q_f32(w); w = (const float*) w + 4;
740 vout0x0123 = vfmaq_f32(vbias0123, vout0x0123, vfilter_output_scale0123);
741 vout1x0123 = vfmaq_f32(vbias0123, vout1x0123, vfilter_output_scale0123);
742 vout2x0123 = vfmaq_f32(vbias0123, vout2x0123, vfilter_output_scale0123);
743 vout3x0123 = vfmaq_f32(vbias0123, vout3x0123, vfilter_output_scale0123);
744 vout4x0123 = vfmaq_f32(vbias0123, vout4x0123, vfilter_output_scale0123);
745 vout5x0123 = vfmaq_f32(vbias0123, vout5x0123, vfilter_output_scale0123);
746 vout6x0123 = vfmaq_f32(vbias0123, vout6x0123, vfilter_output_scale0123);
747 vout7x0123 = vfmaq_f32(vbias0123, vout7x0123, vfilter_output_scale0123);
748 const float32x4_t vbias4567 = vld1q_f32(w); w = (const float*) w + 4;
749 vout0x4567 = vfmaq_f32(vbias4567, vout0x4567, vfilter_output_scale4567);
750 vout1x4567 = vfmaq_f32(vbias4567, vout1x4567, vfilter_output_scale4567);
751 vout2x4567 = vfmaq_f32(vbias4567, vout2x4567, vfilter_output_scale4567);
752 vout3x4567 = vfmaq_f32(vbias4567, vout3x4567, vfilter_output_scale4567);
753 vout4x4567 = vfmaq_f32(vbias4567, vout4x4567, vfilter_output_scale4567);
754 vout5x4567 = vfmaq_f32(vbias4567, vout5x4567, vfilter_output_scale4567);
755 vout6x4567 = vfmaq_f32(vbias4567, vout6x4567, vfilter_output_scale4567);
756 vout7x4567 = vfmaq_f32(vbias4567, vout7x4567, vfilter_output_scale4567);
757 const float32x4_t vbias89AB = vld1q_f32(w); w = (const float*) w + 4;
758 vout0x89AB = vfmaq_f32(vbias89AB, vout0x89AB, vfilter_output_scale89AB);
759 vout1x89AB = vfmaq_f32(vbias89AB, vout1x89AB, vfilter_output_scale89AB);
760 vout2x89AB = vfmaq_f32(vbias89AB, vout2x89AB, vfilter_output_scale89AB);
761 vout3x89AB = vfmaq_f32(vbias89AB, vout3x89AB, vfilter_output_scale89AB);
762 vout4x89AB = vfmaq_f32(vbias89AB, vout4x89AB, vfilter_output_scale89AB);
763 vout5x89AB = vfmaq_f32(vbias89AB, vout5x89AB, vfilter_output_scale89AB);
764 vout6x89AB = vfmaq_f32(vbias89AB, vout6x89AB, vfilter_output_scale89AB);
765 vout7x89AB = vfmaq_f32(vbias89AB, vout7x89AB, vfilter_output_scale89AB);
766 const float32x4_t vbiasCDEF = vld1q_f32(w); w = (const float*) w + 4;
767 vout0xCDEF = vfmaq_f32(vbiasCDEF, vout0xCDEF, vfilter_output_scaleCDEF);
768 vout1xCDEF = vfmaq_f32(vbiasCDEF, vout1xCDEF, vfilter_output_scaleCDEF);
769 vout2xCDEF = vfmaq_f32(vbiasCDEF, vout2xCDEF, vfilter_output_scaleCDEF);
770 vout3xCDEF = vfmaq_f32(vbiasCDEF, vout3xCDEF, vfilter_output_scaleCDEF);
771 vout4xCDEF = vfmaq_f32(vbiasCDEF, vout4xCDEF, vfilter_output_scaleCDEF);
772 vout5xCDEF = vfmaq_f32(vbiasCDEF, vout5xCDEF, vfilter_output_scaleCDEF);
773 vout6xCDEF = vfmaq_f32(vbiasCDEF, vout6xCDEF, vfilter_output_scaleCDEF);
774 vout7xCDEF = vfmaq_f32(vbiasCDEF, vout7xCDEF, vfilter_output_scaleCDEF);
775 const float32x4_t vbiasGHIJ = vld1q_f32(w); w = (const float*) w + 4;
776 vout0xGHIJ = vfmaq_f32(vbiasGHIJ, vout0xGHIJ, vfilter_output_scaleGHIJ);
777 vout1xGHIJ = vfmaq_f32(vbiasGHIJ, vout1xGHIJ, vfilter_output_scaleGHIJ);
778 vout2xGHIJ = vfmaq_f32(vbiasGHIJ, vout2xGHIJ, vfilter_output_scaleGHIJ);
779 vout3xGHIJ = vfmaq_f32(vbiasGHIJ, vout3xGHIJ, vfilter_output_scaleGHIJ);
780 vout4xGHIJ = vfmaq_f32(vbiasGHIJ, vout4xGHIJ, vfilter_output_scaleGHIJ);
781 vout5xGHIJ = vfmaq_f32(vbiasGHIJ, vout5xGHIJ, vfilter_output_scaleGHIJ);
782 vout6xGHIJ = vfmaq_f32(vbiasGHIJ, vout6xGHIJ, vfilter_output_scaleGHIJ);
783 vout7xGHIJ = vfmaq_f32(vbiasGHIJ, vout7xGHIJ, vfilter_output_scaleGHIJ);
784 const float32x4_t vbiasKLMN = vld1q_f32(w); w = (const float*) w + 4;
785 vout0xKLMN = vfmaq_f32(vbiasKLMN, vout0xKLMN, vfilter_output_scaleKLMN);
786 vout1xKLMN = vfmaq_f32(vbiasKLMN, vout1xKLMN, vfilter_output_scaleKLMN);
787 vout2xKLMN = vfmaq_f32(vbiasKLMN, vout2xKLMN, vfilter_output_scaleKLMN);
788 vout3xKLMN = vfmaq_f32(vbiasKLMN, vout3xKLMN, vfilter_output_scaleKLMN);
789 vout4xKLMN = vfmaq_f32(vbiasKLMN, vout4xKLMN, vfilter_output_scaleKLMN);
790 vout5xKLMN = vfmaq_f32(vbiasKLMN, vout5xKLMN, vfilter_output_scaleKLMN);
791 vout6xKLMN = vfmaq_f32(vbiasKLMN, vout6xKLMN, vfilter_output_scaleKLMN);
792 vout7xKLMN = vfmaq_f32(vbiasKLMN, vout7xKLMN, vfilter_output_scaleKLMN);
793 const float32x4_t vbiasOPQR = vld1q_f32(w); w = (const float*) w + 4;
794 vout0xOPQR = vfmaq_f32(vbiasOPQR, vout0xOPQR, vfilter_output_scaleOPQR);
795 vout1xOPQR = vfmaq_f32(vbiasOPQR, vout1xOPQR, vfilter_output_scaleOPQR);
796 vout2xOPQR = vfmaq_f32(vbiasOPQR, vout2xOPQR, vfilter_output_scaleOPQR);
797 vout3xOPQR = vfmaq_f32(vbiasOPQR, vout3xOPQR, vfilter_output_scaleOPQR);
798 vout4xOPQR = vfmaq_f32(vbiasOPQR, vout4xOPQR, vfilter_output_scaleOPQR);
799 vout5xOPQR = vfmaq_f32(vbiasOPQR, vout5xOPQR, vfilter_output_scaleOPQR);
800 vout6xOPQR = vfmaq_f32(vbiasOPQR, vout6xOPQR, vfilter_output_scaleOPQR);
801 vout7xOPQR = vfmaq_f32(vbiasOPQR, vout7xOPQR, vfilter_output_scaleOPQR);
802 const float32x4_t vbiasSTUV = vld1q_f32(w); w = (const float*) w + 4;
803 vout0xSTUV = vfmaq_f32(vbiasSTUV, vout0xSTUV, vfilter_output_scaleSTUV);
804 vout1xSTUV = vfmaq_f32(vbiasSTUV, vout1xSTUV, vfilter_output_scaleSTUV);
805 vout2xSTUV = vfmaq_f32(vbiasSTUV, vout2xSTUV, vfilter_output_scaleSTUV);
806 vout3xSTUV = vfmaq_f32(vbiasSTUV, vout3xSTUV, vfilter_output_scaleSTUV);
807 vout4xSTUV = vfmaq_f32(vbiasSTUV, vout4xSTUV, vfilter_output_scaleSTUV);
808 vout5xSTUV = vfmaq_f32(vbiasSTUV, vout5xSTUV, vfilter_output_scaleSTUV);
809 vout6xSTUV = vfmaq_f32(vbiasSTUV, vout6xSTUV, vfilter_output_scaleSTUV);
810 vout7xSTUV = vfmaq_f32(vbiasSTUV, vout7xSTUV, vfilter_output_scaleSTUV);
811
812 float16x8_t vfp16out0x01234567 = vcombine_f16(vcvt_f16_f32(vout0x0123), vcvt_f16_f32(vout0x4567));
813 float16x8_t vfp16out0x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout0x89AB), vcvt_f16_f32(vout0xCDEF));
814 float16x8_t vfp16out0xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout0xGHIJ), vcvt_f16_f32(vout0xKLMN));
815 float16x8_t vfp16out0xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout0xOPQR), vcvt_f16_f32(vout0xSTUV));
816 float16x8_t vfp16out1x01234567 = vcombine_f16(vcvt_f16_f32(vout1x0123), vcvt_f16_f32(vout1x4567));
817 float16x8_t vfp16out1x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout1x89AB), vcvt_f16_f32(vout1xCDEF));
818 float16x8_t vfp16out1xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout1xGHIJ), vcvt_f16_f32(vout1xKLMN));
819 float16x8_t vfp16out1xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout1xOPQR), vcvt_f16_f32(vout1xSTUV));
820 float16x8_t vfp16out2x01234567 = vcombine_f16(vcvt_f16_f32(vout2x0123), vcvt_f16_f32(vout2x4567));
821 float16x8_t vfp16out2x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout2x89AB), vcvt_f16_f32(vout2xCDEF));
822 float16x8_t vfp16out2xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout2xGHIJ), vcvt_f16_f32(vout2xKLMN));
823 float16x8_t vfp16out2xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout2xOPQR), vcvt_f16_f32(vout2xSTUV));
824 float16x8_t vfp16out3x01234567 = vcombine_f16(vcvt_f16_f32(vout3x0123), vcvt_f16_f32(vout3x4567));
825 float16x8_t vfp16out3x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout3x89AB), vcvt_f16_f32(vout3xCDEF));
826 float16x8_t vfp16out3xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout3xGHIJ), vcvt_f16_f32(vout3xKLMN));
827 float16x8_t vfp16out3xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout3xOPQR), vcvt_f16_f32(vout3xSTUV));
828 float16x8_t vfp16out4x01234567 = vcombine_f16(vcvt_f16_f32(vout4x0123), vcvt_f16_f32(vout4x4567));
829 float16x8_t vfp16out4x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout4x89AB), vcvt_f16_f32(vout4xCDEF));
830 float16x8_t vfp16out4xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout4xGHIJ), vcvt_f16_f32(vout4xKLMN));
831 float16x8_t vfp16out4xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout4xOPQR), vcvt_f16_f32(vout4xSTUV));
832 float16x8_t vfp16out5x01234567 = vcombine_f16(vcvt_f16_f32(vout5x0123), vcvt_f16_f32(vout5x4567));
833 float16x8_t vfp16out5x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout5x89AB), vcvt_f16_f32(vout5xCDEF));
834 float16x8_t vfp16out5xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout5xGHIJ), vcvt_f16_f32(vout5xKLMN));
835 float16x8_t vfp16out5xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout5xOPQR), vcvt_f16_f32(vout5xSTUV));
836 float16x8_t vfp16out6x01234567 = vcombine_f16(vcvt_f16_f32(vout6x0123), vcvt_f16_f32(vout6x4567));
837 float16x8_t vfp16out6x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout6x89AB), vcvt_f16_f32(vout6xCDEF));
838 float16x8_t vfp16out6xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout6xGHIJ), vcvt_f16_f32(vout6xKLMN));
839 float16x8_t vfp16out6xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout6xOPQR), vcvt_f16_f32(vout6xSTUV));
840 float16x8_t vfp16out7x01234567 = vcombine_f16(vcvt_f16_f32(vout7x0123), vcvt_f16_f32(vout7x4567));
841 float16x8_t vfp16out7x89ABCDEF = vcombine_f16(vcvt_f16_f32(vout7x89AB), vcvt_f16_f32(vout7xCDEF));
842 float16x8_t vfp16out7xGHIJKLMN = vcombine_f16(vcvt_f16_f32(vout7xGHIJ), vcvt_f16_f32(vout7xKLMN));
843 float16x8_t vfp16out7xOPQRSTUV = vcombine_f16(vcvt_f16_f32(vout7xOPQR), vcvt_f16_f32(vout7xSTUV));
844
845 const float16x8_t voutput_min = vreinterpretq_f16_u16(vld1q_dup_u16((const uint16_t*) &params->scalar.min));
846 vfp16out0x01234567 = vmaxq_f16(vfp16out0x01234567, voutput_min);
847 vfp16out0x89ABCDEF = vmaxq_f16(vfp16out0x89ABCDEF, voutput_min);
848 vfp16out0xGHIJKLMN = vmaxq_f16(vfp16out0xGHIJKLMN, voutput_min);
849 vfp16out0xOPQRSTUV = vmaxq_f16(vfp16out0xOPQRSTUV, voutput_min);
850 vfp16out1x01234567 = vmaxq_f16(vfp16out1x01234567, voutput_min);
851 vfp16out1x89ABCDEF = vmaxq_f16(vfp16out1x89ABCDEF, voutput_min);
852 vfp16out1xGHIJKLMN = vmaxq_f16(vfp16out1xGHIJKLMN, voutput_min);
853 vfp16out1xOPQRSTUV = vmaxq_f16(vfp16out1xOPQRSTUV, voutput_min);
854 vfp16out2x01234567 = vmaxq_f16(vfp16out2x01234567, voutput_min);
855 vfp16out2x89ABCDEF = vmaxq_f16(vfp16out2x89ABCDEF, voutput_min);
856 vfp16out2xGHIJKLMN = vmaxq_f16(vfp16out2xGHIJKLMN, voutput_min);
857 vfp16out2xOPQRSTUV = vmaxq_f16(vfp16out2xOPQRSTUV, voutput_min);
858 vfp16out3x01234567 = vmaxq_f16(vfp16out3x01234567, voutput_min);
859 vfp16out3x89ABCDEF = vmaxq_f16(vfp16out3x89ABCDEF, voutput_min);
860 vfp16out3xGHIJKLMN = vmaxq_f16(vfp16out3xGHIJKLMN, voutput_min);
861 vfp16out3xOPQRSTUV = vmaxq_f16(vfp16out3xOPQRSTUV, voutput_min);
862 vfp16out4x01234567 = vmaxq_f16(vfp16out4x01234567, voutput_min);
863 vfp16out4x89ABCDEF = vmaxq_f16(vfp16out4x89ABCDEF, voutput_min);
864 vfp16out4xGHIJKLMN = vmaxq_f16(vfp16out4xGHIJKLMN, voutput_min);
865 vfp16out4xOPQRSTUV = vmaxq_f16(vfp16out4xOPQRSTUV, voutput_min);
866 vfp16out5x01234567 = vmaxq_f16(vfp16out5x01234567, voutput_min);
867 vfp16out5x89ABCDEF = vmaxq_f16(vfp16out5x89ABCDEF, voutput_min);
868 vfp16out5xGHIJKLMN = vmaxq_f16(vfp16out5xGHIJKLMN, voutput_min);
869 vfp16out5xOPQRSTUV = vmaxq_f16(vfp16out5xOPQRSTUV, voutput_min);
870 vfp16out6x01234567 = vmaxq_f16(vfp16out6x01234567, voutput_min);
871 vfp16out6x89ABCDEF = vmaxq_f16(vfp16out6x89ABCDEF, voutput_min);
872 vfp16out6xGHIJKLMN = vmaxq_f16(vfp16out6xGHIJKLMN, voutput_min);
873 vfp16out6xOPQRSTUV = vmaxq_f16(vfp16out6xOPQRSTUV, voutput_min);
874 vfp16out7x01234567 = vmaxq_f16(vfp16out7x01234567, voutput_min);
875 vfp16out7x89ABCDEF = vmaxq_f16(vfp16out7x89ABCDEF, voutput_min);
876 vfp16out7xGHIJKLMN = vmaxq_f16(vfp16out7xGHIJKLMN, voutput_min);
877 vfp16out7xOPQRSTUV = vmaxq_f16(vfp16out7xOPQRSTUV, voutput_min);
878 const float16x8_t voutput_max = vreinterpretq_f16_u16(vld1q_dup_u16((const uint16_t*) &params->scalar.max));
879 vfp16out0x01234567 = vminq_f16(vfp16out0x01234567, voutput_max);
880 vfp16out0x89ABCDEF = vminq_f16(vfp16out0x89ABCDEF, voutput_max);
881 vfp16out0xGHIJKLMN = vminq_f16(vfp16out0xGHIJKLMN, voutput_max);
882 vfp16out0xOPQRSTUV = vminq_f16(vfp16out0xOPQRSTUV, voutput_max);
883 vfp16out1x01234567 = vminq_f16(vfp16out1x01234567, voutput_max);
884 vfp16out1x89ABCDEF = vminq_f16(vfp16out1x89ABCDEF, voutput_max);
885 vfp16out1xGHIJKLMN = vminq_f16(vfp16out1xGHIJKLMN, voutput_max);
886 vfp16out1xOPQRSTUV = vminq_f16(vfp16out1xOPQRSTUV, voutput_max);
887 vfp16out2x01234567 = vminq_f16(vfp16out2x01234567, voutput_max);
888 vfp16out2x89ABCDEF = vminq_f16(vfp16out2x89ABCDEF, voutput_max);
889 vfp16out2xGHIJKLMN = vminq_f16(vfp16out2xGHIJKLMN, voutput_max);
890 vfp16out2xOPQRSTUV = vminq_f16(vfp16out2xOPQRSTUV, voutput_max);
891 vfp16out3x01234567 = vminq_f16(vfp16out3x01234567, voutput_max);
892 vfp16out3x89ABCDEF = vminq_f16(vfp16out3x89ABCDEF, voutput_max);
893 vfp16out3xGHIJKLMN = vminq_f16(vfp16out3xGHIJKLMN, voutput_max);
894 vfp16out3xOPQRSTUV = vminq_f16(vfp16out3xOPQRSTUV, voutput_max);
895 vfp16out4x01234567 = vminq_f16(vfp16out4x01234567, voutput_max);
896 vfp16out4x89ABCDEF = vminq_f16(vfp16out4x89ABCDEF, voutput_max);
897 vfp16out4xGHIJKLMN = vminq_f16(vfp16out4xGHIJKLMN, voutput_max);
898 vfp16out4xOPQRSTUV = vminq_f16(vfp16out4xOPQRSTUV, voutput_max);
899 vfp16out5x01234567 = vminq_f16(vfp16out5x01234567, voutput_max);
900 vfp16out5x89ABCDEF = vminq_f16(vfp16out5x89ABCDEF, voutput_max);
901 vfp16out5xGHIJKLMN = vminq_f16(vfp16out5xGHIJKLMN, voutput_max);
902 vfp16out5xOPQRSTUV = vminq_f16(vfp16out5xOPQRSTUV, voutput_max);
903 vfp16out6x01234567 = vminq_f16(vfp16out6x01234567, voutput_max);
904 vfp16out6x89ABCDEF = vminq_f16(vfp16out6x89ABCDEF, voutput_max);
905 vfp16out6xGHIJKLMN = vminq_f16(vfp16out6xGHIJKLMN, voutput_max);
906 vfp16out6xOPQRSTUV = vminq_f16(vfp16out6xOPQRSTUV, voutput_max);
907 vfp16out7x01234567 = vminq_f16(vfp16out7x01234567, voutput_max);
908 vfp16out7x89ABCDEF = vminq_f16(vfp16out7x89ABCDEF, voutput_max);
909 vfp16out7xGHIJKLMN = vminq_f16(vfp16out7xGHIJKLMN, voutput_max);
910 vfp16out7xOPQRSTUV = vminq_f16(vfp16out7xOPQRSTUV, voutput_max);
911 if XNN_LIKELY(nc >= 32) {
912 vst1q_u16(c0, vreinterpretq_u16_f16(vfp16out0x01234567));
913 vst1q_u16(c0 + 8, vreinterpretq_u16_f16(vfp16out0x89ABCDEF));
914 vst1q_u16(c0 + 16, vreinterpretq_u16_f16(vfp16out0xGHIJKLMN));
915 vst1q_u16(c0 + 24, vreinterpretq_u16_f16(vfp16out0xOPQRSTUV));
916 vst1q_u16(c1, vreinterpretq_u16_f16(vfp16out1x01234567));
917 vst1q_u16(c1 + 8, vreinterpretq_u16_f16(vfp16out1x89ABCDEF));
918 vst1q_u16(c1 + 16, vreinterpretq_u16_f16(vfp16out1xGHIJKLMN));
919 vst1q_u16(c1 + 24, vreinterpretq_u16_f16(vfp16out1xOPQRSTUV));
920 vst1q_u16(c2, vreinterpretq_u16_f16(vfp16out2x01234567));
921 vst1q_u16(c2 + 8, vreinterpretq_u16_f16(vfp16out2x89ABCDEF));
922 vst1q_u16(c2 + 16, vreinterpretq_u16_f16(vfp16out2xGHIJKLMN));
923 vst1q_u16(c2 + 24, vreinterpretq_u16_f16(vfp16out2xOPQRSTUV));
924 vst1q_u16(c3, vreinterpretq_u16_f16(vfp16out3x01234567));
925 vst1q_u16(c3 + 8, vreinterpretq_u16_f16(vfp16out3x89ABCDEF));
926 vst1q_u16(c3 + 16, vreinterpretq_u16_f16(vfp16out3xGHIJKLMN));
927 vst1q_u16(c3 + 24, vreinterpretq_u16_f16(vfp16out3xOPQRSTUV));
928 vst1q_u16(c4, vreinterpretq_u16_f16(vfp16out4x01234567));
929 vst1q_u16(c4 + 8, vreinterpretq_u16_f16(vfp16out4x89ABCDEF));
930 vst1q_u16(c4 + 16, vreinterpretq_u16_f16(vfp16out4xGHIJKLMN));
931 vst1q_u16(c4 + 24, vreinterpretq_u16_f16(vfp16out4xOPQRSTUV));
932 vst1q_u16(c5, vreinterpretq_u16_f16(vfp16out5x01234567));
933 vst1q_u16(c5 + 8, vreinterpretq_u16_f16(vfp16out5x89ABCDEF));
934 vst1q_u16(c5 + 16, vreinterpretq_u16_f16(vfp16out5xGHIJKLMN));
935 vst1q_u16(c5 + 24, vreinterpretq_u16_f16(vfp16out5xOPQRSTUV));
936 vst1q_u16(c6, vreinterpretq_u16_f16(vfp16out6x01234567));
937 vst1q_u16(c6 + 8, vreinterpretq_u16_f16(vfp16out6x89ABCDEF));
938 vst1q_u16(c6 + 16, vreinterpretq_u16_f16(vfp16out6xGHIJKLMN));
939 vst1q_u16(c6 + 24, vreinterpretq_u16_f16(vfp16out6xOPQRSTUV));
940 vst1q_u16(c7, vreinterpretq_u16_f16(vfp16out7x01234567));
941 vst1q_u16(c7 + 8, vreinterpretq_u16_f16(vfp16out7x89ABCDEF));
942 vst1q_u16(c7 + 16, vreinterpretq_u16_f16(vfp16out7xGHIJKLMN));
943 vst1q_u16(c7 + 24, vreinterpretq_u16_f16(vfp16out7xOPQRSTUV));
944
945 a0 = (const int8_t*) ((uintptr_t) a0 - kc);
946 a1 = (const int8_t*) ((uintptr_t) a1 - kc);
947 a2 = (const int8_t*) ((uintptr_t) a2 - kc);
948 a3 = (const int8_t*) ((uintptr_t) a3 - kc);
949 a4 = (const int8_t*) ((uintptr_t) a4 - kc);
950 a5 = (const int8_t*) ((uintptr_t) a5 - kc);
951 a6 = (const int8_t*) ((uintptr_t) a6 - kc);
952 a7 = (const int8_t*) ((uintptr_t) a7 - kc);
953
954 c0 = (uint16_t*) ((uintptr_t) c0 + cn_stride);
955 c1 = (uint16_t*) ((uintptr_t) c1 + cn_stride);
956 c2 = (uint16_t*) ((uintptr_t) c2 + cn_stride);
957 c3 = (uint16_t*) ((uintptr_t) c3 + cn_stride);
958 c4 = (uint16_t*) ((uintptr_t) c4 + cn_stride);
959 c5 = (uint16_t*) ((uintptr_t) c5 + cn_stride);
960 c6 = (uint16_t*) ((uintptr_t) c6 + cn_stride);
961 c7 = (uint16_t*) ((uintptr_t) c7 + cn_stride);
962
963 nc -= 32;
964 } else {
965 if (nc & 16) {
966 vst1q_u16(c0, vreinterpretq_u16_f16(vfp16out0x01234567)); c0 += 8;
967 vfp16out0x01234567 = vfp16out0xGHIJKLMN;
968 vst1q_u16(c1, vreinterpretq_u16_f16(vfp16out1x01234567)); c1 += 8;
969 vfp16out1x01234567 = vfp16out1xGHIJKLMN;
970 vst1q_u16(c2, vreinterpretq_u16_f16(vfp16out2x01234567)); c2 += 8;
971 vfp16out2x01234567 = vfp16out2xGHIJKLMN;
972 vst1q_u16(c3, vreinterpretq_u16_f16(vfp16out3x01234567)); c3 += 8;
973 vfp16out3x01234567 = vfp16out3xGHIJKLMN;
974 vst1q_u16(c4, vreinterpretq_u16_f16(vfp16out4x01234567)); c4 += 8;
975 vfp16out4x01234567 = vfp16out4xGHIJKLMN;
976 vst1q_u16(c5, vreinterpretq_u16_f16(vfp16out5x01234567)); c5 += 8;
977 vfp16out5x01234567 = vfp16out5xGHIJKLMN;
978 vst1q_u16(c6, vreinterpretq_u16_f16(vfp16out6x01234567)); c6 += 8;
979 vfp16out6x01234567 = vfp16out6xGHIJKLMN;
980 vst1q_u16(c7, vreinterpretq_u16_f16(vfp16out7x01234567)); c7 += 8;
981 vfp16out7x01234567 = vfp16out7xGHIJKLMN;
982 vst1q_u16(c0, vreinterpretq_u16_f16(vfp16out0x89ABCDEF)); c0 += 8;
983 vfp16out0x89ABCDEF = vfp16out0xOPQRSTUV;
984 vst1q_u16(c1, vreinterpretq_u16_f16(vfp16out1x89ABCDEF)); c1 += 8;
985 vfp16out1x89ABCDEF = vfp16out1xOPQRSTUV;
986 vst1q_u16(c2, vreinterpretq_u16_f16(vfp16out2x89ABCDEF)); c2 += 8;
987 vfp16out2x89ABCDEF = vfp16out2xOPQRSTUV;
988 vst1q_u16(c3, vreinterpretq_u16_f16(vfp16out3x89ABCDEF)); c3 += 8;
989 vfp16out3x89ABCDEF = vfp16out3xOPQRSTUV;
990 vst1q_u16(c4, vreinterpretq_u16_f16(vfp16out4x89ABCDEF)); c4 += 8;
991 vfp16out4x89ABCDEF = vfp16out4xOPQRSTUV;
992 vst1q_u16(c5, vreinterpretq_u16_f16(vfp16out5x89ABCDEF)); c5 += 8;
993 vfp16out5x89ABCDEF = vfp16out5xOPQRSTUV;
994 vst1q_u16(c6, vreinterpretq_u16_f16(vfp16out6x89ABCDEF)); c6 += 8;
995 vfp16out6x89ABCDEF = vfp16out6xOPQRSTUV;
996 vst1q_u16(c7, vreinterpretq_u16_f16(vfp16out7x89ABCDEF)); c7 += 8;
997 vfp16out7x89ABCDEF = vfp16out7xOPQRSTUV;
998 }
999 if (nc & 8) {
1000 vst1q_u16(c0, vreinterpretq_u16_f16(vfp16out0x01234567)); c0 += 8;
1001 vfp16out0x01234567 = vfp16out0x89ABCDEF;
1002 vst1q_u16(c1, vreinterpretq_u16_f16(vfp16out1x01234567)); c1 += 8;
1003 vfp16out1x01234567 = vfp16out1x89ABCDEF;
1004 vst1q_u16(c2, vreinterpretq_u16_f16(vfp16out2x01234567)); c2 += 8;
1005 vfp16out2x01234567 = vfp16out2x89ABCDEF;
1006 vst1q_u16(c3, vreinterpretq_u16_f16(vfp16out3x01234567)); c3 += 8;
1007 vfp16out3x01234567 = vfp16out3x89ABCDEF;
1008 vst1q_u16(c4, vreinterpretq_u16_f16(vfp16out4x01234567)); c4 += 8;
1009 vfp16out4x01234567 = vfp16out4x89ABCDEF;
1010 vst1q_u16(c5, vreinterpretq_u16_f16(vfp16out5x01234567)); c5 += 8;
1011 vfp16out5x01234567 = vfp16out5x89ABCDEF;
1012 vst1q_u16(c6, vreinterpretq_u16_f16(vfp16out6x01234567)); c6 += 8;
1013 vfp16out6x01234567 = vfp16out6x89ABCDEF;
1014 vst1q_u16(c7, vreinterpretq_u16_f16(vfp16out7x01234567)); c7 += 8;
1015 vfp16out7x01234567 = vfp16out7x89ABCDEF;
1016 }
1017 float16x4_t vfp16out0x0123 = vget_low_f16(vfp16out0x01234567);
1018 float16x4_t vfp16out1x0123 = vget_low_f16(vfp16out1x01234567);
1019 float16x4_t vfp16out2x0123 = vget_low_f16(vfp16out2x01234567);
1020 float16x4_t vfp16out3x0123 = vget_low_f16(vfp16out3x01234567);
1021 float16x4_t vfp16out4x0123 = vget_low_f16(vfp16out4x01234567);
1022 float16x4_t vfp16out5x0123 = vget_low_f16(vfp16out5x01234567);
1023 float16x4_t vfp16out6x0123 = vget_low_f16(vfp16out6x01234567);
1024 float16x4_t vfp16out7x0123 = vget_low_f16(vfp16out7x01234567);
1025 if (nc & 4) {
1026 vst1_u16(c0, vreinterpret_u16_f16(vfp16out0x0123)); c0 += 4;
1027 vst1_u16(c1, vreinterpret_u16_f16(vfp16out1x0123)); c1 += 4;
1028 vst1_u16(c2, vreinterpret_u16_f16(vfp16out2x0123)); c2 += 4;
1029 vst1_u16(c3, vreinterpret_u16_f16(vfp16out3x0123)); c3 += 4;
1030 vst1_u16(c4, vreinterpret_u16_f16(vfp16out4x0123)); c4 += 4;
1031 vst1_u16(c5, vreinterpret_u16_f16(vfp16out5x0123)); c5 += 4;
1032 vst1_u16(c6, vreinterpret_u16_f16(vfp16out6x0123)); c6 += 4;
1033 vst1_u16(c7, vreinterpret_u16_f16(vfp16out7x0123)); c7 += 4;
1034 vfp16out0x0123 = vget_high_f16(vfp16out0x01234567);
1035 vfp16out1x0123 = vget_high_f16(vfp16out1x01234567);
1036 vfp16out2x0123 = vget_high_f16(vfp16out2x01234567);
1037 vfp16out3x0123 = vget_high_f16(vfp16out3x01234567);
1038 vfp16out4x0123 = vget_high_f16(vfp16out4x01234567);
1039 vfp16out5x0123 = vget_high_f16(vfp16out5x01234567);
1040 vfp16out6x0123 = vget_high_f16(vfp16out6x01234567);
1041 vfp16out7x0123 = vget_high_f16(vfp16out7x01234567);
1042 }
1043 if (nc & 2) {
1044 vst1_lane_u32((void*) c0, vreinterpret_u32_f16(vfp16out0x0123), 0); c0 += 2;
1045 vst1_lane_u32((void*) c1, vreinterpret_u32_f16(vfp16out1x0123), 0); c1 += 2;
1046 vst1_lane_u32((void*) c2, vreinterpret_u32_f16(vfp16out2x0123), 0); c2 += 2;
1047 vst1_lane_u32((void*) c3, vreinterpret_u32_f16(vfp16out3x0123), 0); c3 += 2;
1048 vst1_lane_u32((void*) c4, vreinterpret_u32_f16(vfp16out4x0123), 0); c4 += 2;
1049 vst1_lane_u32((void*) c5, vreinterpret_u32_f16(vfp16out5x0123), 0); c5 += 2;
1050 vst1_lane_u32((void*) c6, vreinterpret_u32_f16(vfp16out6x0123), 0); c6 += 2;
1051 vst1_lane_u32((void*) c7, vreinterpret_u32_f16(vfp16out7x0123), 0); c7 += 2;
1052 vfp16out0x0123 = vext_f16(vfp16out0x0123, vfp16out0x0123, 2);
1053 vfp16out1x0123 = vext_f16(vfp16out1x0123, vfp16out1x0123, 2);
1054 vfp16out2x0123 = vext_f16(vfp16out2x0123, vfp16out2x0123, 2);
1055 vfp16out3x0123 = vext_f16(vfp16out3x0123, vfp16out3x0123, 2);
1056 vfp16out4x0123 = vext_f16(vfp16out4x0123, vfp16out4x0123, 2);
1057 vfp16out5x0123 = vext_f16(vfp16out5x0123, vfp16out5x0123, 2);
1058 vfp16out6x0123 = vext_f16(vfp16out6x0123, vfp16out6x0123, 2);
1059 vfp16out7x0123 = vext_f16(vfp16out7x0123, vfp16out7x0123, 2);
1060 }
1061 if (nc & 1) {
1062 vst1_lane_u16(c0, vreinterpret_u16_f16(vfp16out0x0123), 0);
1063 vst1_lane_u16(c1, vreinterpret_u16_f16(vfp16out1x0123), 0);
1064 vst1_lane_u16(c2, vreinterpret_u16_f16(vfp16out2x0123), 0);
1065 vst1_lane_u16(c3, vreinterpret_u16_f16(vfp16out3x0123), 0);
1066 vst1_lane_u16(c4, vreinterpret_u16_f16(vfp16out4x0123), 0);
1067 vst1_lane_u16(c5, vreinterpret_u16_f16(vfp16out5x0123), 0);
1068 vst1_lane_u16(c6, vreinterpret_u16_f16(vfp16out6x0123), 0);
1069 vst1_lane_u16(c7, vreinterpret_u16_f16(vfp16out7x0123), 0);
1070 }
1071 nc = 0;
1072 }
1073 } while (nc != 0);
1074 }