1 // Copyright 2019 Google LLC
2 //
3 // This source code is licensed under the BSD-style license found in the
4 // LICENSE file in the root directory of this source tree.
5 //
6 // Auto-generated file. Do not edit!
7 // Specification: test/f32-vsqrdiffc.yaml
8 // Generator: tools/generate-vbinary-test.py
9
10
11 #include <gtest/gtest.h>
12
13 #include <xnnpack/common.h>
14 #include <xnnpack/isa-checks.h>
15
16 #include <xnnpack/vbinary.h>
17 #include "vbinaryc-microkernel-tester.h"
18
19
20 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(F32_VSQRDIFFC__NEON_X4,batch_eq_4)21 TEST(F32_VSQRDIFFC__NEON_X4, batch_eq_4) {
22 TEST_REQUIRES_ARM_NEON;
23 VBinOpCMicrokernelTester()
24 .batch_size(4)
25 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
26 }
27
TEST(F32_VSQRDIFFC__NEON_X4,batch_div_4)28 TEST(F32_VSQRDIFFC__NEON_X4, batch_div_4) {
29 TEST_REQUIRES_ARM_NEON;
30 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
31 VBinOpCMicrokernelTester()
32 .batch_size(batch_size)
33 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
34 }
35 }
36
TEST(F32_VSQRDIFFC__NEON_X4,batch_lt_4)37 TEST(F32_VSQRDIFFC__NEON_X4, batch_lt_4) {
38 TEST_REQUIRES_ARM_NEON;
39 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
40 VBinOpCMicrokernelTester()
41 .batch_size(batch_size)
42 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
43 }
44 }
45
TEST(F32_VSQRDIFFC__NEON_X4,batch_gt_4)46 TEST(F32_VSQRDIFFC__NEON_X4, batch_gt_4) {
47 TEST_REQUIRES_ARM_NEON;
48 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
49 VBinOpCMicrokernelTester()
50 .batch_size(batch_size)
51 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
52 }
53 }
54
TEST(F32_VSQRDIFFC__NEON_X4,inplace)55 TEST(F32_VSQRDIFFC__NEON_X4, inplace) {
56 TEST_REQUIRES_ARM_NEON;
57 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
58 VBinOpCMicrokernelTester()
59 .batch_size(batch_size)
60 .inplace(true)
61 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
62 }
63 }
64 #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
65
66
67 #if XNN_ARCH_ARM || XNN_ARCH_ARM64
TEST(F32_VSQRDIFFC__NEON_X8,batch_eq_8)68 TEST(F32_VSQRDIFFC__NEON_X8, batch_eq_8) {
69 TEST_REQUIRES_ARM_NEON;
70 VBinOpCMicrokernelTester()
71 .batch_size(8)
72 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
73 }
74
TEST(F32_VSQRDIFFC__NEON_X8,batch_div_8)75 TEST(F32_VSQRDIFFC__NEON_X8, batch_div_8) {
76 TEST_REQUIRES_ARM_NEON;
77 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
78 VBinOpCMicrokernelTester()
79 .batch_size(batch_size)
80 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
81 }
82 }
83
TEST(F32_VSQRDIFFC__NEON_X8,batch_lt_8)84 TEST(F32_VSQRDIFFC__NEON_X8, batch_lt_8) {
85 TEST_REQUIRES_ARM_NEON;
86 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
87 VBinOpCMicrokernelTester()
88 .batch_size(batch_size)
89 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
90 }
91 }
92
TEST(F32_VSQRDIFFC__NEON_X8,batch_gt_8)93 TEST(F32_VSQRDIFFC__NEON_X8, batch_gt_8) {
94 TEST_REQUIRES_ARM_NEON;
95 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
96 VBinOpCMicrokernelTester()
97 .batch_size(batch_size)
98 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
99 }
100 }
101
TEST(F32_VSQRDIFFC__NEON_X8,inplace)102 TEST(F32_VSQRDIFFC__NEON_X8, inplace) {
103 TEST_REQUIRES_ARM_NEON;
104 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
105 VBinOpCMicrokernelTester()
106 .batch_size(batch_size)
107 .inplace(true)
108 .Test(xnn_f32_vsqrdiffc_ukernel__neon_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
109 }
110 }
111 #endif // XNN_ARCH_ARM || XNN_ARCH_ARM64
112
113
114 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__SSE_X4,batch_eq_4)115 TEST(F32_VSQRDIFFC__SSE_X4, batch_eq_4) {
116 TEST_REQUIRES_X86_SSE;
117 VBinOpCMicrokernelTester()
118 .batch_size(4)
119 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
120 }
121
TEST(F32_VSQRDIFFC__SSE_X4,batch_div_4)122 TEST(F32_VSQRDIFFC__SSE_X4, batch_div_4) {
123 TEST_REQUIRES_X86_SSE;
124 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
125 VBinOpCMicrokernelTester()
126 .batch_size(batch_size)
127 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
128 }
129 }
130
TEST(F32_VSQRDIFFC__SSE_X4,batch_lt_4)131 TEST(F32_VSQRDIFFC__SSE_X4, batch_lt_4) {
132 TEST_REQUIRES_X86_SSE;
133 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
134 VBinOpCMicrokernelTester()
135 .batch_size(batch_size)
136 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
137 }
138 }
139
TEST(F32_VSQRDIFFC__SSE_X4,batch_gt_4)140 TEST(F32_VSQRDIFFC__SSE_X4, batch_gt_4) {
141 TEST_REQUIRES_X86_SSE;
142 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
143 VBinOpCMicrokernelTester()
144 .batch_size(batch_size)
145 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
146 }
147 }
148
TEST(F32_VSQRDIFFC__SSE_X4,inplace)149 TEST(F32_VSQRDIFFC__SSE_X4, inplace) {
150 TEST_REQUIRES_X86_SSE;
151 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
152 VBinOpCMicrokernelTester()
153 .batch_size(batch_size)
154 .inplace(true)
155 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
156 }
157 }
158 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
159
160
161 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__SSE_X8,batch_eq_8)162 TEST(F32_VSQRDIFFC__SSE_X8, batch_eq_8) {
163 TEST_REQUIRES_X86_SSE;
164 VBinOpCMicrokernelTester()
165 .batch_size(8)
166 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
167 }
168
TEST(F32_VSQRDIFFC__SSE_X8,batch_div_8)169 TEST(F32_VSQRDIFFC__SSE_X8, batch_div_8) {
170 TEST_REQUIRES_X86_SSE;
171 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
172 VBinOpCMicrokernelTester()
173 .batch_size(batch_size)
174 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
175 }
176 }
177
TEST(F32_VSQRDIFFC__SSE_X8,batch_lt_8)178 TEST(F32_VSQRDIFFC__SSE_X8, batch_lt_8) {
179 TEST_REQUIRES_X86_SSE;
180 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
181 VBinOpCMicrokernelTester()
182 .batch_size(batch_size)
183 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
184 }
185 }
186
TEST(F32_VSQRDIFFC__SSE_X8,batch_gt_8)187 TEST(F32_VSQRDIFFC__SSE_X8, batch_gt_8) {
188 TEST_REQUIRES_X86_SSE;
189 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
190 VBinOpCMicrokernelTester()
191 .batch_size(batch_size)
192 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
193 }
194 }
195
TEST(F32_VSQRDIFFC__SSE_X8,inplace)196 TEST(F32_VSQRDIFFC__SSE_X8, inplace) {
197 TEST_REQUIRES_X86_SSE;
198 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
199 VBinOpCMicrokernelTester()
200 .batch_size(batch_size)
201 .inplace(true)
202 .Test(xnn_f32_vsqrdiffc_ukernel__sse_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
203 }
204 }
205 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
206
207
208 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__AVX_X8,batch_eq_8)209 TEST(F32_VSQRDIFFC__AVX_X8, batch_eq_8) {
210 TEST_REQUIRES_X86_AVX;
211 VBinOpCMicrokernelTester()
212 .batch_size(8)
213 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
214 }
215
TEST(F32_VSQRDIFFC__AVX_X8,batch_div_8)216 TEST(F32_VSQRDIFFC__AVX_X8, batch_div_8) {
217 TEST_REQUIRES_X86_AVX;
218 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
219 VBinOpCMicrokernelTester()
220 .batch_size(batch_size)
221 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
222 }
223 }
224
TEST(F32_VSQRDIFFC__AVX_X8,batch_lt_8)225 TEST(F32_VSQRDIFFC__AVX_X8, batch_lt_8) {
226 TEST_REQUIRES_X86_AVX;
227 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
228 VBinOpCMicrokernelTester()
229 .batch_size(batch_size)
230 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
231 }
232 }
233
TEST(F32_VSQRDIFFC__AVX_X8,batch_gt_8)234 TEST(F32_VSQRDIFFC__AVX_X8, batch_gt_8) {
235 TEST_REQUIRES_X86_AVX;
236 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
237 VBinOpCMicrokernelTester()
238 .batch_size(batch_size)
239 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
240 }
241 }
242
TEST(F32_VSQRDIFFC__AVX_X8,inplace)243 TEST(F32_VSQRDIFFC__AVX_X8, inplace) {
244 TEST_REQUIRES_X86_AVX;
245 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
246 VBinOpCMicrokernelTester()
247 .batch_size(batch_size)
248 .inplace(true)
249 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
250 }
251 }
252 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
253
254
255 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__AVX_X16,batch_eq_16)256 TEST(F32_VSQRDIFFC__AVX_X16, batch_eq_16) {
257 TEST_REQUIRES_X86_AVX;
258 VBinOpCMicrokernelTester()
259 .batch_size(16)
260 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
261 }
262
TEST(F32_VSQRDIFFC__AVX_X16,batch_div_16)263 TEST(F32_VSQRDIFFC__AVX_X16, batch_div_16) {
264 TEST_REQUIRES_X86_AVX;
265 for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
266 VBinOpCMicrokernelTester()
267 .batch_size(batch_size)
268 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
269 }
270 }
271
TEST(F32_VSQRDIFFC__AVX_X16,batch_lt_16)272 TEST(F32_VSQRDIFFC__AVX_X16, batch_lt_16) {
273 TEST_REQUIRES_X86_AVX;
274 for (size_t batch_size = 1; batch_size < 16; batch_size++) {
275 VBinOpCMicrokernelTester()
276 .batch_size(batch_size)
277 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
278 }
279 }
280
TEST(F32_VSQRDIFFC__AVX_X16,batch_gt_16)281 TEST(F32_VSQRDIFFC__AVX_X16, batch_gt_16) {
282 TEST_REQUIRES_X86_AVX;
283 for (size_t batch_size = 17; batch_size < 32; batch_size++) {
284 VBinOpCMicrokernelTester()
285 .batch_size(batch_size)
286 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
287 }
288 }
289
TEST(F32_VSQRDIFFC__AVX_X16,inplace)290 TEST(F32_VSQRDIFFC__AVX_X16, inplace) {
291 TEST_REQUIRES_X86_AVX;
292 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
293 VBinOpCMicrokernelTester()
294 .batch_size(batch_size)
295 .inplace(true)
296 .Test(xnn_f32_vsqrdiffc_ukernel__avx_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
297 }
298 }
299 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
300
301
302 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__AVX512F_X16,batch_eq_16)303 TEST(F32_VSQRDIFFC__AVX512F_X16, batch_eq_16) {
304 TEST_REQUIRES_X86_AVX512F;
305 VBinOpCMicrokernelTester()
306 .batch_size(16)
307 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
308 }
309
TEST(F32_VSQRDIFFC__AVX512F_X16,batch_div_16)310 TEST(F32_VSQRDIFFC__AVX512F_X16, batch_div_16) {
311 TEST_REQUIRES_X86_AVX512F;
312 for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
313 VBinOpCMicrokernelTester()
314 .batch_size(batch_size)
315 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
316 }
317 }
318
TEST(F32_VSQRDIFFC__AVX512F_X16,batch_lt_16)319 TEST(F32_VSQRDIFFC__AVX512F_X16, batch_lt_16) {
320 TEST_REQUIRES_X86_AVX512F;
321 for (size_t batch_size = 1; batch_size < 16; batch_size++) {
322 VBinOpCMicrokernelTester()
323 .batch_size(batch_size)
324 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
325 }
326 }
327
TEST(F32_VSQRDIFFC__AVX512F_X16,batch_gt_16)328 TEST(F32_VSQRDIFFC__AVX512F_X16, batch_gt_16) {
329 TEST_REQUIRES_X86_AVX512F;
330 for (size_t batch_size = 17; batch_size < 32; batch_size++) {
331 VBinOpCMicrokernelTester()
332 .batch_size(batch_size)
333 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
334 }
335 }
336
TEST(F32_VSQRDIFFC__AVX512F_X16,inplace)337 TEST(F32_VSQRDIFFC__AVX512F_X16, inplace) {
338 TEST_REQUIRES_X86_AVX512F;
339 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
340 VBinOpCMicrokernelTester()
341 .batch_size(batch_size)
342 .inplace(true)
343 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
344 }
345 }
346 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
347
348
349 #if XNN_ARCH_X86 || XNN_ARCH_X86_64
TEST(F32_VSQRDIFFC__AVX512F_X32,batch_eq_32)350 TEST(F32_VSQRDIFFC__AVX512F_X32, batch_eq_32) {
351 TEST_REQUIRES_X86_AVX512F;
352 VBinOpCMicrokernelTester()
353 .batch_size(32)
354 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x32, VBinOpCMicrokernelTester::OpType::SqrDiffC);
355 }
356
TEST(F32_VSQRDIFFC__AVX512F_X32,batch_div_32)357 TEST(F32_VSQRDIFFC__AVX512F_X32, batch_div_32) {
358 TEST_REQUIRES_X86_AVX512F;
359 for (size_t batch_size = 64; batch_size < 320; batch_size += 32) {
360 VBinOpCMicrokernelTester()
361 .batch_size(batch_size)
362 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x32, VBinOpCMicrokernelTester::OpType::SqrDiffC);
363 }
364 }
365
TEST(F32_VSQRDIFFC__AVX512F_X32,batch_lt_32)366 TEST(F32_VSQRDIFFC__AVX512F_X32, batch_lt_32) {
367 TEST_REQUIRES_X86_AVX512F;
368 for (size_t batch_size = 1; batch_size < 32; batch_size++) {
369 VBinOpCMicrokernelTester()
370 .batch_size(batch_size)
371 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x32, VBinOpCMicrokernelTester::OpType::SqrDiffC);
372 }
373 }
374
TEST(F32_VSQRDIFFC__AVX512F_X32,batch_gt_32)375 TEST(F32_VSQRDIFFC__AVX512F_X32, batch_gt_32) {
376 TEST_REQUIRES_X86_AVX512F;
377 for (size_t batch_size = 33; batch_size < 64; batch_size++) {
378 VBinOpCMicrokernelTester()
379 .batch_size(batch_size)
380 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x32, VBinOpCMicrokernelTester::OpType::SqrDiffC);
381 }
382 }
383
TEST(F32_VSQRDIFFC__AVX512F_X32,inplace)384 TEST(F32_VSQRDIFFC__AVX512F_X32, inplace) {
385 TEST_REQUIRES_X86_AVX512F;
386 for (size_t batch_size = 1; batch_size <= 160; batch_size += 31) {
387 VBinOpCMicrokernelTester()
388 .batch_size(batch_size)
389 .inplace(true)
390 .Test(xnn_f32_vsqrdiffc_ukernel__avx512f_x32, VBinOpCMicrokernelTester::OpType::SqrDiffC);
391 }
392 }
393 #endif // XNN_ARCH_X86 || XNN_ARCH_X86_64
394
395
396 #if XNN_ARCH_WASMSIMD
TEST(F32_VSQRDIFFC__WASMSIMD_X4,batch_eq_4)397 TEST(F32_VSQRDIFFC__WASMSIMD_X4, batch_eq_4) {
398 VBinOpCMicrokernelTester()
399 .batch_size(4)
400 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
401 }
402
TEST(F32_VSQRDIFFC__WASMSIMD_X4,batch_div_4)403 TEST(F32_VSQRDIFFC__WASMSIMD_X4, batch_div_4) {
404 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
405 VBinOpCMicrokernelTester()
406 .batch_size(batch_size)
407 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
408 }
409 }
410
TEST(F32_VSQRDIFFC__WASMSIMD_X4,batch_lt_4)411 TEST(F32_VSQRDIFFC__WASMSIMD_X4, batch_lt_4) {
412 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
413 VBinOpCMicrokernelTester()
414 .batch_size(batch_size)
415 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
416 }
417 }
418
TEST(F32_VSQRDIFFC__WASMSIMD_X4,batch_gt_4)419 TEST(F32_VSQRDIFFC__WASMSIMD_X4, batch_gt_4) {
420 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
421 VBinOpCMicrokernelTester()
422 .batch_size(batch_size)
423 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
424 }
425 }
426
TEST(F32_VSQRDIFFC__WASMSIMD_X4,inplace)427 TEST(F32_VSQRDIFFC__WASMSIMD_X4, inplace) {
428 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
429 VBinOpCMicrokernelTester()
430 .batch_size(batch_size)
431 .inplace(true)
432 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC);
433 }
434 }
435 #endif // XNN_ARCH_WASMSIMD
436
437
438 #if XNN_ARCH_WASMSIMD
TEST(F32_VSQRDIFFC__WASMSIMD_X8,batch_eq_8)439 TEST(F32_VSQRDIFFC__WASMSIMD_X8, batch_eq_8) {
440 VBinOpCMicrokernelTester()
441 .batch_size(8)
442 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
443 }
444
TEST(F32_VSQRDIFFC__WASMSIMD_X8,batch_div_8)445 TEST(F32_VSQRDIFFC__WASMSIMD_X8, batch_div_8) {
446 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
447 VBinOpCMicrokernelTester()
448 .batch_size(batch_size)
449 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
450 }
451 }
452
TEST(F32_VSQRDIFFC__WASMSIMD_X8,batch_lt_8)453 TEST(F32_VSQRDIFFC__WASMSIMD_X8, batch_lt_8) {
454 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
455 VBinOpCMicrokernelTester()
456 .batch_size(batch_size)
457 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
458 }
459 }
460
TEST(F32_VSQRDIFFC__WASMSIMD_X8,batch_gt_8)461 TEST(F32_VSQRDIFFC__WASMSIMD_X8, batch_gt_8) {
462 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
463 VBinOpCMicrokernelTester()
464 .batch_size(batch_size)
465 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
466 }
467 }
468
TEST(F32_VSQRDIFFC__WASMSIMD_X8,inplace)469 TEST(F32_VSQRDIFFC__WASMSIMD_X8, inplace) {
470 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
471 VBinOpCMicrokernelTester()
472 .batch_size(batch_size)
473 .inplace(true)
474 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC);
475 }
476 }
477 #endif // XNN_ARCH_WASMSIMD
478
479
480 #if XNN_ARCH_WASMSIMD
TEST(F32_VSQRDIFFC__WASMSIMD_X16,batch_eq_16)481 TEST(F32_VSQRDIFFC__WASMSIMD_X16, batch_eq_16) {
482 VBinOpCMicrokernelTester()
483 .batch_size(16)
484 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
485 }
486
TEST(F32_VSQRDIFFC__WASMSIMD_X16,batch_div_16)487 TEST(F32_VSQRDIFFC__WASMSIMD_X16, batch_div_16) {
488 for (size_t batch_size = 32; batch_size < 160; batch_size += 16) {
489 VBinOpCMicrokernelTester()
490 .batch_size(batch_size)
491 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
492 }
493 }
494
TEST(F32_VSQRDIFFC__WASMSIMD_X16,batch_lt_16)495 TEST(F32_VSQRDIFFC__WASMSIMD_X16, batch_lt_16) {
496 for (size_t batch_size = 1; batch_size < 16; batch_size++) {
497 VBinOpCMicrokernelTester()
498 .batch_size(batch_size)
499 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
500 }
501 }
502
TEST(F32_VSQRDIFFC__WASMSIMD_X16,batch_gt_16)503 TEST(F32_VSQRDIFFC__WASMSIMD_X16, batch_gt_16) {
504 for (size_t batch_size = 17; batch_size < 32; batch_size++) {
505 VBinOpCMicrokernelTester()
506 .batch_size(batch_size)
507 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
508 }
509 }
510
TEST(F32_VSQRDIFFC__WASMSIMD_X16,inplace)511 TEST(F32_VSQRDIFFC__WASMSIMD_X16, inplace) {
512 for (size_t batch_size = 1; batch_size <= 80; batch_size += 15) {
513 VBinOpCMicrokernelTester()
514 .batch_size(batch_size)
515 .inplace(true)
516 .Test(xnn_f32_vsqrdiffc_ukernel__wasmsimd_x16, VBinOpCMicrokernelTester::OpType::SqrDiffC);
517 }
518 }
519 #endif // XNN_ARCH_WASMSIMD
520
521
TEST(F32_VSQRDIFFC__SCALAR_X1,batch_eq_1)522 TEST(F32_VSQRDIFFC__SCALAR_X1, batch_eq_1) {
523 VBinOpCMicrokernelTester()
524 .batch_size(1)
525 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x1, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
526 }
527
TEST(F32_VSQRDIFFC__SCALAR_X1,batch_gt_1)528 TEST(F32_VSQRDIFFC__SCALAR_X1, batch_gt_1) {
529 for (size_t batch_size = 2; batch_size < 10; batch_size++) {
530 VBinOpCMicrokernelTester()
531 .batch_size(batch_size)
532 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x1, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
533 }
534 }
535
TEST(F32_VSQRDIFFC__SCALAR_X1,inplace)536 TEST(F32_VSQRDIFFC__SCALAR_X1, inplace) {
537 for (size_t batch_size = 1; batch_size <= 5; batch_size += 1) {
538 VBinOpCMicrokernelTester()
539 .batch_size(batch_size)
540 .inplace(true)
541 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x1, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
542 }
543 }
544
545
TEST(F32_VSQRDIFFC__SCALAR_X2,batch_eq_2)546 TEST(F32_VSQRDIFFC__SCALAR_X2, batch_eq_2) {
547 VBinOpCMicrokernelTester()
548 .batch_size(2)
549 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x2, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
550 }
551
TEST(F32_VSQRDIFFC__SCALAR_X2,batch_div_2)552 TEST(F32_VSQRDIFFC__SCALAR_X2, batch_div_2) {
553 for (size_t batch_size = 4; batch_size < 20; batch_size += 2) {
554 VBinOpCMicrokernelTester()
555 .batch_size(batch_size)
556 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x2, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
557 }
558 }
559
TEST(F32_VSQRDIFFC__SCALAR_X2,batch_lt_2)560 TEST(F32_VSQRDIFFC__SCALAR_X2, batch_lt_2) {
561 for (size_t batch_size = 1; batch_size < 2; batch_size++) {
562 VBinOpCMicrokernelTester()
563 .batch_size(batch_size)
564 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x2, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
565 }
566 }
567
TEST(F32_VSQRDIFFC__SCALAR_X2,batch_gt_2)568 TEST(F32_VSQRDIFFC__SCALAR_X2, batch_gt_2) {
569 for (size_t batch_size = 3; batch_size < 4; batch_size++) {
570 VBinOpCMicrokernelTester()
571 .batch_size(batch_size)
572 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x2, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
573 }
574 }
575
TEST(F32_VSQRDIFFC__SCALAR_X2,inplace)576 TEST(F32_VSQRDIFFC__SCALAR_X2, inplace) {
577 for (size_t batch_size = 1; batch_size <= 10; batch_size += 1) {
578 VBinOpCMicrokernelTester()
579 .batch_size(batch_size)
580 .inplace(true)
581 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x2, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
582 }
583 }
584
585
TEST(F32_VSQRDIFFC__SCALAR_X4,batch_eq_4)586 TEST(F32_VSQRDIFFC__SCALAR_X4, batch_eq_4) {
587 VBinOpCMicrokernelTester()
588 .batch_size(4)
589 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
590 }
591
TEST(F32_VSQRDIFFC__SCALAR_X4,batch_div_4)592 TEST(F32_VSQRDIFFC__SCALAR_X4, batch_div_4) {
593 for (size_t batch_size = 8; batch_size < 40; batch_size += 4) {
594 VBinOpCMicrokernelTester()
595 .batch_size(batch_size)
596 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
597 }
598 }
599
TEST(F32_VSQRDIFFC__SCALAR_X4,batch_lt_4)600 TEST(F32_VSQRDIFFC__SCALAR_X4, batch_lt_4) {
601 for (size_t batch_size = 1; batch_size < 4; batch_size++) {
602 VBinOpCMicrokernelTester()
603 .batch_size(batch_size)
604 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
605 }
606 }
607
TEST(F32_VSQRDIFFC__SCALAR_X4,batch_gt_4)608 TEST(F32_VSQRDIFFC__SCALAR_X4, batch_gt_4) {
609 for (size_t batch_size = 5; batch_size < 8; batch_size++) {
610 VBinOpCMicrokernelTester()
611 .batch_size(batch_size)
612 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
613 }
614 }
615
TEST(F32_VSQRDIFFC__SCALAR_X4,inplace)616 TEST(F32_VSQRDIFFC__SCALAR_X4, inplace) {
617 for (size_t batch_size = 1; batch_size <= 20; batch_size += 3) {
618 VBinOpCMicrokernelTester()
619 .batch_size(batch_size)
620 .inplace(true)
621 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x4, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
622 }
623 }
624
625
TEST(F32_VSQRDIFFC__SCALAR_X8,batch_eq_8)626 TEST(F32_VSQRDIFFC__SCALAR_X8, batch_eq_8) {
627 VBinOpCMicrokernelTester()
628 .batch_size(8)
629 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
630 }
631
TEST(F32_VSQRDIFFC__SCALAR_X8,batch_div_8)632 TEST(F32_VSQRDIFFC__SCALAR_X8, batch_div_8) {
633 for (size_t batch_size = 16; batch_size < 80; batch_size += 8) {
634 VBinOpCMicrokernelTester()
635 .batch_size(batch_size)
636 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
637 }
638 }
639
TEST(F32_VSQRDIFFC__SCALAR_X8,batch_lt_8)640 TEST(F32_VSQRDIFFC__SCALAR_X8, batch_lt_8) {
641 for (size_t batch_size = 1; batch_size < 8; batch_size++) {
642 VBinOpCMicrokernelTester()
643 .batch_size(batch_size)
644 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
645 }
646 }
647
TEST(F32_VSQRDIFFC__SCALAR_X8,batch_gt_8)648 TEST(F32_VSQRDIFFC__SCALAR_X8, batch_gt_8) {
649 for (size_t batch_size = 9; batch_size < 16; batch_size++) {
650 VBinOpCMicrokernelTester()
651 .batch_size(batch_size)
652 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
653 }
654 }
655
TEST(F32_VSQRDIFFC__SCALAR_X8,inplace)656 TEST(F32_VSQRDIFFC__SCALAR_X8, inplace) {
657 for (size_t batch_size = 1; batch_size <= 40; batch_size += 7) {
658 VBinOpCMicrokernelTester()
659 .batch_size(batch_size)
660 .inplace(true)
661 .Test(xnn_f32_vsqrdiffc_ukernel__scalar_x8, VBinOpCMicrokernelTester::OpType::SqrDiffC, VBinOpCMicrokernelTester::Variant::Scalar);
662 }
663 }
664