| 1 |
// Auto-generated file. Do not edit! |
| 2 |
// Template: src/qs8-igemm/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/igemm.h" |
| 15 |
#include "xnnpack/intrinsics-polyfill.h" |
| 16 |
#include "xnnpack/math.h" |
| 17 |
|
| 18 |
|
| 19 |
void xnn_qs8_qc8w_igemm_minmax_fp32_ukernel_6x16c8__neoni8mm( |
| 20 |
size_t mr, |
| 21 |
size_t nc, |
| 22 |
size_t kc, |
| 23 |
size_t ks, |
| 24 |
const int8_t** restrict a, |
| 25 |
const void* restrict w, |
| 26 |
int8_t* restrict c, |
| 27 |
size_t cm_stride, |
| 28 |
size_t cn_stride, |
| 29 |
size_t a_offset, |
| 30 |
const int8_t* zero, |
| 31 |
const union xnn_qs8_qc8w_conv_minmax_params params[restrict XNN_MIN_ELEMENTS(1)]) XNN_OOB_READS |
| 32 |
{ |
| 33 |
assert(mr != 0); |
| 34 |
assert(mr <= 6); |
| 35 |
assert(nc != 0); |
| 36 |
assert(kc != 0); |
| 37 |
assert(ks != 0); |
| 38 |
assert(ks % (6 * sizeof(void*)) == 0); |
| 39 |
assert(a_offset % sizeof(int8_t) == 0); |
| 40 |
assert(a != NULL); |
| 41 |
assert(w != NULL); |
| 42 |
assert(c != NULL); |
| 43 |
|
| 44 |
kc = round_up_po2(kc, 8 * sizeof(int8_t)); |
| 45 |
int8_t* c0 = c; |
| 46 |
int8_t* c1 = (int8_t*) ((uintptr_t) c0 + cm_stride); |
| 47 |
if XNN_UNPREDICTABLE(mr < 2) { |
| 48 |
c1 = c0; |
| 49 |
} |
| 50 |
int8_t* c2 = (int8_t*) ((uintptr_t) c1 + cm_stride); |
| 51 |
if XNN_UNPREDICTABLE(mr <= 2) { |
| 52 |
c2 = c1; |
| 53 |
} |
| 54 |
int8_t* c3 = (int8_t*) ((uintptr_t) c2 + cm_stride); |
| 55 |
if XNN_UNPREDICTABLE(mr < 4) { |
| 56 |
c3 = c2; |
| 57 |
} |
| 58 |
int8_t* c4 = (int8_t*) ((uintptr_t) c3 + cm_stride); |
| 59 |
if XNN_UNPREDICTABLE(mr <= 4) { |
| 60 |
c4 = c3; |
| 61 |
} |
| 62 |
int8_t* c5 = (int8_t*) ((uintptr_t) c4 + cm_stride); |
| 63 |
if XNN_UNPREDICTABLE(mr != 6) { |
| 64 |
c5 = c4; |
| 65 |
} |
| 66 |
|
| 67 |
do { |
| 68 |
const uint64x2x2_t vbias01x0123 = vld2q_dup_u64(w); w = (const int32_t*) w + 4; |
| 69 |
const uint64x2x2_t vbias01x4567 = vld2q_dup_u64(w); w = (const int32_t*) w + 4; |
| 70 |
const uint64x2x2_t vbias01x89AB = vld2q_dup_u64(w); w = (const int32_t*) w + 4; |
| 71 |
const uint64x2x2_t vbias01xCDEF = vld2q_dup_u64(w); w = (const int32_t*) w + 4; |
| 72 |
int32x4_t vacc01x01 = vreinterpretq_s32_u64(vbias01x0123.val[0]); |
| 73 |
int32x4_t vacc01x23 = vreinterpretq_s32_u64(vbias01x0123.val[1]); |
| 74 |
int32x4_t vacc01x45 = vreinterpretq_s32_u64(vbias01x4567.val[0]); |
| 75 |
int32x4_t vacc01x67 = vreinterpretq_s32_u64(vbias01x4567.val[1]); |
| 76 |
int32x4_t vacc01x89 = vreinterpretq_s32_u64(vbias01x89AB.val[0]); |
| 77 |
int32x4_t vacc01xAB = vreinterpretq_s32_u64(vbias01x89AB.val[1]); |
| 78 |
int32x4_t vacc01xCD = vreinterpretq_s32_u64(vbias01xCDEF.val[0]); |
| 79 |
int32x4_t vacc01xEF = vreinterpretq_s32_u64(vbias01xCDEF.val[1]); |
| 80 |
int32x4_t vacc23x01 = vreinterpretq_s32_u64(vbias01x0123.val[0]); |
| 81 |
int32x4_t vacc23x23 = vreinterpretq_s32_u64(vbias01x0123.val[1]); |
| 82 |
int32x4_t vacc23x45 = vreinterpretq_s32_u64(vbias01x4567.val[0]); |
| 83 |
int32x4_t vacc23x67 = vreinterpretq_s32_u64(vbias01x4567.val[1]); |
| 84 |
int32x4_t vacc23x89 = vreinterpretq_s32_u64(vbias01x89AB.val[0]); |
| 85 |
int32x4_t vacc23xAB = vreinterpretq_s32_u64(vbias01x89AB.val[1]); |
| 86 |
int32x4_t vacc23xCD = vreinterpretq_s32_u64(vbias01xCDEF.val[0]); |
| 87 |
int32x4_t vacc23xEF = vreinterpretq_s32_u64(vbias01xCDEF.val[1]); |
| 88 |
int32x4_t vacc45x01 = vreinterpretq_s32_u64(vbias01x0123.val[0]); |
| 89 |
int32x4_t vacc45x23 = vreinterpretq_s32_u64(vbias01x0123.val[1]); |
| 90 |
int32x4_t vacc45x45 = vreinterpretq_s32_u64(vbias01x4567.val[0]); |
| 91 |
int32x4_t vacc45x67 = vreinterpretq_s32_u64(vbias01x4567.val[1]); |
| 92 |
int32x4_t vacc45x89 = vreinterpretq_s32_u64(vbias01x89AB.val[0]); |
| 93 |
int32x4_t vacc45xAB = vreinterpretq_s32_u64(vbias01x89AB.val[1]); |
| 94 |
int32x4_t vacc45xCD = vreinterpretq_s32_u64(vbias01xCDEF.val[0]); |
| 95 |
int32x4_t vacc45xEF = vreinterpretq_s32_u64(vbias01xCDEF.val[1]); |
| 96 |
|
| 97 |
size_t p = ks; |
| 98 |
do { |
| 99 |
const int8_t* restrict a0 = a[0]; |
| 100 |
if XNN_UNPREDICTABLE(a0 != zero) { |
| 101 |
a0 = (const int8_t*) ((uintptr_t) a0 + a_offset); |
| 102 |
} |
| 103 |
const int8_t* restrict a1 = a[1]; |
| 104 |
if XNN_UNPREDICTABLE(a1 != zero) { |
| 105 |
a1 = (const int8_t*) ((uintptr_t) a1 + a_offset); |
| 106 |
} |
| 107 |
const int8_t* restrict a2 = a[2]; |
| 108 |
if XNN_UNPREDICTABLE(a2 != zero) { |
| 109 |
a2 = (const int8_t*) ((uintptr_t) a2 + a_offset); |
| 110 |
} |
| 111 |
const int8_t* restrict a3 = a[3]; |
| 112 |
if XNN_UNPREDICTABLE(a3 != zero) { |
| 113 |
a3 = (const int8_t*) ((uintptr_t) a3 + a_offset); |
| 114 |
} |
| 115 |
const int8_t* restrict a4 = a[4]; |
| 116 |
if XNN_UNPREDICTABLE(a4 != zero) { |
| 117 |
a4 = (const int8_t*) ((uintptr_t) a4 + a_offset); |
| 118 |
} |
| 119 |
const int8_t* restrict a5 = a[5]; |
| 120 |
if XNN_UNPREDICTABLE(a5 != zero) { |
| 121 |
a5 = (const int8_t*) ((uintptr_t) a5 + a_offset); |
| 122 |
} |
| 123 |
a += 6; |
| 124 |
|
| 125 |
uint64x2x2_t va01x0123456789ABCDEF; |
| 126 |
va01x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 127 |
va01x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 128 |
uint64x2x2_t va23x0123456789ABCDEF; |
| 129 |
va23x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 130 |
va23x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 131 |
uint64x2x2_t va45x0123456789ABCDEF; |
| 132 |
va45x0123456789ABCDEF.val[0] = vdupq_n_u64(0); |
| 133 |
va45x0123456789ABCDEF.val[1] = vdupq_n_u64(0); |
| 134 |
|
| 135 |
// Inner accumulation loop along the 16 columns. |
| 136 |
size_t k = kc; |
| 137 |
// 2x partial unrolled loop to load 8 bytes at a time. |
| 138 |
while (k >= 16 * sizeof(int8_t)) { |
| 139 |
// Load a 6x16 block of activations. |
| 140 |
va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a0, va01x0123456789ABCDEF, 0); a0 += 16; |
| 141 |
va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a2, va23x0123456789ABCDEF, 0); a2 += 16; |
| 142 |
va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a4, va45x0123456789ABCDEF, 0); a4 += 16; |
| 143 |
va01x0123456789ABCDEF = vld2q_lane_u64((const void*) a1, va01x0123456789ABCDEF, 1); a1 += 16; |
| 144 |
va23x0123456789ABCDEF = vld2q_lane_u64((const void*) a3, va23x0123456789ABCDEF, 1); a3 += 16; |
| 145 |
va45x0123456789ABCDEF = vld2q_lane_u64((const void*) a5, va45x0123456789ABCDEF, 1); a5 += 16; |
| 146 |
|
| 147 |
// Load a 16x16 block of weights. |
| 148 |
const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 149 |
const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 150 |
const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 151 |
const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 152 |
const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 153 |
const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 154 |
const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 155 |
const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 156 |
const int8x16_t vb01x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 157 |
const int8x16_t vb23x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 158 |
const int8x16_t vb45x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 159 |
const int8x16_t vb67x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 160 |
const int8x16_t vb89x89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 161 |
const int8x16_t vbABx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 162 |
const int8x16_t vbCDx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 163 |
const int8x16_t vbEFx89ABCDEF = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 164 |
|
| 165 |
// Multiply-accumulate: 6x16 * 16x16 --> 6x16. |
| 166 |
vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vb01x01234567); |
| 167 |
vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vb23x01234567); |
| 168 |
vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vb45x01234567); |
| 169 |
vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vb67x01234567); |
| 170 |
vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vb89x01234567); |
| 171 |
vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vbABx01234567); |
| 172 |
vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vbCDx01234567); |
| 173 |
vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[0]), vbEFx01234567); |
| 174 |
vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vb01x01234567); |
| 175 |
vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vb23x01234567); |
| 176 |
vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vb45x01234567); |
| 177 |
vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vb67x01234567); |
| 178 |
vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vb89x01234567); |
| 179 |
vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vbABx01234567); |
| 180 |
vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vbCDx01234567); |
| 181 |
vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[0]), vbEFx01234567); |
| 182 |
vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vb01x01234567); |
| 183 |
vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vb23x01234567); |
| 184 |
vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vb45x01234567); |
| 185 |
vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vb67x01234567); |
| 186 |
vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vb89x01234567); |
| 187 |
vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vbABx01234567); |
| 188 |
vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vbCDx01234567); |
| 189 |
vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[0]), vbEFx01234567); |
| 190 |
vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vb01x89ABCDEF); |
| 191 |
vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vb23x89ABCDEF); |
| 192 |
vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vb45x89ABCDEF); |
| 193 |
vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vb67x89ABCDEF); |
| 194 |
vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vb89x89ABCDEF); |
| 195 |
vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vbABx89ABCDEF); |
| 196 |
vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vbCDx89ABCDEF); |
| 197 |
vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x0123456789ABCDEF.val[1]), vbEFx89ABCDEF); |
| 198 |
vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vb01x89ABCDEF); |
| 199 |
vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vb23x89ABCDEF); |
| 200 |
vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vb45x89ABCDEF); |
| 201 |
vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vb67x89ABCDEF); |
| 202 |
vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vb89x89ABCDEF); |
| 203 |
vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vbABx89ABCDEF); |
| 204 |
vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vbCDx89ABCDEF); |
| 205 |
vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x0123456789ABCDEF.val[1]), vbEFx89ABCDEF); |
| 206 |
vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vb01x89ABCDEF); |
| 207 |
vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vb23x89ABCDEF); |
| 208 |
vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vb45x89ABCDEF); |
| 209 |
vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vb67x89ABCDEF); |
| 210 |
vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vb89x89ABCDEF); |
| 211 |
vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vbABx89ABCDEF); |
| 212 |
vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vbCDx89ABCDEF); |
| 213 |
vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x0123456789ABCDEF.val[1]), vbEFx89ABCDEF); |
| 214 |
|
| 215 |
k -= 16 * sizeof(int8_t); |
| 216 |
} |
| 217 |
// Handle up to 8 final positions of `k` |
| 218 |
if XNN_UNLIKELY(k != 0) { |
| 219 |
// Load a 6x8 block of activations. |
| 220 |
uint64x2_t va01x01234567 = vld1q_dup_u64((const void*) a0); a0 += 8; |
| 221 |
uint64x2_t va23x01234567 = vld1q_dup_u64((const void*) a2); a2 += 8; |
| 222 |
uint64x2_t va45x01234567 = vld1q_dup_u64((const void*) a4); a4 += 8; |
| 223 |
va01x01234567 = vld1q_lane_u64((const void*) a1, va01x01234567, 1); a1 += 8; |
| 224 |
va23x01234567 = vld1q_lane_u64((const void*) a3, va23x01234567, 1); a3 += 8; |
| 225 |
va45x01234567 = vld1q_lane_u64((const void*) a5, va45x01234567, 1); a5 += 8; |
| 226 |
|
| 227 |
// Load a 16x16 block of weights. |
| 228 |
const int8x16_t vb01x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 229 |
const int8x16_t vb23x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 230 |
const int8x16_t vb45x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 231 |
const int8x16_t vb67x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 232 |
const int8x16_t vb89x01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 233 |
const int8x16_t vbABx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 234 |
const int8x16_t vbCDx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 235 |
const int8x16_t vbEFx01234567 = vld1q_s8(w); w = (const int8_t*) w + 16; |
| 236 |
|
| 237 |
// Multiply-accumulate: 6x4 * 4x16 --> 6x16. |
| 238 |
vacc01x01 = vmmlaq_s32(vacc01x01, vreinterpretq_s8_u64(va01x01234567), vb01x01234567); |
| 239 |
vacc01x23 = vmmlaq_s32(vacc01x23, vreinterpretq_s8_u64(va01x01234567), vb23x01234567); |
| 240 |
vacc01x45 = vmmlaq_s32(vacc01x45, vreinterpretq_s8_u64(va01x01234567), vb45x01234567); |
| 241 |
vacc01x67 = vmmlaq_s32(vacc01x67, vreinterpretq_s8_u64(va01x01234567), vb67x01234567); |
| 242 |
vacc01x89 = vmmlaq_s32(vacc01x89, vreinterpretq_s8_u64(va01x01234567), vb89x01234567); |
| 243 |
vacc01xAB = vmmlaq_s32(vacc01xAB, vreinterpretq_s8_u64(va01x01234567), vbABx01234567); |
| 244 |
vacc01xCD = vmmlaq_s32(vacc01xCD, vreinterpretq_s8_u64(va01x01234567), vbCDx01234567); |
| 245 |
vacc01xEF = vmmlaq_s32(vacc01xEF, vreinterpretq_s8_u64(va01x01234567), vbEFx01234567); |
| 246 |
vacc23x01 = vmmlaq_s32(vacc23x01, vreinterpretq_s8_u64(va23x01234567), vb01x01234567); |
| 247 |
vacc23x23 = vmmlaq_s32(vacc23x23, vreinterpretq_s8_u64(va23x01234567), vb23x01234567); |
| 248 |
vacc23x45 = vmmlaq_s32(vacc23x45, vreinterpretq_s8_u64(va23x01234567), vb45x01234567); |
| 249 |
vacc23x67 = vmmlaq_s32(vacc23x67, vreinterpretq_s8_u64(va23x01234567), vb67x01234567); |
| 250 |
vacc23x89 = vmmlaq_s32(vacc23x89, vreinterpretq_s8_u64(va23x01234567), vb89x01234567); |
| 251 |
vacc23xAB = vmmlaq_s32(vacc23xAB, vreinterpretq_s8_u64(va23x01234567), vbABx01234567); |
| 252 |
vacc23xCD = vmmlaq_s32(vacc23xCD, vreinterpretq_s8_u64(va23x01234567), vbCDx01234567); |
| 253 |
vacc23xEF = vmmlaq_s32(vacc23xEF, vreinterpretq_s8_u64(va23x01234567), vbEFx01234567); |
| 254 |
vacc45x01 = vmmlaq_s32(vacc45x01, vreinterpretq_s8_u64(va45x01234567), vb01x01234567); |
| 255 |
vacc45x23 = vmmlaq_s32(vacc45x23, vreinterpretq_s8_u64(va45x01234567), vb23x01234567); |
| 256 |
vacc45x45 = vmmlaq_s32(vacc45x45, vreinterpretq_s8_u64(va45x01234567), vb45x01234567); |
| 257 |
vacc45x67 = vmmlaq_s32(vacc45x67, vreinterpretq_s8_u64(va45x01234567), vb67x01234567); |
| 258 |
vacc45x89 = vmmlaq_s32(vacc45x89, vreinterpretq_s8_u64(va45x01234567), vb89x01234567); |
| 259 |
vacc45xAB = vmmlaq_s32(vacc45xAB, vreinterpretq_s8_u64(va45x01234567), vbABx01234567); |
| 260 |
vacc45xCD = vmmlaq_s32(vacc45xCD, vreinterpretq_s8_u64(va45x01234567), vbCDx01234567); |
| 261 |
vacc45xEF = vmmlaq_s32(vacc45xEF, vreinterpretq_s8_u64(va45x01234567), vbEFx01234567); |
| 262 |
} |
| 263 |
|
| 264 |
p -= 6 * sizeof(void*); |
| 265 |
} while (p != 0); |
| 266 |
|
| 267 |
int32x4_t vacc0x0123 = vcombine_s32(vget_low_s32(vacc01x01), vget_low_s32(vacc01x23)); |
| 268 |
int32x4_t vacc1x0123 = vcombine_s32(vget_high_s32(vacc01x01), vget_high_s32(vacc01x23)); |
| 269 |
int32x4_t vacc0x4567 = vcombine_s32(vget_low_s32(vacc01x45), vget_low_s32(vacc01x67)); |
| 270 |
int32x4_t vacc1x4567 = vcombine_s32(vget_high_s32(vacc01x45), vget_high_s32(vacc01x67)); |
| 271 |
int32x4_t vacc0x89AB = vcombine_s32(vget_low_s32(vacc01x89), vget_low_s32(vacc01xAB)); |
| 272 |
int32x4_t vacc1x89AB = vcombine_s32(vget_high_s32(vacc01x89), vget_high_s32(vacc01xAB)); |
| 273 |
int32x4_t vacc0xCDEF = vcombine_s32(vget_low_s32(vacc01xCD), vget_low_s32(vacc01xEF)); |
| 274 |
int32x4_t vacc1xCDEF = vcombine_s32(vget_high_s32(vacc01xCD), vget_high_s32(vacc01xEF)); |
| 275 |
int32x4_t vacc2x0123 = vcombine_s32(vget_low_s32(vacc23x01), vget_low_s32(vacc23x23)); |
| 276 |
int32x4_t vacc3x0123 = vcombine_s32(vget_high_s32(vacc23x01), vget_high_s32(vacc23x23)); |
| 277 |
int32x4_t vacc2x4567 = vcombine_s32(vget_low_s32(vacc23x45), vget_low_s32(vacc23x67)); |
| 278 |
int32x4_t vacc3x4567 = vcombine_s32(vget_high_s32(vacc23x45), vget_high_s32(vacc23x67)); |
| 279 |
int32x4_t vacc2x89AB = vcombine_s32(vget_low_s32(vacc23x89), vget_low_s32(vacc23xAB)); |
| 280 |
int32x4_t vacc3x89AB = vcombine_s32(vget_high_s32(vacc23x89), vget_high_s32(vacc23xAB)); |
| 281 |
int32x4_t vacc2xCDEF = vcombine_s32(vget_low_s32(vacc23xCD), vget_low_s32(vacc23xEF)); |
| 282 |
int32x4_t vacc3xCDEF = vcombine_s32(vget_high_s32(vacc23xCD), vget_high_s32(vacc23xEF)); |
| 283 |
int32x4_t vacc4x0123 = vcombine_s32(vget_low_s32(vacc45x01), vget_low_s32(vacc45x23)); |
| 284 |
int32x4_t vacc5x0123 = vcombine_s32(vget_high_s32(vacc45x01), vget_high_s32(vacc45x23)); |
| 285 |
int32x4_t vacc4x4567 = vcombine_s32(vget_low_s32(vacc45x45), vget_low_s32(vacc45x67)); |
| 286 |
int32x4_t vacc5x4567 = vcombine_s32(vget_high_s32(vacc45x45), vget_high_s32(vacc45x67)); |
| 287 |
int32x4_t vacc4x89AB = vcombine_s32(vget_low_s32(vacc45x89), vget_low_s32(vacc45xAB)); |
| 288 |
int32x4_t vacc5x89AB = vcombine_s32(vget_high_s32(vacc45x89), vget_high_s32(vacc45xAB)); |
| 289 |
int32x4_t vacc4xCDEF = vcombine_s32(vget_low_s32(vacc45xCD), vget_low_s32(vacc45xEF)); |
| 290 |
int32x4_t vacc5xCDEF = vcombine_s32(vget_high_s32(vacc45xCD), vget_high_s32(vacc45xEF)); |
| 291 |
|
| 292 |
float32x4_t vfpacc0x0123 = vcvtq_f32_s32(vacc0x0123); |
| 293 |
float32x4_t vfpacc0x4567 = vcvtq_f32_s32(vacc0x4567); |
| 294 |
float32x4_t vfpacc0x89AB = vcvtq_f32_s32(vacc0x89AB); |
| 295 |
float32x4_t vfpacc0xCDEF = vcvtq_f32_s32(vacc0xCDEF); |
| 296 |
float32x4_t vfpacc1x0123 = vcvtq_f32_s32(vacc1x0123); |
| 297 |
float32x4_t vfpacc1x4567 = vcvtq_f32_s32(vacc1x4567); |
| 298 |
float32x4_t vfpacc1x89AB = vcvtq_f32_s32(vacc1x89AB); |
| 299 |
float32x4_t vfpacc1xCDEF = vcvtq_f32_s32(vacc1xCDEF); |
| 300 |
float32x4_t vfpacc2x0123 = vcvtq_f32_s32(vacc2x0123); |
| 301 |
float32x4_t vfpacc2x4567 = vcvtq_f32_s32(vacc2x4567); |
| 302 |
float32x4_t vfpacc2x89AB = vcvtq_f32_s32(vacc2x89AB); |
| 303 |
float32x4_t vfpacc2xCDEF = vcvtq_f32_s32(vacc2xCDEF); |
| 304 |
float32x4_t vfpacc3x0123 = vcvtq_f32_s32(vacc3x0123); |
| 305 |
float32x4_t vfpacc3x4567 = vcvtq_f32_s32(vacc3x4567); |
| 306 |
float32x4_t vfpacc3x89AB = vcvtq_f32_s32(vacc3x89AB); |
| 307 |
float32x4_t vfpacc3xCDEF = vcvtq_f32_s32(vacc3xCDEF); |
| 308 |
float32x4_t vfpacc4x0123 = vcvtq_f32_s32(vacc4x0123); |
| 309 |
float32x4_t vfpacc4x4567 = vcvtq_f32_s32(vacc4x4567); |
| 310 |
float32x4_t vfpacc4x89AB = vcvtq_f32_s32(vacc4x89AB); |
| 311 |
float32x4_t vfpacc4xCDEF = vcvtq_f32_s32(vacc4xCDEF); |
| 312 |
float32x4_t vfpacc5x0123 = vcvtq_f32_s32(vacc5x0123); |
| 313 |
float32x4_t vfpacc5x4567 = vcvtq_f32_s32(vacc5x4567); |
| 314 |
float32x4_t vfpacc5x89AB = vcvtq_f32_s32(vacc5x89AB); |
| 315 |
float32x4_t vfpacc5xCDEF = vcvtq_f32_s32(vacc5xCDEF); |
| 316 |
|
| 317 |
const float32x4_t vscale0123 = vld1q_f32((const float*) w); w = (const float*) w + 4; |
| 318 |
vfpacc0x0123 = vmulq_f32(vfpacc0x0123, vscale0123); |
| 319 |
vfpacc1x0123 = vmulq_f32(vfpacc1x0123, vscale0123); |
| 320 |
vfpacc2x0123 = vmulq_f32(vfpacc2x0123, vscale0123); |
| 321 |
vfpacc3x0123 = vmulq_f32(vfpacc3x0123, vscale0123); |
| 322 |
vfpacc4x0123 = vmulq_f32(vfpacc4x0123, vscale0123); |
| 323 |
vfpacc5x0123 = vmulq_f32(vfpacc5x0123, vscale0123); |
| 324 |
const float32x4_t vscale4567 = vld1q_f32((const float*) w); w = (const float*) w + 4; |
| 325 |
vfpacc0x4567 = vmulq_f32(vfpacc0x4567, vscale4567); |
| 326 |
vfpacc1x4567 = vmulq_f32(vfpacc1x4567, vscale4567); |
| 327 |
vfpacc2x4567 = vmulq_f32(vfpacc2x4567, vscale4567); |
| 328 |
vfpacc3x4567 = vmulq_f32(vfpacc3x4567, vscale4567); |
| 329 |
vfpacc4x4567 = vmulq_f32(vfpacc4x4567, vscale4567); |
| 330 |
vfpacc5x4567 = vmulq_f32(vfpacc5x4567, vscale4567); |
| 331 |
const float32x4_t vscale89AB = vld1q_f32((const float*) w); w = (const float*) w + 4; |
| 332 |
vfpacc0x89AB = vmulq_f32(vfpacc0x89AB, vscale89AB); |
| 333 |
vfpacc1x89AB = vmulq_f32(vfpacc1x89AB, vscale89AB); |
| 334 |
vfpacc2x89AB = vmulq_f32(vfpacc2x89AB, vscale89AB); |
| 335 |
vfpacc3x89AB = vmulq_f32(vfpacc3x89AB, vscale89AB); |
| 336 |
vfpacc4x89AB = vmulq_f32(vfpacc4x89AB, vscale89AB); |
| 337 |
vfpacc5x89AB = vmulq_f32(vfpacc5x89AB, vscale89AB); |
| 338 |
const float32x4_t vscaleCDEF = vld1q_f32((const float*) w); w = (const float*) w + 4; |
| 339 |
vfpacc0xCDEF = vmulq_f32(vfpacc0xCDEF, vscaleCDEF); |
| 340 |
vfpacc1xCDEF = vmulq_f32(vfpacc1xCDEF, vscaleCDEF); |
| 341 |
vfpacc2xCDEF = vmulq_f32(vfpacc2xCDEF, vscaleCDEF); |
| 342 |
vfpacc3xCDEF = vmulq_f32(vfpacc3xCDEF, vscaleCDEF); |
| 343 |
vfpacc4xCDEF = vmulq_f32(vfpacc4xCDEF, vscaleCDEF); |
| 344 |
vfpacc5xCDEF = vmulq_f32(vfpacc5xCDEF, vscaleCDEF); |
| 345 |
|
| 346 |
vacc0x0123 = vcvtnq_s32_f32(vfpacc0x0123); |
| 347 |
vacc0x4567 = vcvtnq_s32_f32(vfpacc0x4567); |
| 348 |
vacc0x89AB = vcvtnq_s32_f32(vfpacc0x89AB); |
| 349 |
vacc0xCDEF = vcvtnq_s32_f32(vfpacc0xCDEF); |
| 350 |
vacc1x0123 = vcvtnq_s32_f32(vfpacc1x0123); |
| 351 |
vacc1x4567 = vcvtnq_s32_f32(vfpacc1x4567); |
| 352 |
vacc1x89AB = vcvtnq_s32_f32(vfpacc1x89AB); |
| 353 |
vacc1xCDEF = vcvtnq_s32_f32(vfpacc1xCDEF); |
| 354 |
vacc2x0123 = vcvtnq_s32_f32(vfpacc2x0123); |
| 355 |
vacc2x4567 = vcvtnq_s32_f32(vfpacc2x4567); |
| 356 |
vacc2x89AB = vcvtnq_s32_f32(vfpacc2x89AB); |
| 357 |
vacc2xCDEF = vcvtnq_s32_f32(vfpacc2xCDEF); |
| 358 |
vacc3x0123 = vcvtnq_s32_f32(vfpacc3x0123); |
| 359 |
vacc3x4567 = vcvtnq_s32_f32(vfpacc3x4567); |
| 360 |
vacc3x89AB = vcvtnq_s32_f32(vfpacc3x89AB); |
| 361 |
vacc3xCDEF = vcvtnq_s32_f32(vfpacc3xCDEF); |
| 362 |
vacc4x0123 = vcvtnq_s32_f32(vfpacc4x0123); |
| 363 |
vacc4x4567 = vcvtnq_s32_f32(vfpacc4x4567); |
| 364 |
vacc4x89AB = vcvtnq_s32_f32(vfpacc4x89AB); |
| 365 |
vacc4xCDEF = vcvtnq_s32_f32(vfpacc4xCDEF); |
| 366 |
vacc5x0123 = vcvtnq_s32_f32(vfpacc5x0123); |
| 367 |
vacc5x4567 = vcvtnq_s32_f32(vfpacc5x4567); |
| 368 |
vacc5x89AB = vcvtnq_s32_f32(vfpacc5x89AB); |
| 369 |
vacc5xCDEF = vcvtnq_s32_f32(vfpacc5xCDEF); |
| 370 |
|
| 371 |
const int16x8_t voutput_zero_point = vld1q_dup_s16(¶ms->fp32_neonv8.output_zero_point); |
| 372 |
#if XNN_ARCH_ARM64 |
| 373 |
const int16x8_t vacc0x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc0x0123), vacc0x4567), voutput_zero_point); |
| 374 |
const int16x8_t vacc0x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc0x89AB), vacc0xCDEF), voutput_zero_point); |
| 375 |
const int16x8_t vacc1x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc1x0123), vacc1x4567), voutput_zero_point); |
| 376 |
const int16x8_t vacc1x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc1x89AB), vacc1xCDEF), voutput_zero_point); |
| 377 |
const int16x8_t vacc2x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc2x0123), vacc2x4567), voutput_zero_point); |
| 378 |
const int16x8_t vacc2x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc2x89AB), vacc2xCDEF), voutput_zero_point); |
| 379 |
const int16x8_t vacc3x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc3x0123), vacc3x4567), voutput_zero_point); |
| 380 |
const int16x8_t vacc3x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc3x89AB), vacc3xCDEF), voutput_zero_point); |
| 381 |
const int16x8_t vacc4x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc4x0123), vacc4x4567), voutput_zero_point); |
| 382 |
const int16x8_t vacc4x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc4x89AB), vacc4xCDEF), voutput_zero_point); |
| 383 |
const int16x8_t vacc5x01234567 = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc5x0123), vacc5x4567), voutput_zero_point); |
| 384 |
const int16x8_t vacc5x89ABCDEF = vqaddq_s16(vqmovn_high_s32(vqmovn_s32(vacc5x89AB), vacc5xCDEF), voutput_zero_point); |
| 385 |
|
| 386 |
int8x16_t vout0x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc0x01234567), vacc0x89ABCDEF); |
| 387 |
int8x16_t vout1x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc1x01234567), vacc1x89ABCDEF); |
| 388 |
int8x16_t vout2x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc2x01234567), vacc2x89ABCDEF); |
| 389 |
int8x16_t vout3x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc3x01234567), vacc3x89ABCDEF); |
| 390 |
int8x16_t vout4x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc4x01234567), vacc4x89ABCDEF); |
| 391 |
int8x16_t vout5x0123456789ABCDEF = vqmovn_high_s16(vqmovn_s16(vacc5x01234567), vacc5x89ABCDEF); |
| 392 |
#else |
| 393 |
const int16x8_t vacc0x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc0x0123), vqmovn_s32(vacc0x4567)), voutput_zero_point); |
| 394 |
const int16x8_t vacc0x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc0x89AB), vqmovn_s32(vacc0xCDEF)), voutput_zero_point); |
| 395 |
const int16x8_t vacc1x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc1x0123), vqmovn_s32(vacc1x4567)), voutput_zero_point); |
| 396 |
const int16x8_t vacc1x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc1x89AB), vqmovn_s32(vacc1xCDEF)), voutput_zero_point); |
| 397 |
const int16x8_t vacc2x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc2x0123), vqmovn_s32(vacc2x4567)), voutput_zero_point); |
| 398 |
const int16x8_t vacc2x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc2x89AB), vqmovn_s32(vacc2xCDEF)), voutput_zero_point); |
| 399 |
const int16x8_t vacc3x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc3x0123), vqmovn_s32(vacc3x4567)), voutput_zero_point); |
| 400 |
const int16x8_t vacc3x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc3x89AB), vqmovn_s32(vacc3xCDEF)), voutput_zero_point); |
| 401 |
const int16x8_t vacc4x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc4x0123), vqmovn_s32(vacc4x4567)), voutput_zero_point); |
| 402 |
const int16x8_t vacc4x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc4x89AB), vqmovn_s32(vacc4xCDEF)), voutput_zero_point); |
| 403 |
const int16x8_t vacc5x01234567 = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc5x0123), vqmovn_s32(vacc5x4567)), voutput_zero_point); |
| 404 |
const int16x8_t vacc5x89ABCDEF = vqaddq_s16(vcombine_s16(vqmovn_s32(vacc5x89AB), vqmovn_s32(vacc5xCDEF)), voutput_zero_point); |
| 405 |
|
| 406 |
int8x16_t vout0x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc0x01234567), vqmovn_s16(vacc0x89ABCDEF)); |
| 407 |
int8x16_t vout1x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc1x01234567), vqmovn_s16(vacc1x89ABCDEF)); |
| 408 |
int8x16_t vout2x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc2x01234567), vqmovn_s16(vacc2x89ABCDEF)); |
| 409 |
int8x16_t vout3x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc3x01234567), vqmovn_s16(vacc3x89ABCDEF)); |
| 410 |
int8x16_t vout4x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc4x01234567), vqmovn_s16(vacc4x89ABCDEF)); |
| 411 |
int8x16_t vout5x0123456789ABCDEF = vcombine_s8(vqmovn_s16(vacc5x01234567), vqmovn_s16(vacc5x89ABCDEF)); |
| 412 |
#endif |
| 413 |
const int8x16_t voutput_min = vld1q_dup_s8(¶ms->fp32_neonv8.output_min); |
| 414 |
const int8x16_t voutput_max = vld1q_dup_s8(¶ms->fp32_neonv8.output_max); |
| 415 |
|
| 416 |
vout5x0123456789ABCDEF = vmaxq_s8(vout5x0123456789ABCDEF, voutput_min); |
| 417 |
vout4x0123456789ABCDEF = vmaxq_s8(vout4x0123456789ABCDEF, voutput_min); |
| 418 |
vout3x0123456789ABCDEF = vmaxq_s8(vout3x0123456789ABCDEF, voutput_min); |
| 419 |
vout2x0123456789ABCDEF = vmaxq_s8(vout2x0123456789ABCDEF, voutput_min); |
| 420 |
vout1x0123456789ABCDEF = vmaxq_s8(vout1x0123456789ABCDEF, voutput_min); |
| 421 |
vout0x0123456789ABCDEF = vmaxq_s8(vout0x0123456789ABCDEF, voutput_min); |
| 422 |
|
| 423 |
vout5x0123456789ABCDEF = vminq_s8(vout5x0123456789ABCDEF, voutput_max); |
| 424 |
vout4x0123456789ABCDEF = vminq_s8(vout4x0123456789ABCDEF, voutput_max); |
| 425 |
vout3x0123456789ABCDEF = vminq_s8(vout3x0123456789ABCDEF, voutput_max); |
| 426 |
vout2x0123456789ABCDEF = vminq_s8(vout2x0123456789ABCDEF, voutput_max); |
| 427 |
vout1x0123456789ABCDEF = vminq_s8(vout1x0123456789ABCDEF, voutput_max); |
| 428 |
vout0x0123456789ABCDEF = vminq_s8(vout0x0123456789ABCDEF, voutput_max); |
| 429 |
|
| 430 |
if (nc >= 16) { |
| 431 |
vst1q_s8(c5, vout5x0123456789ABCDEF); |
| 432 |
vst1q_s8(c4, vout4x0123456789ABCDEF); |
| 433 |
vst1q_s8(c3, vout3x0123456789ABCDEF); |
| 434 |
vst1q_s8(c2, vout2x0123456789ABCDEF); |
| 435 |
vst1q_s8(c1, vout1x0123456789ABCDEF); |
| 436 |
vst1q_s8(c0, vout0x0123456789ABCDEF); |
| 437 |
|
| 438 |
c5 = (int8_t*) ((uintptr_t) c5 + cn_stride); |
| 439 |
c4 = (int8_t*) ((uintptr_t) c4 + cn_stride); |
| 440 |
c3 = (int8_t*) ((uintptr_t) c3 + cn_stride); |
| 441 |
c2 = (int8_t*) ((uintptr_t) c2 + cn_stride); |
| 442 |
c1 = (int8_t*) ((uintptr_t) c1 + cn_stride); |
| 443 |
c0 = (int8_t*) ((uintptr_t) c0 + cn_stride); |
| 444 |
|
| 445 |
a = (const int8_t**restrict) ((uintptr_t) a - ks); |
| 446 |
|
| 447 |
nc -= 16; |
| 448 |
} else { |
| 449 |
int8x16_t vout4x01234567_5x01234567 = vcombine_s8(vget_low_s8(vout4x0123456789ABCDEF), vget_low_s8(vout5x0123456789ABCDEF)); |
| 450 |
int8x16_t vout2x01234567_3x01234567 = vcombine_s8(vget_low_s8(vout2x0123456789ABCDEF), vget_low_s8(vout3x0123456789ABCDEF)); |
| 451 |
int8x16_t vout0x01234567_1x01234567 = vcombine_s8(vget_low_s8(vout0x0123456789ABCDEF), vget_low_s8(vout1x0123456789ABCDEF)); |
| 452 |
if (nc & 8) { |
| 453 |
vst1_s8(c5, vget_high_s8(vout4x01234567_5x01234567)); c5 += 8; |
| 454 |
vst1_s8(c4, vget_low_s8(vout4x01234567_5x01234567)); c4 += 8; |
| 455 |
vst1_s8(c3, vget_high_s8(vout2x01234567_3x01234567)); c3 += 8; |
| 456 |
vst1_s8(c2, vget_low_s8(vout2x01234567_3x01234567)); c2 += 8; |
| 457 |
vst1_s8(c1, vget_high_s8(vout0x01234567_1x01234567)); c1 += 8; |
| 458 |
vst1_s8(c0, vget_low_s8(vout0x01234567_1x01234567)); c0 += 8; |
| 459 |
vout4x01234567_5x01234567 = vcombine_s8(vget_high_s8(vout4x0123456789ABCDEF), vget_high_s8(vout5x0123456789ABCDEF)); |
| 460 |
vout2x01234567_3x01234567 = vcombine_s8(vget_high_s8(vout2x0123456789ABCDEF), vget_high_s8(vout3x0123456789ABCDEF)); |
| 461 |
vout0x01234567_1x01234567 = vcombine_s8(vget_high_s8(vout0x0123456789ABCDEF), vget_high_s8(vout1x0123456789ABCDEF)); |
| 462 |
} |
| 463 |
if (nc & 4) { |
| 464 |
vst1q_lane_u32((void*) c5, vreinterpretq_u32_s8(vout4x01234567_5x01234567), 2); c5 += 4; |
| 465 |
vst1q_lane_u32((void*) c4, vreinterpretq_u32_s8(vout4x01234567_5x01234567), 0); c4 += 4; |
| 466 |
vst1q_lane_u32((void*) c3, vreinterpretq_u32_s8(vout2x01234567_3x01234567), 2); c3 += 4; |
| 467 |
vst1q_lane_u32((void*) c2, vreinterpretq_u32_s8(vout2x01234567_3x01234567), 0); c2 += 4; |
| 468 |
vst1q_lane_u32((void*) c1, vreinterpretq_u32_s8(vout0x01234567_1x01234567), 2); c1 += 4; |
| 469 |
vst1q_lane_u32((void*) c0, vreinterpretq_u32_s8(vout0x01234567_1x01234567), 0); c0 += 4; |
| 470 |
vout4x01234567_5x01234567 = vextq_s8(vout4x01234567_5x01234567, vout4x01234567_5x01234567, 4); |
| 471 |
vout2x01234567_3x01234567 = vextq_s8(vout2x01234567_3x01234567, vout2x01234567_3x01234567, 4); |
| 472 |
vout0x01234567_1x01234567 = vextq_s8(vout0x01234567_1x01234567, vout0x01234567_1x01234567, 4); |
| 473 |
} |
| 474 |
if (nc & 2) { |
| 475 |
vst1q_lane_u16((void*) c5, vreinterpretq_u16_s8(vout4x01234567_5x01234567), 4); c5 += 2; |
| 476 |
vst1q_lane_u16((void*) c4, vreinterpretq_u16_s8(vout4x01234567_5x01234567), 0); c4 += 2; |
| 477 |
vst1q_lane_u16((void*) c3, vreinterpretq_u16_s8(vout2x01234567_3x01234567), 4); c3 += 2; |
| 478 |
vst1q_lane_u16((void*) c2, vreinterpretq_u16_s8(vout2x01234567_3x01234567), 0); c2 += 2; |
| 479 |
vst1q_lane_u16((void*) c1, vreinterpretq_u16_s8(vout0x01234567_1x01234567), 4); c1 += 2; |
| 480 |
vst1q_lane_u16((void*) c0, vreinterpretq_u16_s8(vout0x01234567_1x01234567), 0); c0 += 2; |
| 481 |
vout4x01234567_5x01234567 = vextq_s8(vout4x01234567_5x01234567, vout4x01234567_5x01234567, 2); |
| 482 |
vout2x01234567_3x01234567 = vextq_s8(vout2x01234567_3x01234567, vout2x01234567_3x01234567, 2); |
| 483 |
vout0x01234567_1x01234567 = vextq_s8(vout0x01234567_1x01234567, vout0x01234567_1x01234567, 2); |
| 484 |
} |
| 485 |
if (nc & 1) { |
| 486 |
vst1q_lane_s8(c5, vout4x01234567_5x01234567, 8); |
| 487 |
vst1q_lane_s8(c4, vout4x01234567_5x01234567, 0); |
| 488 |
vst1q_lane_s8(c3, vout2x01234567_3x01234567, 8); |
| 489 |
vst1q_lane_s8(c2, vout2x01234567_3x01234567, 0); |
| 490 |
vst1q_lane_s8(c1, vout0x01234567_1x01234567, 8); |
| 491 |
vst1q_lane_s8(c0, vout0x01234567_1x01234567, 0); |
| 492 |
} |
| 493 |
|
| 494 |
nc = 0; |
| 495 |
} |
| 496 |
} while (nc != 0); |
| 497 |
} |