blob: ec7095db7b6c51946e51e98476cd47511251de6e [file] [log] [blame]
Georgios Pinitas4ee8b152021-07-16 16:16:43 +01001/*
Michael Tyler7d9a6262023-02-01 16:37:07 +00002 * Copyright (c) 2021, 2023 Arm Limited.
Georgios Pinitas4ee8b152021-07-16 16:16:43 +01003 *
4 * SPDX-License-Identifier: MIT
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
Michael Tyler7d9a6262023-02-01 16:37:07 +000013 * The above copyright notice and this permission notice shall be included in all
14 * copies or substantial portions of the Software.
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010015 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
Michael Tyler7d9a6262023-02-01 16:37:07 +000020 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 * SOFTWARE.
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010023 */
24
25#pragma once
26
27#ifdef __ARM_FEATURE_SVE
28
29
30namespace {
31
32void sve_transpose_interleave_3VL_1x4(uint8_t *out, const uint8_t *in, size_t width, size_t in_stride, size_t height)
33{
34 uint8_t *pad_row = reinterpret_cast<uint8_t *>(alloca(width * sizeof(uint8_t)));
35
36 if (height % 4) {
37 memset(pad_row, 0, width * sizeof(uint8_t));
38 }
39
40 size_t out_stride = 3 * roundup<size_t>(height, 4) * get_vector_length<uint32_t>();
41
42 __asm__ __volatile__(
Michael Tylerbe13cea2023-01-17 11:04:14 +000043 "cmp %x[height], #0x8\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +000044 "ptrue p1.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010045 "blt 6f\n"
46 "1:" // Main row loop: Head
Michael Tyler7d9a6262023-02-01 16:37:07 +000047 "mov x10, %x[in]\n"
48 "add x9, x10, %x[in_stride]\n"
49 "add x28, x9, %x[in_stride]\n"
50 "add x27, x28, %x[in_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010051 "add x26, x27, %x[in_stride]\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +000052 "mov x25, %x[width]\n"
53 "cntb x24, ALL, MUL #3\n"
54 "add x23, x26, %x[in_stride]\n"
55 "add x21, x23, %x[in_stride]\n"
56 "add x20, x21, %x[in_stride]\n"
57 "cmp x25, x24\n"
58 "add %x[in], x20, %x[in_stride]\n"
59 "mov x22, %x[out]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010060 "sub %x[height], %x[height], #0x8\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +010061 "blt 3f\n"
62 "2:" // Main row loop: Unroll column loop
Michael Tyler7d9a6262023-02-01 16:37:07 +000063 "ld1b { z21.b }, p1/Z, [x10]\n"
64 "ld1b { z20.b }, p1/Z, [x9]\n"
65 "sub x25, x25, x24\n"
66 "cmp x25, x24\n"
67 "ld1b { z17.b }, p1/Z, [x28]\n"
68 "ld1b { z16.b }, p1/Z, [x27]\n"
69 "zip1 z31.b, z21.b, z17.b\n"
70 "zip1 z22.b, z20.b, z16.b\n"
71 "ld1b { z19.b }, p1/Z, [x26]\n"
72 "ld1b { z18.b }, p1/Z, [x23]\n"
73 "zip2 z14.b, z21.b, z17.b\n"
74 "zip2 z13.b, z20.b, z16.b\n"
75 "ld1b { z17.b }, p1/Z, [x21]\n"
76 "ld1b { z16.b }, p1/Z, [x20]\n"
77 "zip1 z30.b, z19.b, z17.b\n"
78 "zip1 z29.b, z18.b, z16.b\n"
79 "ld1b { z21.b }, p1/Z, [x10, #1, MUL VL]\n"
80 "ld1b { z20.b }, p1/Z, [x9, #1, MUL VL]\n"
81 "zip2 z12.b, z19.b, z17.b\n"
82 "zip2 z11.b, z18.b, z16.b\n"
83 "ld1b { z17.b }, p1/Z, [x28, #1, MUL VL]\n"
84 "ld1b { z16.b }, p1/Z, [x27, #1, MUL VL]\n"
85 "zip1 z10.b, z21.b, z17.b\n"
86 "zip1 z9.b, z20.b, z16.b\n"
87 "ld1b { z19.b }, p1/Z, [x26, #1, MUL VL]\n"
88 "ld1b { z18.b }, p1/Z, [x23, #1, MUL VL]\n"
89 "zip2 z8.b, z21.b, z17.b\n"
90 "zip2 z7.b, z20.b, z16.b\n"
91 "ld1b { z17.b }, p1/Z, [x21, #1, MUL VL]\n"
92 "ld1b { z16.b }, p1/Z, [x20, #1, MUL VL]\n"
93 "zip1 z6.b, z19.b, z17.b\n"
94 "zip1 z5.b, z18.b, z16.b\n"
95 "ld1b { z28.b }, p1/Z, [x10, #2, MUL VL]\n"
96 "ld1b { z27.b }, p1/Z, [x9, #2, MUL VL]\n"
97 "zip2 z4.b, z19.b, z17.b\n"
98 "zip2 z3.b, z18.b, z16.b\n"
99 "ld1b { z26.b }, p1/Z, [x28, #2, MUL VL]\n"
100 "ld1b { z25.b }, p1/Z, [x27, #2, MUL VL]\n"
101 "zip1 z2.b, z28.b, z26.b\n"
102 "zip1 z1.b, z27.b, z25.b\n"
103 "ld1b { z24.b }, p1/Z, [x26, #2, MUL VL]\n"
104 "ld1b { z23.b }, p1/Z, [x23, #2, MUL VL]\n"
105 "zip1 z16.b, z31.b, z22.b\n"
106 "zip2 z22.b, z31.b, z22.b\n"
107 "ld1b { z21.b }, p1/Z, [x21, #2, MUL VL]\n"
108 "ld1b { z20.b }, p1/Z, [x20, #2, MUL VL]\n"
109 "zip1 z0.b, z24.b, z21.b\n"
110 "zip1 z31.b, z23.b, z20.b\n"
111 "zip1 z19.b, z14.b, z13.b\n"
112 "zip1 z18.b, z30.b, z29.b\n"
113 "st1b { z16.b }, p1, [x22]\n"
114 "addvl x10, x10, #3\n"
115 "zip2 z16.b, z30.b, z29.b\n"
116 "zip1 z17.b, z12.b, z11.b\n"
117 "st1b { z22.b }, p1, [x22, #1, MUL VL]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100118 "addvl x9, x9, #3\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000119 "st1b { z19.b }, p1, [x22, #2, MUL VL]\n"
120 "zip2 z30.b, z28.b, z26.b\n"
121 "zip2 z29.b, z27.b, z25.b\n"
122 "addvl x28, x28, #3\n"
123 "st1b { z18.b }, p1, [x22, #3, MUL VL]\n"
124 "zip2 z28.b, z24.b, z21.b\n"
Michael Tylerbe13cea2023-01-17 11:04:14 +0000125 "zip2 z27.b, z23.b, z20.b\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000126 "addvl x27, x27, #3\n"
127 "st1b { z16.b }, p1, [x22, #4, MUL VL]\n"
128 "zip2 z21.b, z14.b, z13.b\n"
129 "zip1 z16.b, z10.b, z9.b\n"
130 "addvl x26, x26, #3\n"
131 "st1b { z17.b }, p1, [x22, #5, MUL VL]\n"
132 "add x22, x22, %x[out_stride]\n"
133 "zip2 z20.b, z10.b, z9.b\n"
134 "zip2 z19.b, z12.b, z11.b\n"
135 "zip1 z18.b, z6.b, z5.b\n"
136 "zip2 z17.b, z6.b, z5.b\n"
137 "st1b { z21.b }, p1, [x22]\n"
138 "addvl x23, x23, #3\n"
139 "st1b { z16.b }, p1, [x22, #1, MUL VL]\n"
140 "zip1 z16.b, z8.b, z7.b\n"
141 "zip2 z26.b, z8.b, z7.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100142 "addvl x21, x21, #3\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000143 "st1b { z20.b }, p1, [x22, #2, MUL VL]\n"
144 "zip1 z25.b, z2.b, z1.b\n"
145 "zip1 z24.b, z4.b, z3.b\n"
146 "addvl x20, x20, #3\n"
147 "st1b { z19.b }, p1, [x22, #3, MUL VL]\n"
148 "zip2 z23.b, z4.b, z3.b\n"
149 "zip1 z22.b, z0.b, z31.b\n"
150 "st1b { z18.b }, p1, [x22, #4, MUL VL]\n"
151 "zip2 z21.b, z2.b, z1.b\n"
152 "zip1 z20.b, z30.b, z29.b\n"
153 "st1b { z17.b }, p1, [x22, #5, MUL VL]\n"
154 "add x22, x22, %x[out_stride]\n"
155 "zip2 z19.b, z30.b, z29.b\n"
156 "zip2 z18.b, z0.b, z31.b\n"
157 "st1b { z16.b }, p1, [x22]\n"
158 "zip1 z17.b, z28.b, z27.b\n"
159 "zip2 z16.b, z28.b, z27.b\n"
160 "st1b { z26.b }, p1, [x22, #1, MUL VL]\n"
161 "st1b { z25.b }, p1, [x22, #2, MUL VL]\n"
162 "st1b { z24.b }, p1, [x22, #3, MUL VL]\n"
163 "st1b { z23.b }, p1, [x22, #4, MUL VL]\n"
164 "st1b { z22.b }, p1, [x22, #5, MUL VL]\n"
165 "add x22, x22, %x[out_stride]\n"
166 "st1b { z21.b }, p1, [x22]\n"
167 "st1b { z20.b }, p1, [x22, #1, MUL VL]\n"
168 "st1b { z19.b }, p1, [x22, #2, MUL VL]\n"
169 "st1b { z18.b }, p1, [x22, #3, MUL VL]\n"
170 "st1b { z17.b }, p1, [x22, #4, MUL VL]\n"
171 "st1b { z16.b }, p1, [x22, #5, MUL VL]\n"
172 "add x22, x22, %x[out_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100173 "bge 2b\n"
174 "3:" // Main row loop: Unroll column loop skip
Michael Tyler7d9a6262023-02-01 16:37:07 +0000175 "cbz x25, 5f\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100176 "4:" // Main row loop: Column loop
Michael Tyler7d9a6262023-02-01 16:37:07 +0000177 "whilelt p0.b, XZR, x25\n"
178 "ld1b { z19.b }, p0/Z, [x10]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100179 "ld1b { z18.b }, p0/Z, [x9]\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000180 "decw x25, ALL, MUL #3\n"
181 "ld1b { z17.b }, p0/Z, [x28]\n"
182 "ld1b { z16.b }, p0/Z, [x27]\n"
183 "zip1 z26.b, z19.b, z17.b\n"
184 "zip1 z25.b, z18.b, z16.b\n"
185 "ld1b { z21.b }, p0/Z, [x26]\n"
186 "ld1b { z20.b }, p0/Z, [x23]\n"
187 "zip2 z24.b, z19.b, z17.b\n"
Michael Tylerbe13cea2023-01-17 11:04:14 +0000188 "zip2 z19.b, z18.b, z16.b\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000189 "ld1b { z18.b }, p0/Z, [x21]\n"
190 "ld1b { z16.b }, p0/Z, [x20]\n"
191 "zip1 z23.b, z21.b, z18.b\n"
192 "zip1 z17.b, z20.b, z16.b\n"
193 "zip2 z22.b, z21.b, z18.b\n"
194 "zip2 z16.b, z20.b, z16.b\n"
195 "cmp x25, #0x0\n"
196 "incd x10, ALL, MUL #6\n"
197 "incd x9, ALL, MUL #6\n"
198 "incd x28, ALL, MUL #6\n"
199 "zip1 z21.b, z26.b, z25.b\n"
200 "zip2 z20.b, z26.b, z25.b\n"
201 "incd x27, ALL, MUL #6\n"
202 "incd x26, ALL, MUL #6\n"
203 "zip1 z19.b, z24.b, z19.b\n"
204 "zip1 z18.b, z23.b, z17.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100205 "incd x23, ALL, MUL #6\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100206 "incd x21, ALL, MUL #6\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000207 "zip2 z17.b, z23.b, z17.b\n"
208 "zip1 z16.b, z22.b, z16.b\n"
209 "incd x20, ALL, MUL #6\n"
210 "st1b { z21.b }, p1, [x22]\n"
211 "st1b { z20.b }, p1, [x22, #1, MUL VL]\n"
212 "st1b { z19.b }, p1, [x22, #2, MUL VL]\n"
213 "st1b { z18.b }, p1, [x22, #3, MUL VL]\n"
214 "st1b { z17.b }, p1, [x22, #4, MUL VL]\n"
215 "st1b { z16.b }, p1, [x22, #5, MUL VL]\n"
216 "add x22, x22, %x[out_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100217 "bgt 4b\n"
218 "5:" // Main row loop: Column loop skip
Michael Tylerbe13cea2023-01-17 11:04:14 +0000219 "cmp %x[height], #0x8\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000220 "addvl %x[out], %x[out], #6\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100221 "bge 1b\n"
222 "cbz %x[height], 12f\n"
223 "6:" // Main loop skip
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100224 "7:" // Tail row loop: Head
Michael Tyler7d9a6262023-02-01 16:37:07 +0000225 "mov x10, %x[in]\n"
226 "add x9, x10, %x[in_stride]\n"
227 "add x28, x9, %x[in_stride]\n"
228 "mov x21, %x[width]\n"
229 "cntb x20, ALL, MUL #3\n"
230 "add x27, x28, %x[in_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100231 "cmp %x[height], #0x3\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000232 "add %x[in], x27, %x[in_stride]\n"
Michael Tylerbe13cea2023-01-17 11:04:14 +0000233 "csel x27, x27, %x[pad_row], GT\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000234 "csel x28, x28, %x[pad_row], GE\n"
235 "cmp %x[height], #0x1\n"
236 "csel x9, x9, %x[pad_row], GT\n"
237 "cmp x21, x20\n"
238 "mov x22, %x[out]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100239 "sub %x[height], %x[height], #0x4\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100240 "blt 9f\n"
241 "8:" // Tail row loop: Unroll column loop
Michael Tyler7d9a6262023-02-01 16:37:07 +0000242 "ld1b { z21.b }, p1/Z, [x10]\n"
243 "ld1b { z20.b }, p1/Z, [x9]\n"
244 "sub x21, x21, x20\n"
245 "cmp x21, x20\n"
246 "ld1b { z17.b }, p1/Z, [x28]\n"
247 "ld1b { z16.b }, p1/Z, [x27]\n"
248 "zip1 z31.b, z21.b, z17.b\n"
249 "zip1 z30.b, z20.b, z16.b\n"
250 "ld1b { z19.b }, p1/Z, [x10, #1, MUL VL]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100251 "ld1b { z18.b }, p1/Z, [x9, #1, MUL VL]\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000252 "zip2 z29.b, z21.b, z17.b\n"
253 "zip2 z28.b, z20.b, z16.b\n"
254 "ld1b { z17.b }, p1/Z, [x28, #1, MUL VL]\n"
255 "ld1b { z16.b }, p1/Z, [x27, #1, MUL VL]\n"
256 "zip1 z27.b, z19.b, z17.b\n"
257 "zip1 z26.b, z18.b, z16.b\n"
258 "ld1b { z22.b }, p1/Z, [x10, #2, MUL VL]\n"
259 "ld1b { z21.b }, p1/Z, [x9, #2, MUL VL]\n"
260 "zip2 z25.b, z19.b, z17.b\n"
261 "zip2 z20.b, z18.b, z16.b\n"
262 "ld1b { z19.b }, p1/Z, [x28, #2, MUL VL]\n"
263 "ld1b { z18.b }, p1/Z, [x27, #2, MUL VL]\n"
264 "zip1 z24.b, z22.b, z19.b\n"
265 "zip1 z23.b, z21.b, z18.b\n"
266 "zip1 z16.b, z31.b, z30.b\n"
267 "zip2 z17.b, z31.b, z30.b\n"
268 "st1b { z16.b }, p1, [x22]\n"
269 "addvl x10, x10, #3\n"
270 "zip1 z16.b, z29.b, z28.b\n"
271 "st1b { z17.b }, p1, [x22, #1, MUL VL]\n"
272 "zip2 z22.b, z22.b, z19.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100273 "addvl x9, x9, #3\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000274 "st1b { z16.b }, p1, [x22, #2, MUL VL]\n"
275 "add x22, x22, %x[out_stride]\n"
276 "zip2 z21.b, z21.b, z18.b\n"
277 "zip2 z18.b, z29.b, z28.b\n"
278 "zip1 z16.b, z27.b, z26.b\n"
279 "zip2 z17.b, z27.b, z26.b\n"
280 "st1b { z18.b }, p1, [x22]\n"
281 "addvl x28, x28, #3\n"
282 "st1b { z16.b }, p1, [x22, #1, MUL VL]\n"
283 "zip1 z16.b, z25.b, z20.b\n"
284 "zip2 z20.b, z25.b, z20.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100285 "addvl x27, x27, #3\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000286 "st1b { z17.b }, p1, [x22, #2, MUL VL]\n"
287 "add x22, x22, %x[out_stride]\n"
288 "zip1 z19.b, z24.b, z23.b\n"
289 "zip2 z18.b, z24.b, z23.b\n"
290 "st1b { z16.b }, p1, [x22]\n"
291 "zip1 z17.b, z22.b, z21.b\n"
292 "zip2 z16.b, z22.b, z21.b\n"
293 "st1b { z20.b }, p1, [x22, #1, MUL VL]\n"
294 "st1b { z19.b }, p1, [x22, #2, MUL VL]\n"
295 "add x22, x22, %x[out_stride]\n"
296 "st1b { z18.b }, p1, [x22]\n"
297 "st1b { z17.b }, p1, [x22, #1, MUL VL]\n"
298 "st1b { z16.b }, p1, [x22, #2, MUL VL]\n"
299 "add x22, x22, %x[out_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100300 "bge 8b\n"
301 "9:" // Tail row loop: Unroll column loop skip
Michael Tyler7d9a6262023-02-01 16:37:07 +0000302 "cbz x21, 11f\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100303 "10:" // Tail row loop: Column loop
Michael Tyler7d9a6262023-02-01 16:37:07 +0000304 "whilelt p0.b, XZR, x21\n"
305 "ld1b { z19.b }, p0/Z, [x10]\n"
306 "ld1b { z21.b }, p0/Z, [x9]\n"
307 "decw x21, ALL, MUL #3\n"
308 "ld1b { z18.b }, p0/Z, [x28]\n"
309 "ld1b { z16.b }, p0/Z, [x27]\n"
310 "zip1 z20.b, z19.b, z18.b\n"
311 "zip1 z17.b, z21.b, z16.b\n"
312 "zip2 z19.b, z19.b, z18.b\n"
313 "zip2 z16.b, z21.b, z16.b\n"
314 "cmp x21, #0x0\n"
315 "incd x10, ALL, MUL #6\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100316 "incd x9, ALL, MUL #6\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000317 "incd x28, ALL, MUL #6\n"
318 "zip1 z18.b, z20.b, z17.b\n"
319 "zip2 z17.b, z20.b, z17.b\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100320 "incd x27, ALL, MUL #6\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000321 "zip1 z16.b, z19.b, z16.b\n"
322 "st1b { z18.b }, p1, [x22]\n"
323 "st1b { z17.b }, p1, [x22, #1, MUL VL]\n"
324 "st1b { z16.b }, p1, [x22, #2, MUL VL]\n"
325 "add x22, x22, %x[out_stride]\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100326 "bgt 10b\n"
327 "11:" // Tail row loop: Column loop skip
Michael Tylerbe13cea2023-01-17 11:04:14 +0000328 "cmp %x[height], #0x1\n"
Michael Tyler7d9a6262023-02-01 16:37:07 +0000329 "addvl %x[out], %x[out], #3\n"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100330 "bge 7b\n"
331 "12:" // Done
332
333 : [height] "+&r" (height), [in] "+&r" (in), [out] "+&r" (out)
334 : [in_stride] "r" (in_stride), [out_stride] "r" (out_stride), [pad_row] "r" (pad_row), [width] "r" (width)
Michael Tyler7d9a6262023-02-01 16:37:07 +0000335 : "cc", "memory", "p0", "p1", "x9", "x10", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31"
Georgios Pinitas4ee8b152021-07-16 16:16:43 +0100336 );
337}
338
339} // anonymous namespace
340
341template<>
342void Transform<3, 4, true, VLType::SVE>(
343 uint8_t *out, const uint8_t *in, int stride, int x0, int xmax, int k0, int kmax)
344{
345 sve_transpose_interleave_3VL_1x4(
346 reinterpret_cast<uint8_t *>(out),
347 reinterpret_cast<const uint8_t *>(in + k0 * stride + x0),
348 (xmax-x0) * sizeof(uint8_t) / 1,
349 stride * sizeof(uint8_t),
350 (kmax-k0)
351 );
352}
353
354template<>
355void Transform<3, 4, true, VLType::SVE>(
356 int8_t *out, const int8_t *in, int stride, int x0, int xmax, int k0, int kmax)
357{
358 sve_transpose_interleave_3VL_1x4(
359 reinterpret_cast<uint8_t *>(out),
360 reinterpret_cast<const uint8_t *>(in + k0 * stride + x0),
361 (xmax-x0) * sizeof(int8_t) / 1,
362 stride * sizeof(int8_t),
363 (kmax-k0)
364 );
365}
366
367#endif