1
2
3
4
5
6
7
8
9 package simd_test
10
11 import (
12 "simd/archsimd"
13 "testing"
14 )
15
16
17 func testInt8x16Unary(t *testing.T, f func(_ archsimd.Int8x16) archsimd.Int8x16, want func(_ []int8) []int8) {
18 n := 16
19 t.Helper()
20 forSlice(t, int8s, n, func(x []int8) bool {
21 t.Helper()
22 a := archsimd.LoadInt8x16Slice(x)
23 g := make([]int8, n)
24 f(a).StoreSlice(g)
25 w := want(x)
26 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
27 })
28 }
29
30
31 func testInt16x8Unary(t *testing.T, f func(_ archsimd.Int16x8) archsimd.Int16x8, want func(_ []int16) []int16) {
32 n := 8
33 t.Helper()
34 forSlice(t, int16s, n, func(x []int16) bool {
35 t.Helper()
36 a := archsimd.LoadInt16x8Slice(x)
37 g := make([]int16, n)
38 f(a).StoreSlice(g)
39 w := want(x)
40 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
41 })
42 }
43
44
45 func testInt32x4Unary(t *testing.T, f func(_ archsimd.Int32x4) archsimd.Int32x4, want func(_ []int32) []int32) {
46 n := 4
47 t.Helper()
48 forSlice(t, int32s, n, func(x []int32) bool {
49 t.Helper()
50 a := archsimd.LoadInt32x4Slice(x)
51 g := make([]int32, n)
52 f(a).StoreSlice(g)
53 w := want(x)
54 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
55 })
56 }
57
58
59 func testInt64x2Unary(t *testing.T, f func(_ archsimd.Int64x2) archsimd.Int64x2, want func(_ []int64) []int64) {
60 n := 2
61 t.Helper()
62 forSlice(t, int64s, n, func(x []int64) bool {
63 t.Helper()
64 a := archsimd.LoadInt64x2Slice(x)
65 g := make([]int64, n)
66 f(a).StoreSlice(g)
67 w := want(x)
68 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
69 })
70 }
71
72
73 func testUint8x16Unary(t *testing.T, f func(_ archsimd.Uint8x16) archsimd.Uint8x16, want func(_ []uint8) []uint8) {
74 n := 16
75 t.Helper()
76 forSlice(t, uint8s, n, func(x []uint8) bool {
77 t.Helper()
78 a := archsimd.LoadUint8x16Slice(x)
79 g := make([]uint8, n)
80 f(a).StoreSlice(g)
81 w := want(x)
82 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
83 })
84 }
85
86
87 func testUint16x8Unary(t *testing.T, f func(_ archsimd.Uint16x8) archsimd.Uint16x8, want func(_ []uint16) []uint16) {
88 n := 8
89 t.Helper()
90 forSlice(t, uint16s, n, func(x []uint16) bool {
91 t.Helper()
92 a := archsimd.LoadUint16x8Slice(x)
93 g := make([]uint16, n)
94 f(a).StoreSlice(g)
95 w := want(x)
96 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
97 })
98 }
99
100
101 func testUint32x4Unary(t *testing.T, f func(_ archsimd.Uint32x4) archsimd.Uint32x4, want func(_ []uint32) []uint32) {
102 n := 4
103 t.Helper()
104 forSlice(t, uint32s, n, func(x []uint32) bool {
105 t.Helper()
106 a := archsimd.LoadUint32x4Slice(x)
107 g := make([]uint32, n)
108 f(a).StoreSlice(g)
109 w := want(x)
110 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
111 })
112 }
113
114
115 func testUint64x2Unary(t *testing.T, f func(_ archsimd.Uint64x2) archsimd.Uint64x2, want func(_ []uint64) []uint64) {
116 n := 2
117 t.Helper()
118 forSlice(t, uint64s, n, func(x []uint64) bool {
119 t.Helper()
120 a := archsimd.LoadUint64x2Slice(x)
121 g := make([]uint64, n)
122 f(a).StoreSlice(g)
123 w := want(x)
124 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
125 })
126 }
127
128
129 func testFloat32x4Unary(t *testing.T, f func(_ archsimd.Float32x4) archsimd.Float32x4, want func(_ []float32) []float32) {
130 n := 4
131 t.Helper()
132 forSlice(t, float32s, n, func(x []float32) bool {
133 t.Helper()
134 a := archsimd.LoadFloat32x4Slice(x)
135 g := make([]float32, n)
136 f(a).StoreSlice(g)
137 w := want(x)
138 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
139 })
140 }
141
142
143 func testFloat64x2Unary(t *testing.T, f func(_ archsimd.Float64x2) archsimd.Float64x2, want func(_ []float64) []float64) {
144 n := 2
145 t.Helper()
146 forSlice(t, float64s, n, func(x []float64) bool {
147 t.Helper()
148 a := archsimd.LoadFloat64x2Slice(x)
149 g := make([]float64, n)
150 f(a).StoreSlice(g)
151 w := want(x)
152 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
153 })
154 }
155
156
157 func testInt8x32Unary(t *testing.T, f func(_ archsimd.Int8x32) archsimd.Int8x32, want func(_ []int8) []int8) {
158 n := 32
159 t.Helper()
160 forSlice(t, int8s, n, func(x []int8) bool {
161 t.Helper()
162 a := archsimd.LoadInt8x32Slice(x)
163 g := make([]int8, n)
164 f(a).StoreSlice(g)
165 w := want(x)
166 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
167 })
168 }
169
170
171 func testInt16x16Unary(t *testing.T, f func(_ archsimd.Int16x16) archsimd.Int16x16, want func(_ []int16) []int16) {
172 n := 16
173 t.Helper()
174 forSlice(t, int16s, n, func(x []int16) bool {
175 t.Helper()
176 a := archsimd.LoadInt16x16Slice(x)
177 g := make([]int16, n)
178 f(a).StoreSlice(g)
179 w := want(x)
180 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
181 })
182 }
183
184
185 func testInt32x8Unary(t *testing.T, f func(_ archsimd.Int32x8) archsimd.Int32x8, want func(_ []int32) []int32) {
186 n := 8
187 t.Helper()
188 forSlice(t, int32s, n, func(x []int32) bool {
189 t.Helper()
190 a := archsimd.LoadInt32x8Slice(x)
191 g := make([]int32, n)
192 f(a).StoreSlice(g)
193 w := want(x)
194 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
195 })
196 }
197
198
199 func testInt64x4Unary(t *testing.T, f func(_ archsimd.Int64x4) archsimd.Int64x4, want func(_ []int64) []int64) {
200 n := 4
201 t.Helper()
202 forSlice(t, int64s, n, func(x []int64) bool {
203 t.Helper()
204 a := archsimd.LoadInt64x4Slice(x)
205 g := make([]int64, n)
206 f(a).StoreSlice(g)
207 w := want(x)
208 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
209 })
210 }
211
212
213 func testUint8x32Unary(t *testing.T, f func(_ archsimd.Uint8x32) archsimd.Uint8x32, want func(_ []uint8) []uint8) {
214 n := 32
215 t.Helper()
216 forSlice(t, uint8s, n, func(x []uint8) bool {
217 t.Helper()
218 a := archsimd.LoadUint8x32Slice(x)
219 g := make([]uint8, n)
220 f(a).StoreSlice(g)
221 w := want(x)
222 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
223 })
224 }
225
226
227 func testUint16x16Unary(t *testing.T, f func(_ archsimd.Uint16x16) archsimd.Uint16x16, want func(_ []uint16) []uint16) {
228 n := 16
229 t.Helper()
230 forSlice(t, uint16s, n, func(x []uint16) bool {
231 t.Helper()
232 a := archsimd.LoadUint16x16Slice(x)
233 g := make([]uint16, n)
234 f(a).StoreSlice(g)
235 w := want(x)
236 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
237 })
238 }
239
240
241 func testUint32x8Unary(t *testing.T, f func(_ archsimd.Uint32x8) archsimd.Uint32x8, want func(_ []uint32) []uint32) {
242 n := 8
243 t.Helper()
244 forSlice(t, uint32s, n, func(x []uint32) bool {
245 t.Helper()
246 a := archsimd.LoadUint32x8Slice(x)
247 g := make([]uint32, n)
248 f(a).StoreSlice(g)
249 w := want(x)
250 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
251 })
252 }
253
254
255 func testUint64x4Unary(t *testing.T, f func(_ archsimd.Uint64x4) archsimd.Uint64x4, want func(_ []uint64) []uint64) {
256 n := 4
257 t.Helper()
258 forSlice(t, uint64s, n, func(x []uint64) bool {
259 t.Helper()
260 a := archsimd.LoadUint64x4Slice(x)
261 g := make([]uint64, n)
262 f(a).StoreSlice(g)
263 w := want(x)
264 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
265 })
266 }
267
268
269 func testFloat32x8Unary(t *testing.T, f func(_ archsimd.Float32x8) archsimd.Float32x8, want func(_ []float32) []float32) {
270 n := 8
271 t.Helper()
272 forSlice(t, float32s, n, func(x []float32) bool {
273 t.Helper()
274 a := archsimd.LoadFloat32x8Slice(x)
275 g := make([]float32, n)
276 f(a).StoreSlice(g)
277 w := want(x)
278 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
279 })
280 }
281
282
283 func testFloat64x4Unary(t *testing.T, f func(_ archsimd.Float64x4) archsimd.Float64x4, want func(_ []float64) []float64) {
284 n := 4
285 t.Helper()
286 forSlice(t, float64s, n, func(x []float64) bool {
287 t.Helper()
288 a := archsimd.LoadFloat64x4Slice(x)
289 g := make([]float64, n)
290 f(a).StoreSlice(g)
291 w := want(x)
292 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
293 })
294 }
295
296
297 func testInt8x64Unary(t *testing.T, f func(_ archsimd.Int8x64) archsimd.Int8x64, want func(_ []int8) []int8) {
298 n := 64
299 t.Helper()
300 forSlice(t, int8s, n, func(x []int8) bool {
301 t.Helper()
302 a := archsimd.LoadInt8x64Slice(x)
303 g := make([]int8, n)
304 f(a).StoreSlice(g)
305 w := want(x)
306 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
307 })
308 }
309
310
311 func testInt16x32Unary(t *testing.T, f func(_ archsimd.Int16x32) archsimd.Int16x32, want func(_ []int16) []int16) {
312 n := 32
313 t.Helper()
314 forSlice(t, int16s, n, func(x []int16) bool {
315 t.Helper()
316 a := archsimd.LoadInt16x32Slice(x)
317 g := make([]int16, n)
318 f(a).StoreSlice(g)
319 w := want(x)
320 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
321 })
322 }
323
324
325 func testInt32x16Unary(t *testing.T, f func(_ archsimd.Int32x16) archsimd.Int32x16, want func(_ []int32) []int32) {
326 n := 16
327 t.Helper()
328 forSlice(t, int32s, n, func(x []int32) bool {
329 t.Helper()
330 a := archsimd.LoadInt32x16Slice(x)
331 g := make([]int32, n)
332 f(a).StoreSlice(g)
333 w := want(x)
334 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
335 })
336 }
337
338
339 func testInt64x8Unary(t *testing.T, f func(_ archsimd.Int64x8) archsimd.Int64x8, want func(_ []int64) []int64) {
340 n := 8
341 t.Helper()
342 forSlice(t, int64s, n, func(x []int64) bool {
343 t.Helper()
344 a := archsimd.LoadInt64x8Slice(x)
345 g := make([]int64, n)
346 f(a).StoreSlice(g)
347 w := want(x)
348 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
349 })
350 }
351
352
353 func testUint8x64Unary(t *testing.T, f func(_ archsimd.Uint8x64) archsimd.Uint8x64, want func(_ []uint8) []uint8) {
354 n := 64
355 t.Helper()
356 forSlice(t, uint8s, n, func(x []uint8) bool {
357 t.Helper()
358 a := archsimd.LoadUint8x64Slice(x)
359 g := make([]uint8, n)
360 f(a).StoreSlice(g)
361 w := want(x)
362 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
363 })
364 }
365
366
367 func testUint16x32Unary(t *testing.T, f func(_ archsimd.Uint16x32) archsimd.Uint16x32, want func(_ []uint16) []uint16) {
368 n := 32
369 t.Helper()
370 forSlice(t, uint16s, n, func(x []uint16) bool {
371 t.Helper()
372 a := archsimd.LoadUint16x32Slice(x)
373 g := make([]uint16, n)
374 f(a).StoreSlice(g)
375 w := want(x)
376 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
377 })
378 }
379
380
381 func testUint32x16Unary(t *testing.T, f func(_ archsimd.Uint32x16) archsimd.Uint32x16, want func(_ []uint32) []uint32) {
382 n := 16
383 t.Helper()
384 forSlice(t, uint32s, n, func(x []uint32) bool {
385 t.Helper()
386 a := archsimd.LoadUint32x16Slice(x)
387 g := make([]uint32, n)
388 f(a).StoreSlice(g)
389 w := want(x)
390 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
391 })
392 }
393
394
395 func testUint64x8Unary(t *testing.T, f func(_ archsimd.Uint64x8) archsimd.Uint64x8, want func(_ []uint64) []uint64) {
396 n := 8
397 t.Helper()
398 forSlice(t, uint64s, n, func(x []uint64) bool {
399 t.Helper()
400 a := archsimd.LoadUint64x8Slice(x)
401 g := make([]uint64, n)
402 f(a).StoreSlice(g)
403 w := want(x)
404 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
405 })
406 }
407
408
409 func testFloat32x16Unary(t *testing.T, f func(_ archsimd.Float32x16) archsimd.Float32x16, want func(_ []float32) []float32) {
410 n := 16
411 t.Helper()
412 forSlice(t, float32s, n, func(x []float32) bool {
413 t.Helper()
414 a := archsimd.LoadFloat32x16Slice(x)
415 g := make([]float32, n)
416 f(a).StoreSlice(g)
417 w := want(x)
418 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
419 })
420 }
421
422
423 func testFloat64x8Unary(t *testing.T, f func(_ archsimd.Float64x8) archsimd.Float64x8, want func(_ []float64) []float64) {
424 n := 8
425 t.Helper()
426 forSlice(t, float64s, n, func(x []float64) bool {
427 t.Helper()
428 a := archsimd.LoadFloat64x8Slice(x)
429 g := make([]float64, n)
430 f(a).StoreSlice(g)
431 w := want(x)
432 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
433 })
434 }
435
436
437
438
439 func testInt8x16ConvertToInt8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int8x16, want func(x []int8) []int8) {
440 n := 16
441 t.Helper()
442 forSlice(t, int8s, n, func(x []int8) bool {
443 t.Helper()
444 a := archsimd.LoadInt8x16Slice(x)
445 g := make([]int8, 16)
446 f(a).StoreSlice(g)
447 w := want(x)
448 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
449 })
450 }
451
452
453
454
455 func testInt16x8ConvertToInt8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int8x16, want func(x []int16) []int8) {
456 n := 8
457 t.Helper()
458 forSlice(t, int16s, n, func(x []int16) bool {
459 t.Helper()
460 a := archsimd.LoadInt16x8Slice(x)
461 g := make([]int8, 16)
462 f(a).StoreSlice(g)
463 w := want(x)
464 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
465 })
466 }
467
468
469
470
471 func testInt32x4ConvertToInt8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int8x16, want func(x []int32) []int8) {
472 n := 4
473 t.Helper()
474 forSlice(t, int32s, n, func(x []int32) bool {
475 t.Helper()
476 a := archsimd.LoadInt32x4Slice(x)
477 g := make([]int8, 16)
478 f(a).StoreSlice(g)
479 w := want(x)
480 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
481 })
482 }
483
484
485
486
487 func testInt64x2ConvertToInt8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int8x16, want func(x []int64) []int8) {
488 n := 2
489 t.Helper()
490 forSlice(t, int64s, n, func(x []int64) bool {
491 t.Helper()
492 a := archsimd.LoadInt64x2Slice(x)
493 g := make([]int8, 16)
494 f(a).StoreSlice(g)
495 w := want(x)
496 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
497 })
498 }
499
500
501
502
503 func testUint8x16ConvertToInt8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int8x16, want func(x []uint8) []int8) {
504 n := 16
505 t.Helper()
506 forSlice(t, uint8s, n, func(x []uint8) bool {
507 t.Helper()
508 a := archsimd.LoadUint8x16Slice(x)
509 g := make([]int8, 16)
510 f(a).StoreSlice(g)
511 w := want(x)
512 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
513 })
514 }
515
516
517
518
519 func testUint16x8ConvertToInt8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int8x16, want func(x []uint16) []int8) {
520 n := 8
521 t.Helper()
522 forSlice(t, uint16s, n, func(x []uint16) bool {
523 t.Helper()
524 a := archsimd.LoadUint16x8Slice(x)
525 g := make([]int8, 16)
526 f(a).StoreSlice(g)
527 w := want(x)
528 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
529 })
530 }
531
532
533
534
535 func testUint32x4ConvertToInt8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int8x16, want func(x []uint32) []int8) {
536 n := 4
537 t.Helper()
538 forSlice(t, uint32s, n, func(x []uint32) bool {
539 t.Helper()
540 a := archsimd.LoadUint32x4Slice(x)
541 g := make([]int8, 16)
542 f(a).StoreSlice(g)
543 w := want(x)
544 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
545 })
546 }
547
548
549
550
551 func testUint64x2ConvertToInt8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int8x16, want func(x []uint64) []int8) {
552 n := 2
553 t.Helper()
554 forSlice(t, uint64s, n, func(x []uint64) bool {
555 t.Helper()
556 a := archsimd.LoadUint64x2Slice(x)
557 g := make([]int8, 16)
558 f(a).StoreSlice(g)
559 w := want(x)
560 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
561 })
562 }
563
564
565
566
567 func testFloat32x4ConvertToInt8(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int8x16, want func(x []float32) []int8) {
568 n := 4
569 t.Helper()
570 forSlice(t, float32s, n, func(x []float32) bool {
571 t.Helper()
572 a := archsimd.LoadFloat32x4Slice(x)
573 g := make([]int8, 16)
574 f(a).StoreSlice(g)
575 w := want(x)
576 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
577 })
578 }
579
580
581
582
583 func testFloat64x2ConvertToInt8(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int8x16, want func(x []float64) []int8) {
584 n := 2
585 t.Helper()
586 forSlice(t, float64s, n, func(x []float64) bool {
587 t.Helper()
588 a := archsimd.LoadFloat64x2Slice(x)
589 g := make([]int8, 16)
590 f(a).StoreSlice(g)
591 w := want(x)
592 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
593 })
594 }
595
596
597
598
599 func testInt8x32ConvertToInt8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int8x32, want func(x []int8) []int8) {
600 n := 32
601 t.Helper()
602 forSlice(t, int8s, n, func(x []int8) bool {
603 t.Helper()
604 a := archsimd.LoadInt8x32Slice(x)
605 g := make([]int8, 32)
606 f(a).StoreSlice(g)
607 w := want(x)
608 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
609 })
610 }
611
612
613
614
615 func testInt16x16ConvertToInt8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int8x16, want func(x []int16) []int8) {
616 n := 16
617 t.Helper()
618 forSlice(t, int16s, n, func(x []int16) bool {
619 t.Helper()
620 a := archsimd.LoadInt16x16Slice(x)
621 g := make([]int8, 16)
622 f(a).StoreSlice(g)
623 w := want(x)
624 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
625 })
626 }
627
628
629
630
631 func testInt32x8ConvertToInt8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int8x16, want func(x []int32) []int8) {
632 n := 8
633 t.Helper()
634 forSlice(t, int32s, n, func(x []int32) bool {
635 t.Helper()
636 a := archsimd.LoadInt32x8Slice(x)
637 g := make([]int8, 16)
638 f(a).StoreSlice(g)
639 w := want(x)
640 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
641 })
642 }
643
644
645
646
647 func testInt64x4ConvertToInt8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int8x16, want func(x []int64) []int8) {
648 n := 4
649 t.Helper()
650 forSlice(t, int64s, n, func(x []int64) bool {
651 t.Helper()
652 a := archsimd.LoadInt64x4Slice(x)
653 g := make([]int8, 16)
654 f(a).StoreSlice(g)
655 w := want(x)
656 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
657 })
658 }
659
660
661
662
663 func testUint8x32ConvertToInt8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int8x32, want func(x []uint8) []int8) {
664 n := 32
665 t.Helper()
666 forSlice(t, uint8s, n, func(x []uint8) bool {
667 t.Helper()
668 a := archsimd.LoadUint8x32Slice(x)
669 g := make([]int8, 32)
670 f(a).StoreSlice(g)
671 w := want(x)
672 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
673 })
674 }
675
676
677
678
679 func testUint16x16ConvertToInt8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int8x16, want func(x []uint16) []int8) {
680 n := 16
681 t.Helper()
682 forSlice(t, uint16s, n, func(x []uint16) bool {
683 t.Helper()
684 a := archsimd.LoadUint16x16Slice(x)
685 g := make([]int8, 16)
686 f(a).StoreSlice(g)
687 w := want(x)
688 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
689 })
690 }
691
692
693
694
695 func testUint32x8ConvertToInt8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int8x16, want func(x []uint32) []int8) {
696 n := 8
697 t.Helper()
698 forSlice(t, uint32s, n, func(x []uint32) bool {
699 t.Helper()
700 a := archsimd.LoadUint32x8Slice(x)
701 g := make([]int8, 16)
702 f(a).StoreSlice(g)
703 w := want(x)
704 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
705 })
706 }
707
708
709
710
711 func testUint64x4ConvertToInt8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int8x16, want func(x []uint64) []int8) {
712 n := 4
713 t.Helper()
714 forSlice(t, uint64s, n, func(x []uint64) bool {
715 t.Helper()
716 a := archsimd.LoadUint64x4Slice(x)
717 g := make([]int8, 16)
718 f(a).StoreSlice(g)
719 w := want(x)
720 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
721 })
722 }
723
724
725
726
727 func testFloat32x8ConvertToInt8(t *testing.T, f func(x archsimd.Float32x8) archsimd.Int8x16, want func(x []float32) []int8) {
728 n := 8
729 t.Helper()
730 forSlice(t, float32s, n, func(x []float32) bool {
731 t.Helper()
732 a := archsimd.LoadFloat32x8Slice(x)
733 g := make([]int8, 16)
734 f(a).StoreSlice(g)
735 w := want(x)
736 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
737 })
738 }
739
740
741
742
743 func testFloat64x4ConvertToInt8(t *testing.T, f func(x archsimd.Float64x4) archsimd.Int8x16, want func(x []float64) []int8) {
744 n := 4
745 t.Helper()
746 forSlice(t, float64s, n, func(x []float64) bool {
747 t.Helper()
748 a := archsimd.LoadFloat64x4Slice(x)
749 g := make([]int8, 16)
750 f(a).StoreSlice(g)
751 w := want(x)
752 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
753 })
754 }
755
756
757
758
759 func testInt8x64ConvertToInt8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int8x64, want func(x []int8) []int8) {
760 n := 64
761 t.Helper()
762 forSlice(t, int8s, n, func(x []int8) bool {
763 t.Helper()
764 a := archsimd.LoadInt8x64Slice(x)
765 g := make([]int8, 64)
766 f(a).StoreSlice(g)
767 w := want(x)
768 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
769 })
770 }
771
772
773
774
775 func testInt16x32ConvertToInt8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int8x32, want func(x []int16) []int8) {
776 n := 32
777 t.Helper()
778 forSlice(t, int16s, n, func(x []int16) bool {
779 t.Helper()
780 a := archsimd.LoadInt16x32Slice(x)
781 g := make([]int8, 32)
782 f(a).StoreSlice(g)
783 w := want(x)
784 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
785 })
786 }
787
788
789
790
791 func testInt32x16ConvertToInt8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int8x16, want func(x []int32) []int8) {
792 n := 16
793 t.Helper()
794 forSlice(t, int32s, n, func(x []int32) bool {
795 t.Helper()
796 a := archsimd.LoadInt32x16Slice(x)
797 g := make([]int8, 16)
798 f(a).StoreSlice(g)
799 w := want(x)
800 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
801 })
802 }
803
804
805
806
807 func testInt64x8ConvertToInt8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int8x16, want func(x []int64) []int8) {
808 n := 8
809 t.Helper()
810 forSlice(t, int64s, n, func(x []int64) bool {
811 t.Helper()
812 a := archsimd.LoadInt64x8Slice(x)
813 g := make([]int8, 16)
814 f(a).StoreSlice(g)
815 w := want(x)
816 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
817 })
818 }
819
820
821
822
823 func testUint8x64ConvertToInt8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int8x64, want func(x []uint8) []int8) {
824 n := 64
825 t.Helper()
826 forSlice(t, uint8s, n, func(x []uint8) bool {
827 t.Helper()
828 a := archsimd.LoadUint8x64Slice(x)
829 g := make([]int8, 64)
830 f(a).StoreSlice(g)
831 w := want(x)
832 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
833 })
834 }
835
836
837
838
839 func testUint16x32ConvertToInt8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int8x32, want func(x []uint16) []int8) {
840 n := 32
841 t.Helper()
842 forSlice(t, uint16s, n, func(x []uint16) bool {
843 t.Helper()
844 a := archsimd.LoadUint16x32Slice(x)
845 g := make([]int8, 32)
846 f(a).StoreSlice(g)
847 w := want(x)
848 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
849 })
850 }
851
852
853
854
855 func testUint32x16ConvertToInt8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int8x16, want func(x []uint32) []int8) {
856 n := 16
857 t.Helper()
858 forSlice(t, uint32s, n, func(x []uint32) bool {
859 t.Helper()
860 a := archsimd.LoadUint32x16Slice(x)
861 g := make([]int8, 16)
862 f(a).StoreSlice(g)
863 w := want(x)
864 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
865 })
866 }
867
868
869
870
871 func testUint64x8ConvertToInt8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int8x16, want func(x []uint64) []int8) {
872 n := 8
873 t.Helper()
874 forSlice(t, uint64s, n, func(x []uint64) bool {
875 t.Helper()
876 a := archsimd.LoadUint64x8Slice(x)
877 g := make([]int8, 16)
878 f(a).StoreSlice(g)
879 w := want(x)
880 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
881 })
882 }
883
884
885
886
887 func testFloat32x16ConvertToInt8(t *testing.T, f func(x archsimd.Float32x16) archsimd.Int8x16, want func(x []float32) []int8) {
888 n := 16
889 t.Helper()
890 forSlice(t, float32s, n, func(x []float32) bool {
891 t.Helper()
892 a := archsimd.LoadFloat32x16Slice(x)
893 g := make([]int8, 16)
894 f(a).StoreSlice(g)
895 w := want(x)
896 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
897 })
898 }
899
900
901
902
903 func testFloat64x8ConvertToInt8(t *testing.T, f func(x archsimd.Float64x8) archsimd.Int8x16, want func(x []float64) []int8) {
904 n := 8
905 t.Helper()
906 forSlice(t, float64s, n, func(x []float64) bool {
907 t.Helper()
908 a := archsimd.LoadFloat64x8Slice(x)
909 g := make([]int8, 16)
910 f(a).StoreSlice(g)
911 w := want(x)
912 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
913 })
914 }
915
916
917
918
919 func testInt8x16ConvertToUint8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint8x16, want func(x []int8) []uint8) {
920 n := 16
921 t.Helper()
922 forSlice(t, int8s, n, func(x []int8) bool {
923 t.Helper()
924 a := archsimd.LoadInt8x16Slice(x)
925 g := make([]uint8, 16)
926 f(a).StoreSlice(g)
927 w := want(x)
928 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
929 })
930 }
931
932
933
934
935 func testInt16x8ConvertToUint8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint8x16, want func(x []int16) []uint8) {
936 n := 8
937 t.Helper()
938 forSlice(t, int16s, n, func(x []int16) bool {
939 t.Helper()
940 a := archsimd.LoadInt16x8Slice(x)
941 g := make([]uint8, 16)
942 f(a).StoreSlice(g)
943 w := want(x)
944 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
945 })
946 }
947
948
949
950
951 func testInt32x4ConvertToUint8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint8x16, want func(x []int32) []uint8) {
952 n := 4
953 t.Helper()
954 forSlice(t, int32s, n, func(x []int32) bool {
955 t.Helper()
956 a := archsimd.LoadInt32x4Slice(x)
957 g := make([]uint8, 16)
958 f(a).StoreSlice(g)
959 w := want(x)
960 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
961 })
962 }
963
964
965
966
967 func testInt64x2ConvertToUint8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint8x16, want func(x []int64) []uint8) {
968 n := 2
969 t.Helper()
970 forSlice(t, int64s, n, func(x []int64) bool {
971 t.Helper()
972 a := archsimd.LoadInt64x2Slice(x)
973 g := make([]uint8, 16)
974 f(a).StoreSlice(g)
975 w := want(x)
976 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
977 })
978 }
979
980
981
982
983 func testUint8x16ConvertToUint8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint8x16, want func(x []uint8) []uint8) {
984 n := 16
985 t.Helper()
986 forSlice(t, uint8s, n, func(x []uint8) bool {
987 t.Helper()
988 a := archsimd.LoadUint8x16Slice(x)
989 g := make([]uint8, 16)
990 f(a).StoreSlice(g)
991 w := want(x)
992 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
993 })
994 }
995
996
997
998
999 func testUint16x8ConvertToUint8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint8x16, want func(x []uint16) []uint8) {
1000 n := 8
1001 t.Helper()
1002 forSlice(t, uint16s, n, func(x []uint16) bool {
1003 t.Helper()
1004 a := archsimd.LoadUint16x8Slice(x)
1005 g := make([]uint8, 16)
1006 f(a).StoreSlice(g)
1007 w := want(x)
1008 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1009 })
1010 }
1011
1012
1013
1014
1015 func testUint32x4ConvertToUint8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint8x16, want func(x []uint32) []uint8) {
1016 n := 4
1017 t.Helper()
1018 forSlice(t, uint32s, n, func(x []uint32) bool {
1019 t.Helper()
1020 a := archsimd.LoadUint32x4Slice(x)
1021 g := make([]uint8, 16)
1022 f(a).StoreSlice(g)
1023 w := want(x)
1024 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1025 })
1026 }
1027
1028
1029
1030
1031 func testUint64x2ConvertToUint8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint8x16, want func(x []uint64) []uint8) {
1032 n := 2
1033 t.Helper()
1034 forSlice(t, uint64s, n, func(x []uint64) bool {
1035 t.Helper()
1036 a := archsimd.LoadUint64x2Slice(x)
1037 g := make([]uint8, 16)
1038 f(a).StoreSlice(g)
1039 w := want(x)
1040 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1041 })
1042 }
1043
1044
1045
1046
1047 func testFloat32x4ConvertToUint8(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint8x16, want func(x []float32) []uint8) {
1048 n := 4
1049 t.Helper()
1050 forSlice(t, float32s, n, func(x []float32) bool {
1051 t.Helper()
1052 a := archsimd.LoadFloat32x4Slice(x)
1053 g := make([]uint8, 16)
1054 f(a).StoreSlice(g)
1055 w := want(x)
1056 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1057 })
1058 }
1059
1060
1061
1062
1063 func testFloat64x2ConvertToUint8(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint8x16, want func(x []float64) []uint8) {
1064 n := 2
1065 t.Helper()
1066 forSlice(t, float64s, n, func(x []float64) bool {
1067 t.Helper()
1068 a := archsimd.LoadFloat64x2Slice(x)
1069 g := make([]uint8, 16)
1070 f(a).StoreSlice(g)
1071 w := want(x)
1072 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1073 })
1074 }
1075
1076
1077
1078
1079 func testInt8x32ConvertToUint8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint8x32, want func(x []int8) []uint8) {
1080 n := 32
1081 t.Helper()
1082 forSlice(t, int8s, n, func(x []int8) bool {
1083 t.Helper()
1084 a := archsimd.LoadInt8x32Slice(x)
1085 g := make([]uint8, 32)
1086 f(a).StoreSlice(g)
1087 w := want(x)
1088 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1089 })
1090 }
1091
1092
1093
1094
1095 func testInt16x16ConvertToUint8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint8x16, want func(x []int16) []uint8) {
1096 n := 16
1097 t.Helper()
1098 forSlice(t, int16s, n, func(x []int16) bool {
1099 t.Helper()
1100 a := archsimd.LoadInt16x16Slice(x)
1101 g := make([]uint8, 16)
1102 f(a).StoreSlice(g)
1103 w := want(x)
1104 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1105 })
1106 }
1107
1108
1109
1110
1111 func testInt32x8ConvertToUint8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint8x16, want func(x []int32) []uint8) {
1112 n := 8
1113 t.Helper()
1114 forSlice(t, int32s, n, func(x []int32) bool {
1115 t.Helper()
1116 a := archsimd.LoadInt32x8Slice(x)
1117 g := make([]uint8, 16)
1118 f(a).StoreSlice(g)
1119 w := want(x)
1120 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1121 })
1122 }
1123
1124
1125
1126
1127 func testInt64x4ConvertToUint8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint8x16, want func(x []int64) []uint8) {
1128 n := 4
1129 t.Helper()
1130 forSlice(t, int64s, n, func(x []int64) bool {
1131 t.Helper()
1132 a := archsimd.LoadInt64x4Slice(x)
1133 g := make([]uint8, 16)
1134 f(a).StoreSlice(g)
1135 w := want(x)
1136 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1137 })
1138 }
1139
1140
1141
1142
1143 func testUint8x32ConvertToUint8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint8x32, want func(x []uint8) []uint8) {
1144 n := 32
1145 t.Helper()
1146 forSlice(t, uint8s, n, func(x []uint8) bool {
1147 t.Helper()
1148 a := archsimd.LoadUint8x32Slice(x)
1149 g := make([]uint8, 32)
1150 f(a).StoreSlice(g)
1151 w := want(x)
1152 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1153 })
1154 }
1155
1156
1157
1158
1159 func testUint16x16ConvertToUint8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint8x16, want func(x []uint16) []uint8) {
1160 n := 16
1161 t.Helper()
1162 forSlice(t, uint16s, n, func(x []uint16) bool {
1163 t.Helper()
1164 a := archsimd.LoadUint16x16Slice(x)
1165 g := make([]uint8, 16)
1166 f(a).StoreSlice(g)
1167 w := want(x)
1168 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1169 })
1170 }
1171
1172
1173
1174
1175 func testUint32x8ConvertToUint8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint8x16, want func(x []uint32) []uint8) {
1176 n := 8
1177 t.Helper()
1178 forSlice(t, uint32s, n, func(x []uint32) bool {
1179 t.Helper()
1180 a := archsimd.LoadUint32x8Slice(x)
1181 g := make([]uint8, 16)
1182 f(a).StoreSlice(g)
1183 w := want(x)
1184 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1185 })
1186 }
1187
1188
1189
1190
1191 func testUint64x4ConvertToUint8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint8x16, want func(x []uint64) []uint8) {
1192 n := 4
1193 t.Helper()
1194 forSlice(t, uint64s, n, func(x []uint64) bool {
1195 t.Helper()
1196 a := archsimd.LoadUint64x4Slice(x)
1197 g := make([]uint8, 16)
1198 f(a).StoreSlice(g)
1199 w := want(x)
1200 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1201 })
1202 }
1203
1204
1205
1206
1207 func testFloat32x8ConvertToUint8(t *testing.T, f func(x archsimd.Float32x8) archsimd.Uint8x16, want func(x []float32) []uint8) {
1208 n := 8
1209 t.Helper()
1210 forSlice(t, float32s, n, func(x []float32) bool {
1211 t.Helper()
1212 a := archsimd.LoadFloat32x8Slice(x)
1213 g := make([]uint8, 16)
1214 f(a).StoreSlice(g)
1215 w := want(x)
1216 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1217 })
1218 }
1219
1220
1221
1222
1223 func testFloat64x4ConvertToUint8(t *testing.T, f func(x archsimd.Float64x4) archsimd.Uint8x16, want func(x []float64) []uint8) {
1224 n := 4
1225 t.Helper()
1226 forSlice(t, float64s, n, func(x []float64) bool {
1227 t.Helper()
1228 a := archsimd.LoadFloat64x4Slice(x)
1229 g := make([]uint8, 16)
1230 f(a).StoreSlice(g)
1231 w := want(x)
1232 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1233 })
1234 }
1235
1236
1237
1238
1239 func testInt8x64ConvertToUint8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint8x64, want func(x []int8) []uint8) {
1240 n := 64
1241 t.Helper()
1242 forSlice(t, int8s, n, func(x []int8) bool {
1243 t.Helper()
1244 a := archsimd.LoadInt8x64Slice(x)
1245 g := make([]uint8, 64)
1246 f(a).StoreSlice(g)
1247 w := want(x)
1248 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1249 })
1250 }
1251
1252
1253
1254
1255 func testInt16x32ConvertToUint8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint8x32, want func(x []int16) []uint8) {
1256 n := 32
1257 t.Helper()
1258 forSlice(t, int16s, n, func(x []int16) bool {
1259 t.Helper()
1260 a := archsimd.LoadInt16x32Slice(x)
1261 g := make([]uint8, 32)
1262 f(a).StoreSlice(g)
1263 w := want(x)
1264 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1265 })
1266 }
1267
1268
1269
1270
1271 func testInt32x16ConvertToUint8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint8x16, want func(x []int32) []uint8) {
1272 n := 16
1273 t.Helper()
1274 forSlice(t, int32s, n, func(x []int32) bool {
1275 t.Helper()
1276 a := archsimd.LoadInt32x16Slice(x)
1277 g := make([]uint8, 16)
1278 f(a).StoreSlice(g)
1279 w := want(x)
1280 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1281 })
1282 }
1283
1284
1285
1286
1287 func testInt64x8ConvertToUint8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint8x16, want func(x []int64) []uint8) {
1288 n := 8
1289 t.Helper()
1290 forSlice(t, int64s, n, func(x []int64) bool {
1291 t.Helper()
1292 a := archsimd.LoadInt64x8Slice(x)
1293 g := make([]uint8, 16)
1294 f(a).StoreSlice(g)
1295 w := want(x)
1296 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1297 })
1298 }
1299
1300
1301
1302
1303 func testUint8x64ConvertToUint8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint8x64, want func(x []uint8) []uint8) {
1304 n := 64
1305 t.Helper()
1306 forSlice(t, uint8s, n, func(x []uint8) bool {
1307 t.Helper()
1308 a := archsimd.LoadUint8x64Slice(x)
1309 g := make([]uint8, 64)
1310 f(a).StoreSlice(g)
1311 w := want(x)
1312 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1313 })
1314 }
1315
1316
1317
1318
1319 func testUint16x32ConvertToUint8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint8x32, want func(x []uint16) []uint8) {
1320 n := 32
1321 t.Helper()
1322 forSlice(t, uint16s, n, func(x []uint16) bool {
1323 t.Helper()
1324 a := archsimd.LoadUint16x32Slice(x)
1325 g := make([]uint8, 32)
1326 f(a).StoreSlice(g)
1327 w := want(x)
1328 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1329 })
1330 }
1331
1332
1333
1334
1335 func testUint32x16ConvertToUint8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint8x16, want func(x []uint32) []uint8) {
1336 n := 16
1337 t.Helper()
1338 forSlice(t, uint32s, n, func(x []uint32) bool {
1339 t.Helper()
1340 a := archsimd.LoadUint32x16Slice(x)
1341 g := make([]uint8, 16)
1342 f(a).StoreSlice(g)
1343 w := want(x)
1344 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1345 })
1346 }
1347
1348
1349
1350
1351 func testUint64x8ConvertToUint8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint8x16, want func(x []uint64) []uint8) {
1352 n := 8
1353 t.Helper()
1354 forSlice(t, uint64s, n, func(x []uint64) bool {
1355 t.Helper()
1356 a := archsimd.LoadUint64x8Slice(x)
1357 g := make([]uint8, 16)
1358 f(a).StoreSlice(g)
1359 w := want(x)
1360 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1361 })
1362 }
1363
1364
1365
1366
1367 func testFloat32x16ConvertToUint8(t *testing.T, f func(x archsimd.Float32x16) archsimd.Uint8x16, want func(x []float32) []uint8) {
1368 n := 16
1369 t.Helper()
1370 forSlice(t, float32s, n, func(x []float32) bool {
1371 t.Helper()
1372 a := archsimd.LoadFloat32x16Slice(x)
1373 g := make([]uint8, 16)
1374 f(a).StoreSlice(g)
1375 w := want(x)
1376 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1377 })
1378 }
1379
1380
1381
1382
1383 func testFloat64x8ConvertToUint8(t *testing.T, f func(x archsimd.Float64x8) archsimd.Uint8x16, want func(x []float64) []uint8) {
1384 n := 8
1385 t.Helper()
1386 forSlice(t, float64s, n, func(x []float64) bool {
1387 t.Helper()
1388 a := archsimd.LoadFloat64x8Slice(x)
1389 g := make([]uint8, 16)
1390 f(a).StoreSlice(g)
1391 w := want(x)
1392 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1393 })
1394 }
1395
1396
1397
1398
1399 func testInt8x16ConvertToInt16(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int16x16, want func(x []int8) []int16) {
1400 n := 16
1401 t.Helper()
1402 forSlice(t, int8s, n, func(x []int8) bool {
1403 t.Helper()
1404 a := archsimd.LoadInt8x16Slice(x)
1405 g := make([]int16, 16)
1406 f(a).StoreSlice(g)
1407 w := want(x)
1408 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1409 })
1410 }
1411
1412
1413
1414
1415 func testInt16x8ConvertToInt16(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int16x8, want func(x []int16) []int16) {
1416 n := 8
1417 t.Helper()
1418 forSlice(t, int16s, n, func(x []int16) bool {
1419 t.Helper()
1420 a := archsimd.LoadInt16x8Slice(x)
1421 g := make([]int16, 8)
1422 f(a).StoreSlice(g)
1423 w := want(x)
1424 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1425 })
1426 }
1427
1428
1429
1430
1431 func testInt32x4ConvertToInt16(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int16x8, want func(x []int32) []int16) {
1432 n := 4
1433 t.Helper()
1434 forSlice(t, int32s, n, func(x []int32) bool {
1435 t.Helper()
1436 a := archsimd.LoadInt32x4Slice(x)
1437 g := make([]int16, 8)
1438 f(a).StoreSlice(g)
1439 w := want(x)
1440 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1441 })
1442 }
1443
1444
1445
1446
1447 func testInt64x2ConvertToInt16(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int16x8, want func(x []int64) []int16) {
1448 n := 2
1449 t.Helper()
1450 forSlice(t, int64s, n, func(x []int64) bool {
1451 t.Helper()
1452 a := archsimd.LoadInt64x2Slice(x)
1453 g := make([]int16, 8)
1454 f(a).StoreSlice(g)
1455 w := want(x)
1456 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1457 })
1458 }
1459
1460
1461
1462
1463 func testUint8x16ConvertToInt16(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int16x16, want func(x []uint8) []int16) {
1464 n := 16
1465 t.Helper()
1466 forSlice(t, uint8s, n, func(x []uint8) bool {
1467 t.Helper()
1468 a := archsimd.LoadUint8x16Slice(x)
1469 g := make([]int16, 16)
1470 f(a).StoreSlice(g)
1471 w := want(x)
1472 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1473 })
1474 }
1475
1476
1477
1478
1479 func testUint16x8ConvertToInt16(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int16x8, want func(x []uint16) []int16) {
1480 n := 8
1481 t.Helper()
1482 forSlice(t, uint16s, n, func(x []uint16) bool {
1483 t.Helper()
1484 a := archsimd.LoadUint16x8Slice(x)
1485 g := make([]int16, 8)
1486 f(a).StoreSlice(g)
1487 w := want(x)
1488 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1489 })
1490 }
1491
1492
1493
1494
1495 func testUint32x4ConvertToInt16(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int16x8, want func(x []uint32) []int16) {
1496 n := 4
1497 t.Helper()
1498 forSlice(t, uint32s, n, func(x []uint32) bool {
1499 t.Helper()
1500 a := archsimd.LoadUint32x4Slice(x)
1501 g := make([]int16, 8)
1502 f(a).StoreSlice(g)
1503 w := want(x)
1504 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1505 })
1506 }
1507
1508
1509
1510
1511 func testUint64x2ConvertToInt16(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int16x8, want func(x []uint64) []int16) {
1512 n := 2
1513 t.Helper()
1514 forSlice(t, uint64s, n, func(x []uint64) bool {
1515 t.Helper()
1516 a := archsimd.LoadUint64x2Slice(x)
1517 g := make([]int16, 8)
1518 f(a).StoreSlice(g)
1519 w := want(x)
1520 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1521 })
1522 }
1523
1524
1525
1526
1527 func testFloat32x4ConvertToInt16(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int16x8, want func(x []float32) []int16) {
1528 n := 4
1529 t.Helper()
1530 forSlice(t, float32s, n, func(x []float32) bool {
1531 t.Helper()
1532 a := archsimd.LoadFloat32x4Slice(x)
1533 g := make([]int16, 8)
1534 f(a).StoreSlice(g)
1535 w := want(x)
1536 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1537 })
1538 }
1539
1540
1541
1542
1543 func testFloat64x2ConvertToInt16(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int16x8, want func(x []float64) []int16) {
1544 n := 2
1545 t.Helper()
1546 forSlice(t, float64s, n, func(x []float64) bool {
1547 t.Helper()
1548 a := archsimd.LoadFloat64x2Slice(x)
1549 g := make([]int16, 8)
1550 f(a).StoreSlice(g)
1551 w := want(x)
1552 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1553 })
1554 }
1555
1556
1557
1558
1559 func testInt8x32ConvertToInt16(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int16x32, want func(x []int8) []int16) {
1560 n := 32
1561 t.Helper()
1562 forSlice(t, int8s, n, func(x []int8) bool {
1563 t.Helper()
1564 a := archsimd.LoadInt8x32Slice(x)
1565 g := make([]int16, 32)
1566 f(a).StoreSlice(g)
1567 w := want(x)
1568 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1569 })
1570 }
1571
1572
1573
1574
1575 func testInt16x16ConvertToInt16(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int16x16, want func(x []int16) []int16) {
1576 n := 16
1577 t.Helper()
1578 forSlice(t, int16s, n, func(x []int16) bool {
1579 t.Helper()
1580 a := archsimd.LoadInt16x16Slice(x)
1581 g := make([]int16, 16)
1582 f(a).StoreSlice(g)
1583 w := want(x)
1584 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1585 })
1586 }
1587
1588
1589
1590
1591 func testInt32x8ConvertToInt16(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int16x8, want func(x []int32) []int16) {
1592 n := 8
1593 t.Helper()
1594 forSlice(t, int32s, n, func(x []int32) bool {
1595 t.Helper()
1596 a := archsimd.LoadInt32x8Slice(x)
1597 g := make([]int16, 8)
1598 f(a).StoreSlice(g)
1599 w := want(x)
1600 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1601 })
1602 }
1603
1604
1605
1606
1607 func testInt64x4ConvertToInt16(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int16x8, want func(x []int64) []int16) {
1608 n := 4
1609 t.Helper()
1610 forSlice(t, int64s, n, func(x []int64) bool {
1611 t.Helper()
1612 a := archsimd.LoadInt64x4Slice(x)
1613 g := make([]int16, 8)
1614 f(a).StoreSlice(g)
1615 w := want(x)
1616 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1617 })
1618 }
1619
1620
1621
1622
1623 func testUint8x32ConvertToInt16(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int16x32, want func(x []uint8) []int16) {
1624 n := 32
1625 t.Helper()
1626 forSlice(t, uint8s, n, func(x []uint8) bool {
1627 t.Helper()
1628 a := archsimd.LoadUint8x32Slice(x)
1629 g := make([]int16, 32)
1630 f(a).StoreSlice(g)
1631 w := want(x)
1632 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1633 })
1634 }
1635
1636
1637
1638
1639 func testUint16x16ConvertToInt16(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int16x16, want func(x []uint16) []int16) {
1640 n := 16
1641 t.Helper()
1642 forSlice(t, uint16s, n, func(x []uint16) bool {
1643 t.Helper()
1644 a := archsimd.LoadUint16x16Slice(x)
1645 g := make([]int16, 16)
1646 f(a).StoreSlice(g)
1647 w := want(x)
1648 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1649 })
1650 }
1651
1652
1653
1654
1655 func testUint32x8ConvertToInt16(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int16x8, want func(x []uint32) []int16) {
1656 n := 8
1657 t.Helper()
1658 forSlice(t, uint32s, n, func(x []uint32) bool {
1659 t.Helper()
1660 a := archsimd.LoadUint32x8Slice(x)
1661 g := make([]int16, 8)
1662 f(a).StoreSlice(g)
1663 w := want(x)
1664 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1665 })
1666 }
1667
1668
1669
1670
1671 func testUint64x4ConvertToInt16(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int16x8, want func(x []uint64) []int16) {
1672 n := 4
1673 t.Helper()
1674 forSlice(t, uint64s, n, func(x []uint64) bool {
1675 t.Helper()
1676 a := archsimd.LoadUint64x4Slice(x)
1677 g := make([]int16, 8)
1678 f(a).StoreSlice(g)
1679 w := want(x)
1680 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1681 })
1682 }
1683
1684
1685
1686
1687 func testFloat32x8ConvertToInt16(t *testing.T, f func(x archsimd.Float32x8) archsimd.Int16x8, want func(x []float32) []int16) {
1688 n := 8
1689 t.Helper()
1690 forSlice(t, float32s, n, func(x []float32) bool {
1691 t.Helper()
1692 a := archsimd.LoadFloat32x8Slice(x)
1693 g := make([]int16, 8)
1694 f(a).StoreSlice(g)
1695 w := want(x)
1696 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1697 })
1698 }
1699
1700
1701
1702
1703 func testFloat64x4ConvertToInt16(t *testing.T, f func(x archsimd.Float64x4) archsimd.Int16x8, want func(x []float64) []int16) {
1704 n := 4
1705 t.Helper()
1706 forSlice(t, float64s, n, func(x []float64) bool {
1707 t.Helper()
1708 a := archsimd.LoadFloat64x4Slice(x)
1709 g := make([]int16, 8)
1710 f(a).StoreSlice(g)
1711 w := want(x)
1712 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1713 })
1714 }
1715
1716
1717
1718
1719 func testInt8x64ConvertToInt16(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int16x32, want func(x []int8) []int16) {
1720 n := 64
1721 t.Helper()
1722 forSlice(t, int8s, n, func(x []int8) bool {
1723 t.Helper()
1724 a := archsimd.LoadInt8x64Slice(x)
1725 g := make([]int16, 32)
1726 f(a).StoreSlice(g)
1727 w := want(x)
1728 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1729 })
1730 }
1731
1732
1733
1734
1735 func testInt16x32ConvertToInt16(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int16x32, want func(x []int16) []int16) {
1736 n := 32
1737 t.Helper()
1738 forSlice(t, int16s, n, func(x []int16) bool {
1739 t.Helper()
1740 a := archsimd.LoadInt16x32Slice(x)
1741 g := make([]int16, 32)
1742 f(a).StoreSlice(g)
1743 w := want(x)
1744 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1745 })
1746 }
1747
1748
1749
1750
1751 func testInt32x16ConvertToInt16(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int16x16, want func(x []int32) []int16) {
1752 n := 16
1753 t.Helper()
1754 forSlice(t, int32s, n, func(x []int32) bool {
1755 t.Helper()
1756 a := archsimd.LoadInt32x16Slice(x)
1757 g := make([]int16, 16)
1758 f(a).StoreSlice(g)
1759 w := want(x)
1760 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1761 })
1762 }
1763
1764
1765
1766
1767 func testInt64x8ConvertToInt16(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int16x8, want func(x []int64) []int16) {
1768 n := 8
1769 t.Helper()
1770 forSlice(t, int64s, n, func(x []int64) bool {
1771 t.Helper()
1772 a := archsimd.LoadInt64x8Slice(x)
1773 g := make([]int16, 8)
1774 f(a).StoreSlice(g)
1775 w := want(x)
1776 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1777 })
1778 }
1779
1780
1781
1782
1783 func testUint8x64ConvertToInt16(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int16x32, want func(x []uint8) []int16) {
1784 n := 64
1785 t.Helper()
1786 forSlice(t, uint8s, n, func(x []uint8) bool {
1787 t.Helper()
1788 a := archsimd.LoadUint8x64Slice(x)
1789 g := make([]int16, 32)
1790 f(a).StoreSlice(g)
1791 w := want(x)
1792 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1793 })
1794 }
1795
1796
1797
1798
1799 func testUint16x32ConvertToInt16(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int16x32, want func(x []uint16) []int16) {
1800 n := 32
1801 t.Helper()
1802 forSlice(t, uint16s, n, func(x []uint16) bool {
1803 t.Helper()
1804 a := archsimd.LoadUint16x32Slice(x)
1805 g := make([]int16, 32)
1806 f(a).StoreSlice(g)
1807 w := want(x)
1808 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1809 })
1810 }
1811
1812
1813
1814
1815 func testUint32x16ConvertToInt16(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int16x16, want func(x []uint32) []int16) {
1816 n := 16
1817 t.Helper()
1818 forSlice(t, uint32s, n, func(x []uint32) bool {
1819 t.Helper()
1820 a := archsimd.LoadUint32x16Slice(x)
1821 g := make([]int16, 16)
1822 f(a).StoreSlice(g)
1823 w := want(x)
1824 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1825 })
1826 }
1827
1828
1829
1830
1831 func testUint64x8ConvertToInt16(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int16x8, want func(x []uint64) []int16) {
1832 n := 8
1833 t.Helper()
1834 forSlice(t, uint64s, n, func(x []uint64) bool {
1835 t.Helper()
1836 a := archsimd.LoadUint64x8Slice(x)
1837 g := make([]int16, 8)
1838 f(a).StoreSlice(g)
1839 w := want(x)
1840 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1841 })
1842 }
1843
1844
1845
1846
1847 func testFloat32x16ConvertToInt16(t *testing.T, f func(x archsimd.Float32x16) archsimd.Int16x16, want func(x []float32) []int16) {
1848 n := 16
1849 t.Helper()
1850 forSlice(t, float32s, n, func(x []float32) bool {
1851 t.Helper()
1852 a := archsimd.LoadFloat32x16Slice(x)
1853 g := make([]int16, 16)
1854 f(a).StoreSlice(g)
1855 w := want(x)
1856 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1857 })
1858 }
1859
1860
1861
1862
1863 func testFloat64x8ConvertToInt16(t *testing.T, f func(x archsimd.Float64x8) archsimd.Int16x8, want func(x []float64) []int16) {
1864 n := 8
1865 t.Helper()
1866 forSlice(t, float64s, n, func(x []float64) bool {
1867 t.Helper()
1868 a := archsimd.LoadFloat64x8Slice(x)
1869 g := make([]int16, 8)
1870 f(a).StoreSlice(g)
1871 w := want(x)
1872 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1873 })
1874 }
1875
1876
1877
1878
1879 func testInt8x16ConvertToUint16(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint16x16, want func(x []int8) []uint16) {
1880 n := 16
1881 t.Helper()
1882 forSlice(t, int8s, n, func(x []int8) bool {
1883 t.Helper()
1884 a := archsimd.LoadInt8x16Slice(x)
1885 g := make([]uint16, 16)
1886 f(a).StoreSlice(g)
1887 w := want(x)
1888 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1889 })
1890 }
1891
1892
1893
1894
1895 func testInt16x8ConvertToUint16(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint16x8, want func(x []int16) []uint16) {
1896 n := 8
1897 t.Helper()
1898 forSlice(t, int16s, n, func(x []int16) bool {
1899 t.Helper()
1900 a := archsimd.LoadInt16x8Slice(x)
1901 g := make([]uint16, 8)
1902 f(a).StoreSlice(g)
1903 w := want(x)
1904 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1905 })
1906 }
1907
1908
1909
1910
1911 func testInt32x4ConvertToUint16(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint16x8, want func(x []int32) []uint16) {
1912 n := 4
1913 t.Helper()
1914 forSlice(t, int32s, n, func(x []int32) bool {
1915 t.Helper()
1916 a := archsimd.LoadInt32x4Slice(x)
1917 g := make([]uint16, 8)
1918 f(a).StoreSlice(g)
1919 w := want(x)
1920 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1921 })
1922 }
1923
1924
1925
1926
1927 func testInt64x2ConvertToUint16(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint16x8, want func(x []int64) []uint16) {
1928 n := 2
1929 t.Helper()
1930 forSlice(t, int64s, n, func(x []int64) bool {
1931 t.Helper()
1932 a := archsimd.LoadInt64x2Slice(x)
1933 g := make([]uint16, 8)
1934 f(a).StoreSlice(g)
1935 w := want(x)
1936 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1937 })
1938 }
1939
1940
1941
1942
1943 func testUint8x16ConvertToUint16(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint16x16, want func(x []uint8) []uint16) {
1944 n := 16
1945 t.Helper()
1946 forSlice(t, uint8s, n, func(x []uint8) bool {
1947 t.Helper()
1948 a := archsimd.LoadUint8x16Slice(x)
1949 g := make([]uint16, 16)
1950 f(a).StoreSlice(g)
1951 w := want(x)
1952 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1953 })
1954 }
1955
1956
1957
1958
1959 func testUint16x8ConvertToUint16(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint16x8, want func(x []uint16) []uint16) {
1960 n := 8
1961 t.Helper()
1962 forSlice(t, uint16s, n, func(x []uint16) bool {
1963 t.Helper()
1964 a := archsimd.LoadUint16x8Slice(x)
1965 g := make([]uint16, 8)
1966 f(a).StoreSlice(g)
1967 w := want(x)
1968 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1969 })
1970 }
1971
1972
1973
1974
1975 func testUint32x4ConvertToUint16(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint16x8, want func(x []uint32) []uint16) {
1976 n := 4
1977 t.Helper()
1978 forSlice(t, uint32s, n, func(x []uint32) bool {
1979 t.Helper()
1980 a := archsimd.LoadUint32x4Slice(x)
1981 g := make([]uint16, 8)
1982 f(a).StoreSlice(g)
1983 w := want(x)
1984 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
1985 })
1986 }
1987
1988
1989
1990
1991 func testUint64x2ConvertToUint16(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint16x8, want func(x []uint64) []uint16) {
1992 n := 2
1993 t.Helper()
1994 forSlice(t, uint64s, n, func(x []uint64) bool {
1995 t.Helper()
1996 a := archsimd.LoadUint64x2Slice(x)
1997 g := make([]uint16, 8)
1998 f(a).StoreSlice(g)
1999 w := want(x)
2000 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2001 })
2002 }
2003
2004
2005
2006
2007 func testFloat32x4ConvertToUint16(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint16x8, want func(x []float32) []uint16) {
2008 n := 4
2009 t.Helper()
2010 forSlice(t, float32s, n, func(x []float32) bool {
2011 t.Helper()
2012 a := archsimd.LoadFloat32x4Slice(x)
2013 g := make([]uint16, 8)
2014 f(a).StoreSlice(g)
2015 w := want(x)
2016 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2017 })
2018 }
2019
2020
2021
2022
2023 func testFloat64x2ConvertToUint16(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint16x8, want func(x []float64) []uint16) {
2024 n := 2
2025 t.Helper()
2026 forSlice(t, float64s, n, func(x []float64) bool {
2027 t.Helper()
2028 a := archsimd.LoadFloat64x2Slice(x)
2029 g := make([]uint16, 8)
2030 f(a).StoreSlice(g)
2031 w := want(x)
2032 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2033 })
2034 }
2035
2036
2037
2038
2039 func testInt8x32ConvertToUint16(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint16x32, want func(x []int8) []uint16) {
2040 n := 32
2041 t.Helper()
2042 forSlice(t, int8s, n, func(x []int8) bool {
2043 t.Helper()
2044 a := archsimd.LoadInt8x32Slice(x)
2045 g := make([]uint16, 32)
2046 f(a).StoreSlice(g)
2047 w := want(x)
2048 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2049 })
2050 }
2051
2052
2053
2054
2055 func testInt16x16ConvertToUint16(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint16x16, want func(x []int16) []uint16) {
2056 n := 16
2057 t.Helper()
2058 forSlice(t, int16s, n, func(x []int16) bool {
2059 t.Helper()
2060 a := archsimd.LoadInt16x16Slice(x)
2061 g := make([]uint16, 16)
2062 f(a).StoreSlice(g)
2063 w := want(x)
2064 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2065 })
2066 }
2067
2068
2069
2070
2071 func testInt32x8ConvertToUint16(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint16x8, want func(x []int32) []uint16) {
2072 n := 8
2073 t.Helper()
2074 forSlice(t, int32s, n, func(x []int32) bool {
2075 t.Helper()
2076 a := archsimd.LoadInt32x8Slice(x)
2077 g := make([]uint16, 8)
2078 f(a).StoreSlice(g)
2079 w := want(x)
2080 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2081 })
2082 }
2083
2084
2085
2086
2087 func testInt64x4ConvertToUint16(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint16x8, want func(x []int64) []uint16) {
2088 n := 4
2089 t.Helper()
2090 forSlice(t, int64s, n, func(x []int64) bool {
2091 t.Helper()
2092 a := archsimd.LoadInt64x4Slice(x)
2093 g := make([]uint16, 8)
2094 f(a).StoreSlice(g)
2095 w := want(x)
2096 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2097 })
2098 }
2099
2100
2101
2102
2103 func testUint8x32ConvertToUint16(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint16x32, want func(x []uint8) []uint16) {
2104 n := 32
2105 t.Helper()
2106 forSlice(t, uint8s, n, func(x []uint8) bool {
2107 t.Helper()
2108 a := archsimd.LoadUint8x32Slice(x)
2109 g := make([]uint16, 32)
2110 f(a).StoreSlice(g)
2111 w := want(x)
2112 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2113 })
2114 }
2115
2116
2117
2118
2119 func testUint16x16ConvertToUint16(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint16x16, want func(x []uint16) []uint16) {
2120 n := 16
2121 t.Helper()
2122 forSlice(t, uint16s, n, func(x []uint16) bool {
2123 t.Helper()
2124 a := archsimd.LoadUint16x16Slice(x)
2125 g := make([]uint16, 16)
2126 f(a).StoreSlice(g)
2127 w := want(x)
2128 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2129 })
2130 }
2131
2132
2133
2134
2135 func testUint32x8ConvertToUint16(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint16x8, want func(x []uint32) []uint16) {
2136 n := 8
2137 t.Helper()
2138 forSlice(t, uint32s, n, func(x []uint32) bool {
2139 t.Helper()
2140 a := archsimd.LoadUint32x8Slice(x)
2141 g := make([]uint16, 8)
2142 f(a).StoreSlice(g)
2143 w := want(x)
2144 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2145 })
2146 }
2147
2148
2149
2150
2151 func testUint64x4ConvertToUint16(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint16x8, want func(x []uint64) []uint16) {
2152 n := 4
2153 t.Helper()
2154 forSlice(t, uint64s, n, func(x []uint64) bool {
2155 t.Helper()
2156 a := archsimd.LoadUint64x4Slice(x)
2157 g := make([]uint16, 8)
2158 f(a).StoreSlice(g)
2159 w := want(x)
2160 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2161 })
2162 }
2163
2164
2165
2166
2167 func testFloat32x8ConvertToUint16(t *testing.T, f func(x archsimd.Float32x8) archsimd.Uint16x8, want func(x []float32) []uint16) {
2168 n := 8
2169 t.Helper()
2170 forSlice(t, float32s, n, func(x []float32) bool {
2171 t.Helper()
2172 a := archsimd.LoadFloat32x8Slice(x)
2173 g := make([]uint16, 8)
2174 f(a).StoreSlice(g)
2175 w := want(x)
2176 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2177 })
2178 }
2179
2180
2181
2182
2183 func testFloat64x4ConvertToUint16(t *testing.T, f func(x archsimd.Float64x4) archsimd.Uint16x8, want func(x []float64) []uint16) {
2184 n := 4
2185 t.Helper()
2186 forSlice(t, float64s, n, func(x []float64) bool {
2187 t.Helper()
2188 a := archsimd.LoadFloat64x4Slice(x)
2189 g := make([]uint16, 8)
2190 f(a).StoreSlice(g)
2191 w := want(x)
2192 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2193 })
2194 }
2195
2196
2197
2198
2199 func testInt8x64ConvertToUint16(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint16x32, want func(x []int8) []uint16) {
2200 n := 64
2201 t.Helper()
2202 forSlice(t, int8s, n, func(x []int8) bool {
2203 t.Helper()
2204 a := archsimd.LoadInt8x64Slice(x)
2205 g := make([]uint16, 32)
2206 f(a).StoreSlice(g)
2207 w := want(x)
2208 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2209 })
2210 }
2211
2212
2213
2214
2215 func testInt16x32ConvertToUint16(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint16x32, want func(x []int16) []uint16) {
2216 n := 32
2217 t.Helper()
2218 forSlice(t, int16s, n, func(x []int16) bool {
2219 t.Helper()
2220 a := archsimd.LoadInt16x32Slice(x)
2221 g := make([]uint16, 32)
2222 f(a).StoreSlice(g)
2223 w := want(x)
2224 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2225 })
2226 }
2227
2228
2229
2230
2231 func testInt32x16ConvertToUint16(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint16x16, want func(x []int32) []uint16) {
2232 n := 16
2233 t.Helper()
2234 forSlice(t, int32s, n, func(x []int32) bool {
2235 t.Helper()
2236 a := archsimd.LoadInt32x16Slice(x)
2237 g := make([]uint16, 16)
2238 f(a).StoreSlice(g)
2239 w := want(x)
2240 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2241 })
2242 }
2243
2244
2245
2246
2247 func testInt64x8ConvertToUint16(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint16x8, want func(x []int64) []uint16) {
2248 n := 8
2249 t.Helper()
2250 forSlice(t, int64s, n, func(x []int64) bool {
2251 t.Helper()
2252 a := archsimd.LoadInt64x8Slice(x)
2253 g := make([]uint16, 8)
2254 f(a).StoreSlice(g)
2255 w := want(x)
2256 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2257 })
2258 }
2259
2260
2261
2262
2263 func testUint8x64ConvertToUint16(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint16x32, want func(x []uint8) []uint16) {
2264 n := 64
2265 t.Helper()
2266 forSlice(t, uint8s, n, func(x []uint8) bool {
2267 t.Helper()
2268 a := archsimd.LoadUint8x64Slice(x)
2269 g := make([]uint16, 32)
2270 f(a).StoreSlice(g)
2271 w := want(x)
2272 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2273 })
2274 }
2275
2276
2277
2278
2279 func testUint16x32ConvertToUint16(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint16x32, want func(x []uint16) []uint16) {
2280 n := 32
2281 t.Helper()
2282 forSlice(t, uint16s, n, func(x []uint16) bool {
2283 t.Helper()
2284 a := archsimd.LoadUint16x32Slice(x)
2285 g := make([]uint16, 32)
2286 f(a).StoreSlice(g)
2287 w := want(x)
2288 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2289 })
2290 }
2291
2292
2293
2294
2295 func testUint32x16ConvertToUint16(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint16x16, want func(x []uint32) []uint16) {
2296 n := 16
2297 t.Helper()
2298 forSlice(t, uint32s, n, func(x []uint32) bool {
2299 t.Helper()
2300 a := archsimd.LoadUint32x16Slice(x)
2301 g := make([]uint16, 16)
2302 f(a).StoreSlice(g)
2303 w := want(x)
2304 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2305 })
2306 }
2307
2308
2309
2310
2311 func testUint64x8ConvertToUint16(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint16x8, want func(x []uint64) []uint16) {
2312 n := 8
2313 t.Helper()
2314 forSlice(t, uint64s, n, func(x []uint64) bool {
2315 t.Helper()
2316 a := archsimd.LoadUint64x8Slice(x)
2317 g := make([]uint16, 8)
2318 f(a).StoreSlice(g)
2319 w := want(x)
2320 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2321 })
2322 }
2323
2324
2325
2326
2327 func testFloat32x16ConvertToUint16(t *testing.T, f func(x archsimd.Float32x16) archsimd.Uint16x16, want func(x []float32) []uint16) {
2328 n := 16
2329 t.Helper()
2330 forSlice(t, float32s, n, func(x []float32) bool {
2331 t.Helper()
2332 a := archsimd.LoadFloat32x16Slice(x)
2333 g := make([]uint16, 16)
2334 f(a).StoreSlice(g)
2335 w := want(x)
2336 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2337 })
2338 }
2339
2340
2341
2342
2343 func testFloat64x8ConvertToUint16(t *testing.T, f func(x archsimd.Float64x8) archsimd.Uint16x8, want func(x []float64) []uint16) {
2344 n := 8
2345 t.Helper()
2346 forSlice(t, float64s, n, func(x []float64) bool {
2347 t.Helper()
2348 a := archsimd.LoadFloat64x8Slice(x)
2349 g := make([]uint16, 8)
2350 f(a).StoreSlice(g)
2351 w := want(x)
2352 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2353 })
2354 }
2355
2356
2357
2358
2359 func testInt8x16ConvertToInt32(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int32x16, want func(x []int8) []int32) {
2360 n := 16
2361 t.Helper()
2362 forSlice(t, int8s, n, func(x []int8) bool {
2363 t.Helper()
2364 a := archsimd.LoadInt8x16Slice(x)
2365 g := make([]int32, 16)
2366 f(a).StoreSlice(g)
2367 w := want(x)
2368 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2369 })
2370 }
2371
2372
2373
2374
2375 func testInt16x8ConvertToInt32(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int32x8, want func(x []int16) []int32) {
2376 n := 8
2377 t.Helper()
2378 forSlice(t, int16s, n, func(x []int16) bool {
2379 t.Helper()
2380 a := archsimd.LoadInt16x8Slice(x)
2381 g := make([]int32, 8)
2382 f(a).StoreSlice(g)
2383 w := want(x)
2384 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2385 })
2386 }
2387
2388
2389
2390
2391 func testInt32x4ConvertToInt32(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int32x4, want func(x []int32) []int32) {
2392 n := 4
2393 t.Helper()
2394 forSlice(t, int32s, n, func(x []int32) bool {
2395 t.Helper()
2396 a := archsimd.LoadInt32x4Slice(x)
2397 g := make([]int32, 4)
2398 f(a).StoreSlice(g)
2399 w := want(x)
2400 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2401 })
2402 }
2403
2404
2405
2406
2407 func testInt64x2ConvertToInt32(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int32x4, want func(x []int64) []int32) {
2408 n := 2
2409 t.Helper()
2410 forSlice(t, int64s, n, func(x []int64) bool {
2411 t.Helper()
2412 a := archsimd.LoadInt64x2Slice(x)
2413 g := make([]int32, 4)
2414 f(a).StoreSlice(g)
2415 w := want(x)
2416 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2417 })
2418 }
2419
2420
2421
2422
2423 func testUint8x16ConvertToInt32(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int32x16, want func(x []uint8) []int32) {
2424 n := 16
2425 t.Helper()
2426 forSlice(t, uint8s, n, func(x []uint8) bool {
2427 t.Helper()
2428 a := archsimd.LoadUint8x16Slice(x)
2429 g := make([]int32, 16)
2430 f(a).StoreSlice(g)
2431 w := want(x)
2432 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2433 })
2434 }
2435
2436
2437
2438
2439 func testUint16x8ConvertToInt32(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int32x8, want func(x []uint16) []int32) {
2440 n := 8
2441 t.Helper()
2442 forSlice(t, uint16s, n, func(x []uint16) bool {
2443 t.Helper()
2444 a := archsimd.LoadUint16x8Slice(x)
2445 g := make([]int32, 8)
2446 f(a).StoreSlice(g)
2447 w := want(x)
2448 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2449 })
2450 }
2451
2452
2453
2454
2455 func testUint32x4ConvertToInt32(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int32x4, want func(x []uint32) []int32) {
2456 n := 4
2457 t.Helper()
2458 forSlice(t, uint32s, n, func(x []uint32) bool {
2459 t.Helper()
2460 a := archsimd.LoadUint32x4Slice(x)
2461 g := make([]int32, 4)
2462 f(a).StoreSlice(g)
2463 w := want(x)
2464 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2465 })
2466 }
2467
2468
2469
2470
2471 func testUint64x2ConvertToInt32(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int32x4, want func(x []uint64) []int32) {
2472 n := 2
2473 t.Helper()
2474 forSlice(t, uint64s, n, func(x []uint64) bool {
2475 t.Helper()
2476 a := archsimd.LoadUint64x2Slice(x)
2477 g := make([]int32, 4)
2478 f(a).StoreSlice(g)
2479 w := want(x)
2480 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2481 })
2482 }
2483
2484
2485
2486
2487 func testFloat32x4ConvertToInt32(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int32x4, want func(x []float32) []int32) {
2488 n := 4
2489 t.Helper()
2490 forSlice(t, float32s, n, func(x []float32) bool {
2491 t.Helper()
2492 a := archsimd.LoadFloat32x4Slice(x)
2493 g := make([]int32, 4)
2494 f(a).StoreSlice(g)
2495 w := want(x)
2496 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2497 })
2498 }
2499
2500
2501
2502
2503 func testFloat64x2ConvertToInt32(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int32x4, want func(x []float64) []int32) {
2504 n := 2
2505 t.Helper()
2506 forSlice(t, float64s, n, func(x []float64) bool {
2507 t.Helper()
2508 a := archsimd.LoadFloat64x2Slice(x)
2509 g := make([]int32, 4)
2510 f(a).StoreSlice(g)
2511 w := want(x)
2512 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2513 })
2514 }
2515
2516
2517
2518
2519 func testInt8x32ConvertToInt32(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int32x16, want func(x []int8) []int32) {
2520 n := 32
2521 t.Helper()
2522 forSlice(t, int8s, n, func(x []int8) bool {
2523 t.Helper()
2524 a := archsimd.LoadInt8x32Slice(x)
2525 g := make([]int32, 16)
2526 f(a).StoreSlice(g)
2527 w := want(x)
2528 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2529 })
2530 }
2531
2532
2533
2534
2535 func testInt16x16ConvertToInt32(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int32x16, want func(x []int16) []int32) {
2536 n := 16
2537 t.Helper()
2538 forSlice(t, int16s, n, func(x []int16) bool {
2539 t.Helper()
2540 a := archsimd.LoadInt16x16Slice(x)
2541 g := make([]int32, 16)
2542 f(a).StoreSlice(g)
2543 w := want(x)
2544 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2545 })
2546 }
2547
2548
2549
2550
2551 func testInt32x8ConvertToInt32(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int32x8, want func(x []int32) []int32) {
2552 n := 8
2553 t.Helper()
2554 forSlice(t, int32s, n, func(x []int32) bool {
2555 t.Helper()
2556 a := archsimd.LoadInt32x8Slice(x)
2557 g := make([]int32, 8)
2558 f(a).StoreSlice(g)
2559 w := want(x)
2560 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2561 })
2562 }
2563
2564
2565
2566
2567 func testInt64x4ConvertToInt32(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int32x4, want func(x []int64) []int32) {
2568 n := 4
2569 t.Helper()
2570 forSlice(t, int64s, n, func(x []int64) bool {
2571 t.Helper()
2572 a := archsimd.LoadInt64x4Slice(x)
2573 g := make([]int32, 4)
2574 f(a).StoreSlice(g)
2575 w := want(x)
2576 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2577 })
2578 }
2579
2580
2581
2582
2583 func testUint8x32ConvertToInt32(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int32x16, want func(x []uint8) []int32) {
2584 n := 32
2585 t.Helper()
2586 forSlice(t, uint8s, n, func(x []uint8) bool {
2587 t.Helper()
2588 a := archsimd.LoadUint8x32Slice(x)
2589 g := make([]int32, 16)
2590 f(a).StoreSlice(g)
2591 w := want(x)
2592 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2593 })
2594 }
2595
2596
2597
2598
2599 func testUint16x16ConvertToInt32(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int32x16, want func(x []uint16) []int32) {
2600 n := 16
2601 t.Helper()
2602 forSlice(t, uint16s, n, func(x []uint16) bool {
2603 t.Helper()
2604 a := archsimd.LoadUint16x16Slice(x)
2605 g := make([]int32, 16)
2606 f(a).StoreSlice(g)
2607 w := want(x)
2608 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2609 })
2610 }
2611
2612
2613
2614
2615 func testUint32x8ConvertToInt32(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int32x8, want func(x []uint32) []int32) {
2616 n := 8
2617 t.Helper()
2618 forSlice(t, uint32s, n, func(x []uint32) bool {
2619 t.Helper()
2620 a := archsimd.LoadUint32x8Slice(x)
2621 g := make([]int32, 8)
2622 f(a).StoreSlice(g)
2623 w := want(x)
2624 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2625 })
2626 }
2627
2628
2629
2630
2631 func testUint64x4ConvertToInt32(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int32x4, want func(x []uint64) []int32) {
2632 n := 4
2633 t.Helper()
2634 forSlice(t, uint64s, n, func(x []uint64) bool {
2635 t.Helper()
2636 a := archsimd.LoadUint64x4Slice(x)
2637 g := make([]int32, 4)
2638 f(a).StoreSlice(g)
2639 w := want(x)
2640 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2641 })
2642 }
2643
2644
2645
2646
2647 func testFloat32x8ConvertToInt32(t *testing.T, f func(x archsimd.Float32x8) archsimd.Int32x8, want func(x []float32) []int32) {
2648 n := 8
2649 t.Helper()
2650 forSlice(t, float32s, n, func(x []float32) bool {
2651 t.Helper()
2652 a := archsimd.LoadFloat32x8Slice(x)
2653 g := make([]int32, 8)
2654 f(a).StoreSlice(g)
2655 w := want(x)
2656 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2657 })
2658 }
2659
2660
2661
2662
2663 func testFloat64x4ConvertToInt32(t *testing.T, f func(x archsimd.Float64x4) archsimd.Int32x4, want func(x []float64) []int32) {
2664 n := 4
2665 t.Helper()
2666 forSlice(t, float64s, n, func(x []float64) bool {
2667 t.Helper()
2668 a := archsimd.LoadFloat64x4Slice(x)
2669 g := make([]int32, 4)
2670 f(a).StoreSlice(g)
2671 w := want(x)
2672 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2673 })
2674 }
2675
2676
2677
2678
2679 func testInt8x64ConvertToInt32(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int32x16, want func(x []int8) []int32) {
2680 n := 64
2681 t.Helper()
2682 forSlice(t, int8s, n, func(x []int8) bool {
2683 t.Helper()
2684 a := archsimd.LoadInt8x64Slice(x)
2685 g := make([]int32, 16)
2686 f(a).StoreSlice(g)
2687 w := want(x)
2688 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2689 })
2690 }
2691
2692
2693
2694
2695 func testInt16x32ConvertToInt32(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int32x16, want func(x []int16) []int32) {
2696 n := 32
2697 t.Helper()
2698 forSlice(t, int16s, n, func(x []int16) bool {
2699 t.Helper()
2700 a := archsimd.LoadInt16x32Slice(x)
2701 g := make([]int32, 16)
2702 f(a).StoreSlice(g)
2703 w := want(x)
2704 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2705 })
2706 }
2707
2708
2709
2710
2711 func testInt32x16ConvertToInt32(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int32x16, want func(x []int32) []int32) {
2712 n := 16
2713 t.Helper()
2714 forSlice(t, int32s, n, func(x []int32) bool {
2715 t.Helper()
2716 a := archsimd.LoadInt32x16Slice(x)
2717 g := make([]int32, 16)
2718 f(a).StoreSlice(g)
2719 w := want(x)
2720 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2721 })
2722 }
2723
2724
2725
2726
2727 func testInt64x8ConvertToInt32(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int32x8, want func(x []int64) []int32) {
2728 n := 8
2729 t.Helper()
2730 forSlice(t, int64s, n, func(x []int64) bool {
2731 t.Helper()
2732 a := archsimd.LoadInt64x8Slice(x)
2733 g := make([]int32, 8)
2734 f(a).StoreSlice(g)
2735 w := want(x)
2736 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2737 })
2738 }
2739
2740
2741
2742
2743 func testUint8x64ConvertToInt32(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int32x16, want func(x []uint8) []int32) {
2744 n := 64
2745 t.Helper()
2746 forSlice(t, uint8s, n, func(x []uint8) bool {
2747 t.Helper()
2748 a := archsimd.LoadUint8x64Slice(x)
2749 g := make([]int32, 16)
2750 f(a).StoreSlice(g)
2751 w := want(x)
2752 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2753 })
2754 }
2755
2756
2757
2758
2759 func testUint16x32ConvertToInt32(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int32x16, want func(x []uint16) []int32) {
2760 n := 32
2761 t.Helper()
2762 forSlice(t, uint16s, n, func(x []uint16) bool {
2763 t.Helper()
2764 a := archsimd.LoadUint16x32Slice(x)
2765 g := make([]int32, 16)
2766 f(a).StoreSlice(g)
2767 w := want(x)
2768 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2769 })
2770 }
2771
2772
2773
2774
2775 func testUint32x16ConvertToInt32(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int32x16, want func(x []uint32) []int32) {
2776 n := 16
2777 t.Helper()
2778 forSlice(t, uint32s, n, func(x []uint32) bool {
2779 t.Helper()
2780 a := archsimd.LoadUint32x16Slice(x)
2781 g := make([]int32, 16)
2782 f(a).StoreSlice(g)
2783 w := want(x)
2784 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2785 })
2786 }
2787
2788
2789
2790
2791 func testUint64x8ConvertToInt32(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int32x8, want func(x []uint64) []int32) {
2792 n := 8
2793 t.Helper()
2794 forSlice(t, uint64s, n, func(x []uint64) bool {
2795 t.Helper()
2796 a := archsimd.LoadUint64x8Slice(x)
2797 g := make([]int32, 8)
2798 f(a).StoreSlice(g)
2799 w := want(x)
2800 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2801 })
2802 }
2803
2804
2805
2806
2807 func testFloat32x16ConvertToInt32(t *testing.T, f func(x archsimd.Float32x16) archsimd.Int32x16, want func(x []float32) []int32) {
2808 n := 16
2809 t.Helper()
2810 forSlice(t, float32s, n, func(x []float32) bool {
2811 t.Helper()
2812 a := archsimd.LoadFloat32x16Slice(x)
2813 g := make([]int32, 16)
2814 f(a).StoreSlice(g)
2815 w := want(x)
2816 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2817 })
2818 }
2819
2820
2821
2822
2823 func testFloat64x8ConvertToInt32(t *testing.T, f func(x archsimd.Float64x8) archsimd.Int32x8, want func(x []float64) []int32) {
2824 n := 8
2825 t.Helper()
2826 forSlice(t, float64s, n, func(x []float64) bool {
2827 t.Helper()
2828 a := archsimd.LoadFloat64x8Slice(x)
2829 g := make([]int32, 8)
2830 f(a).StoreSlice(g)
2831 w := want(x)
2832 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2833 })
2834 }
2835
2836
2837
2838
2839 func testInt8x16ConvertToUint32(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint32x16, want func(x []int8) []uint32) {
2840 n := 16
2841 t.Helper()
2842 forSlice(t, int8s, n, func(x []int8) bool {
2843 t.Helper()
2844 a := archsimd.LoadInt8x16Slice(x)
2845 g := make([]uint32, 16)
2846 f(a).StoreSlice(g)
2847 w := want(x)
2848 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2849 })
2850 }
2851
2852
2853
2854
2855 func testInt16x8ConvertToUint32(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint32x8, want func(x []int16) []uint32) {
2856 n := 8
2857 t.Helper()
2858 forSlice(t, int16s, n, func(x []int16) bool {
2859 t.Helper()
2860 a := archsimd.LoadInt16x8Slice(x)
2861 g := make([]uint32, 8)
2862 f(a).StoreSlice(g)
2863 w := want(x)
2864 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2865 })
2866 }
2867
2868
2869
2870
2871 func testInt32x4ConvertToUint32(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint32x4, want func(x []int32) []uint32) {
2872 n := 4
2873 t.Helper()
2874 forSlice(t, int32s, n, func(x []int32) bool {
2875 t.Helper()
2876 a := archsimd.LoadInt32x4Slice(x)
2877 g := make([]uint32, 4)
2878 f(a).StoreSlice(g)
2879 w := want(x)
2880 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2881 })
2882 }
2883
2884
2885
2886
2887 func testInt64x2ConvertToUint32(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint32x4, want func(x []int64) []uint32) {
2888 n := 2
2889 t.Helper()
2890 forSlice(t, int64s, n, func(x []int64) bool {
2891 t.Helper()
2892 a := archsimd.LoadInt64x2Slice(x)
2893 g := make([]uint32, 4)
2894 f(a).StoreSlice(g)
2895 w := want(x)
2896 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2897 })
2898 }
2899
2900
2901
2902
2903 func testUint8x16ConvertToUint32(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint32x16, want func(x []uint8) []uint32) {
2904 n := 16
2905 t.Helper()
2906 forSlice(t, uint8s, n, func(x []uint8) bool {
2907 t.Helper()
2908 a := archsimd.LoadUint8x16Slice(x)
2909 g := make([]uint32, 16)
2910 f(a).StoreSlice(g)
2911 w := want(x)
2912 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2913 })
2914 }
2915
2916
2917
2918
2919 func testUint16x8ConvertToUint32(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint32x8, want func(x []uint16) []uint32) {
2920 n := 8
2921 t.Helper()
2922 forSlice(t, uint16s, n, func(x []uint16) bool {
2923 t.Helper()
2924 a := archsimd.LoadUint16x8Slice(x)
2925 g := make([]uint32, 8)
2926 f(a).StoreSlice(g)
2927 w := want(x)
2928 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2929 })
2930 }
2931
2932
2933
2934
2935 func testUint32x4ConvertToUint32(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint32x4, want func(x []uint32) []uint32) {
2936 n := 4
2937 t.Helper()
2938 forSlice(t, uint32s, n, func(x []uint32) bool {
2939 t.Helper()
2940 a := archsimd.LoadUint32x4Slice(x)
2941 g := make([]uint32, 4)
2942 f(a).StoreSlice(g)
2943 w := want(x)
2944 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2945 })
2946 }
2947
2948
2949
2950
2951 func testUint64x2ConvertToUint32(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint32x4, want func(x []uint64) []uint32) {
2952 n := 2
2953 t.Helper()
2954 forSlice(t, uint64s, n, func(x []uint64) bool {
2955 t.Helper()
2956 a := archsimd.LoadUint64x2Slice(x)
2957 g := make([]uint32, 4)
2958 f(a).StoreSlice(g)
2959 w := want(x)
2960 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2961 })
2962 }
2963
2964
2965
2966
2967 func testFloat32x4ConvertToUint32(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint32x4, want func(x []float32) []uint32) {
2968 n := 4
2969 t.Helper()
2970 forSlice(t, float32s, n, func(x []float32) bool {
2971 t.Helper()
2972 a := archsimd.LoadFloat32x4Slice(x)
2973 g := make([]uint32, 4)
2974 f(a).StoreSlice(g)
2975 w := want(x)
2976 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2977 })
2978 }
2979
2980
2981
2982
2983 func testFloat64x2ConvertToUint32(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint32x4, want func(x []float64) []uint32) {
2984 n := 2
2985 t.Helper()
2986 forSlice(t, float64s, n, func(x []float64) bool {
2987 t.Helper()
2988 a := archsimd.LoadFloat64x2Slice(x)
2989 g := make([]uint32, 4)
2990 f(a).StoreSlice(g)
2991 w := want(x)
2992 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
2993 })
2994 }
2995
2996
2997
2998
2999 func testInt8x32ConvertToUint32(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint32x16, want func(x []int8) []uint32) {
3000 n := 32
3001 t.Helper()
3002 forSlice(t, int8s, n, func(x []int8) bool {
3003 t.Helper()
3004 a := archsimd.LoadInt8x32Slice(x)
3005 g := make([]uint32, 16)
3006 f(a).StoreSlice(g)
3007 w := want(x)
3008 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3009 })
3010 }
3011
3012
3013
3014
3015 func testInt16x16ConvertToUint32(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint32x16, want func(x []int16) []uint32) {
3016 n := 16
3017 t.Helper()
3018 forSlice(t, int16s, n, func(x []int16) bool {
3019 t.Helper()
3020 a := archsimd.LoadInt16x16Slice(x)
3021 g := make([]uint32, 16)
3022 f(a).StoreSlice(g)
3023 w := want(x)
3024 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3025 })
3026 }
3027
3028
3029
3030
3031 func testInt32x8ConvertToUint32(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint32x8, want func(x []int32) []uint32) {
3032 n := 8
3033 t.Helper()
3034 forSlice(t, int32s, n, func(x []int32) bool {
3035 t.Helper()
3036 a := archsimd.LoadInt32x8Slice(x)
3037 g := make([]uint32, 8)
3038 f(a).StoreSlice(g)
3039 w := want(x)
3040 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3041 })
3042 }
3043
3044
3045
3046
3047 func testInt64x4ConvertToUint32(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint32x4, want func(x []int64) []uint32) {
3048 n := 4
3049 t.Helper()
3050 forSlice(t, int64s, n, func(x []int64) bool {
3051 t.Helper()
3052 a := archsimd.LoadInt64x4Slice(x)
3053 g := make([]uint32, 4)
3054 f(a).StoreSlice(g)
3055 w := want(x)
3056 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3057 })
3058 }
3059
3060
3061
3062
3063 func testUint8x32ConvertToUint32(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint32x16, want func(x []uint8) []uint32) {
3064 n := 32
3065 t.Helper()
3066 forSlice(t, uint8s, n, func(x []uint8) bool {
3067 t.Helper()
3068 a := archsimd.LoadUint8x32Slice(x)
3069 g := make([]uint32, 16)
3070 f(a).StoreSlice(g)
3071 w := want(x)
3072 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3073 })
3074 }
3075
3076
3077
3078
3079 func testUint16x16ConvertToUint32(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint32x16, want func(x []uint16) []uint32) {
3080 n := 16
3081 t.Helper()
3082 forSlice(t, uint16s, n, func(x []uint16) bool {
3083 t.Helper()
3084 a := archsimd.LoadUint16x16Slice(x)
3085 g := make([]uint32, 16)
3086 f(a).StoreSlice(g)
3087 w := want(x)
3088 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3089 })
3090 }
3091
3092
3093
3094
3095 func testUint32x8ConvertToUint32(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint32x8, want func(x []uint32) []uint32) {
3096 n := 8
3097 t.Helper()
3098 forSlice(t, uint32s, n, func(x []uint32) bool {
3099 t.Helper()
3100 a := archsimd.LoadUint32x8Slice(x)
3101 g := make([]uint32, 8)
3102 f(a).StoreSlice(g)
3103 w := want(x)
3104 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3105 })
3106 }
3107
3108
3109
3110
3111 func testUint64x4ConvertToUint32(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint32x4, want func(x []uint64) []uint32) {
3112 n := 4
3113 t.Helper()
3114 forSlice(t, uint64s, n, func(x []uint64) bool {
3115 t.Helper()
3116 a := archsimd.LoadUint64x4Slice(x)
3117 g := make([]uint32, 4)
3118 f(a).StoreSlice(g)
3119 w := want(x)
3120 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3121 })
3122 }
3123
3124
3125
3126
3127 func testFloat32x8ConvertToUint32(t *testing.T, f func(x archsimd.Float32x8) archsimd.Uint32x8, want func(x []float32) []uint32) {
3128 n := 8
3129 t.Helper()
3130 forSlice(t, float32s, n, func(x []float32) bool {
3131 t.Helper()
3132 a := archsimd.LoadFloat32x8Slice(x)
3133 g := make([]uint32, 8)
3134 f(a).StoreSlice(g)
3135 w := want(x)
3136 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3137 })
3138 }
3139
3140
3141
3142
3143 func testFloat64x4ConvertToUint32(t *testing.T, f func(x archsimd.Float64x4) archsimd.Uint32x4, want func(x []float64) []uint32) {
3144 n := 4
3145 t.Helper()
3146 forSlice(t, float64s, n, func(x []float64) bool {
3147 t.Helper()
3148 a := archsimd.LoadFloat64x4Slice(x)
3149 g := make([]uint32, 4)
3150 f(a).StoreSlice(g)
3151 w := want(x)
3152 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3153 })
3154 }
3155
3156
3157
3158
3159 func testInt8x64ConvertToUint32(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint32x16, want func(x []int8) []uint32) {
3160 n := 64
3161 t.Helper()
3162 forSlice(t, int8s, n, func(x []int8) bool {
3163 t.Helper()
3164 a := archsimd.LoadInt8x64Slice(x)
3165 g := make([]uint32, 16)
3166 f(a).StoreSlice(g)
3167 w := want(x)
3168 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3169 })
3170 }
3171
3172
3173
3174
3175 func testInt16x32ConvertToUint32(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint32x16, want func(x []int16) []uint32) {
3176 n := 32
3177 t.Helper()
3178 forSlice(t, int16s, n, func(x []int16) bool {
3179 t.Helper()
3180 a := archsimd.LoadInt16x32Slice(x)
3181 g := make([]uint32, 16)
3182 f(a).StoreSlice(g)
3183 w := want(x)
3184 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3185 })
3186 }
3187
3188
3189
3190
3191 func testInt32x16ConvertToUint32(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint32x16, want func(x []int32) []uint32) {
3192 n := 16
3193 t.Helper()
3194 forSlice(t, int32s, n, func(x []int32) bool {
3195 t.Helper()
3196 a := archsimd.LoadInt32x16Slice(x)
3197 g := make([]uint32, 16)
3198 f(a).StoreSlice(g)
3199 w := want(x)
3200 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3201 })
3202 }
3203
3204
3205
3206
3207 func testInt64x8ConvertToUint32(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint32x8, want func(x []int64) []uint32) {
3208 n := 8
3209 t.Helper()
3210 forSlice(t, int64s, n, func(x []int64) bool {
3211 t.Helper()
3212 a := archsimd.LoadInt64x8Slice(x)
3213 g := make([]uint32, 8)
3214 f(a).StoreSlice(g)
3215 w := want(x)
3216 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3217 })
3218 }
3219
3220
3221
3222
3223 func testUint8x64ConvertToUint32(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint32x16, want func(x []uint8) []uint32) {
3224 n := 64
3225 t.Helper()
3226 forSlice(t, uint8s, n, func(x []uint8) bool {
3227 t.Helper()
3228 a := archsimd.LoadUint8x64Slice(x)
3229 g := make([]uint32, 16)
3230 f(a).StoreSlice(g)
3231 w := want(x)
3232 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3233 })
3234 }
3235
3236
3237
3238
3239 func testUint16x32ConvertToUint32(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint32x16, want func(x []uint16) []uint32) {
3240 n := 32
3241 t.Helper()
3242 forSlice(t, uint16s, n, func(x []uint16) bool {
3243 t.Helper()
3244 a := archsimd.LoadUint16x32Slice(x)
3245 g := make([]uint32, 16)
3246 f(a).StoreSlice(g)
3247 w := want(x)
3248 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3249 })
3250 }
3251
3252
3253
3254
3255 func testUint32x16ConvertToUint32(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint32x16, want func(x []uint32) []uint32) {
3256 n := 16
3257 t.Helper()
3258 forSlice(t, uint32s, n, func(x []uint32) bool {
3259 t.Helper()
3260 a := archsimd.LoadUint32x16Slice(x)
3261 g := make([]uint32, 16)
3262 f(a).StoreSlice(g)
3263 w := want(x)
3264 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3265 })
3266 }
3267
3268
3269
3270
3271 func testUint64x8ConvertToUint32(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint32x8, want func(x []uint64) []uint32) {
3272 n := 8
3273 t.Helper()
3274 forSlice(t, uint64s, n, func(x []uint64) bool {
3275 t.Helper()
3276 a := archsimd.LoadUint64x8Slice(x)
3277 g := make([]uint32, 8)
3278 f(a).StoreSlice(g)
3279 w := want(x)
3280 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3281 })
3282 }
3283
3284
3285
3286
3287 func testFloat32x16ConvertToUint32(t *testing.T, f func(x archsimd.Float32x16) archsimd.Uint32x16, want func(x []float32) []uint32) {
3288 n := 16
3289 t.Helper()
3290 forSlice(t, float32s, n, func(x []float32) bool {
3291 t.Helper()
3292 a := archsimd.LoadFloat32x16Slice(x)
3293 g := make([]uint32, 16)
3294 f(a).StoreSlice(g)
3295 w := want(x)
3296 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3297 })
3298 }
3299
3300
3301
3302
3303 func testFloat64x8ConvertToUint32(t *testing.T, f func(x archsimd.Float64x8) archsimd.Uint32x8, want func(x []float64) []uint32) {
3304 n := 8
3305 t.Helper()
3306 forSlice(t, float64s, n, func(x []float64) bool {
3307 t.Helper()
3308 a := archsimd.LoadFloat64x8Slice(x)
3309 g := make([]uint32, 8)
3310 f(a).StoreSlice(g)
3311 w := want(x)
3312 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3313 })
3314 }
3315
3316
3317
3318
3319 func testInt8x16ConvertToInt64(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int64x8, want func(x []int8) []int64) {
3320 n := 16
3321 t.Helper()
3322 forSlice(t, int8s, n, func(x []int8) bool {
3323 t.Helper()
3324 a := archsimd.LoadInt8x16Slice(x)
3325 g := make([]int64, 8)
3326 f(a).StoreSlice(g)
3327 w := want(x)
3328 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3329 })
3330 }
3331
3332
3333
3334
3335 func testInt16x8ConvertToInt64(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int64x8, want func(x []int16) []int64) {
3336 n := 8
3337 t.Helper()
3338 forSlice(t, int16s, n, func(x []int16) bool {
3339 t.Helper()
3340 a := archsimd.LoadInt16x8Slice(x)
3341 g := make([]int64, 8)
3342 f(a).StoreSlice(g)
3343 w := want(x)
3344 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3345 })
3346 }
3347
3348
3349
3350
3351 func testInt32x4ConvertToInt64(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int64x4, want func(x []int32) []int64) {
3352 n := 4
3353 t.Helper()
3354 forSlice(t, int32s, n, func(x []int32) bool {
3355 t.Helper()
3356 a := archsimd.LoadInt32x4Slice(x)
3357 g := make([]int64, 4)
3358 f(a).StoreSlice(g)
3359 w := want(x)
3360 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3361 })
3362 }
3363
3364
3365
3366
3367 func testInt64x2ConvertToInt64(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int64x2, want func(x []int64) []int64) {
3368 n := 2
3369 t.Helper()
3370 forSlice(t, int64s, n, func(x []int64) bool {
3371 t.Helper()
3372 a := archsimd.LoadInt64x2Slice(x)
3373 g := make([]int64, 2)
3374 f(a).StoreSlice(g)
3375 w := want(x)
3376 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3377 })
3378 }
3379
3380
3381
3382
3383 func testUint8x16ConvertToInt64(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int64x8, want func(x []uint8) []int64) {
3384 n := 16
3385 t.Helper()
3386 forSlice(t, uint8s, n, func(x []uint8) bool {
3387 t.Helper()
3388 a := archsimd.LoadUint8x16Slice(x)
3389 g := make([]int64, 8)
3390 f(a).StoreSlice(g)
3391 w := want(x)
3392 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3393 })
3394 }
3395
3396
3397
3398
3399 func testUint16x8ConvertToInt64(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int64x8, want func(x []uint16) []int64) {
3400 n := 8
3401 t.Helper()
3402 forSlice(t, uint16s, n, func(x []uint16) bool {
3403 t.Helper()
3404 a := archsimd.LoadUint16x8Slice(x)
3405 g := make([]int64, 8)
3406 f(a).StoreSlice(g)
3407 w := want(x)
3408 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3409 })
3410 }
3411
3412
3413
3414
3415 func testUint32x4ConvertToInt64(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int64x4, want func(x []uint32) []int64) {
3416 n := 4
3417 t.Helper()
3418 forSlice(t, uint32s, n, func(x []uint32) bool {
3419 t.Helper()
3420 a := archsimd.LoadUint32x4Slice(x)
3421 g := make([]int64, 4)
3422 f(a).StoreSlice(g)
3423 w := want(x)
3424 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3425 })
3426 }
3427
3428
3429
3430
3431 func testUint64x2ConvertToInt64(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int64x2, want func(x []uint64) []int64) {
3432 n := 2
3433 t.Helper()
3434 forSlice(t, uint64s, n, func(x []uint64) bool {
3435 t.Helper()
3436 a := archsimd.LoadUint64x2Slice(x)
3437 g := make([]int64, 2)
3438 f(a).StoreSlice(g)
3439 w := want(x)
3440 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3441 })
3442 }
3443
3444
3445
3446
3447 func testFloat32x4ConvertToInt64(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int64x4, want func(x []float32) []int64) {
3448 n := 4
3449 t.Helper()
3450 forSlice(t, float32s, n, func(x []float32) bool {
3451 t.Helper()
3452 a := archsimd.LoadFloat32x4Slice(x)
3453 g := make([]int64, 4)
3454 f(a).StoreSlice(g)
3455 w := want(x)
3456 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3457 })
3458 }
3459
3460
3461
3462
3463 func testFloat64x2ConvertToInt64(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int64x2, want func(x []float64) []int64) {
3464 n := 2
3465 t.Helper()
3466 forSlice(t, float64s, n, func(x []float64) bool {
3467 t.Helper()
3468 a := archsimd.LoadFloat64x2Slice(x)
3469 g := make([]int64, 2)
3470 f(a).StoreSlice(g)
3471 w := want(x)
3472 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3473 })
3474 }
3475
3476
3477
3478
3479 func testInt8x32ConvertToInt64(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int64x8, want func(x []int8) []int64) {
3480 n := 32
3481 t.Helper()
3482 forSlice(t, int8s, n, func(x []int8) bool {
3483 t.Helper()
3484 a := archsimd.LoadInt8x32Slice(x)
3485 g := make([]int64, 8)
3486 f(a).StoreSlice(g)
3487 w := want(x)
3488 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3489 })
3490 }
3491
3492
3493
3494
3495 func testInt16x16ConvertToInt64(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int64x8, want func(x []int16) []int64) {
3496 n := 16
3497 t.Helper()
3498 forSlice(t, int16s, n, func(x []int16) bool {
3499 t.Helper()
3500 a := archsimd.LoadInt16x16Slice(x)
3501 g := make([]int64, 8)
3502 f(a).StoreSlice(g)
3503 w := want(x)
3504 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3505 })
3506 }
3507
3508
3509
3510
3511 func testInt32x8ConvertToInt64(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int64x8, want func(x []int32) []int64) {
3512 n := 8
3513 t.Helper()
3514 forSlice(t, int32s, n, func(x []int32) bool {
3515 t.Helper()
3516 a := archsimd.LoadInt32x8Slice(x)
3517 g := make([]int64, 8)
3518 f(a).StoreSlice(g)
3519 w := want(x)
3520 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3521 })
3522 }
3523
3524
3525
3526
3527 func testInt64x4ConvertToInt64(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int64x4, want func(x []int64) []int64) {
3528 n := 4
3529 t.Helper()
3530 forSlice(t, int64s, n, func(x []int64) bool {
3531 t.Helper()
3532 a := archsimd.LoadInt64x4Slice(x)
3533 g := make([]int64, 4)
3534 f(a).StoreSlice(g)
3535 w := want(x)
3536 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3537 })
3538 }
3539
3540
3541
3542
3543 func testUint8x32ConvertToInt64(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int64x8, want func(x []uint8) []int64) {
3544 n := 32
3545 t.Helper()
3546 forSlice(t, uint8s, n, func(x []uint8) bool {
3547 t.Helper()
3548 a := archsimd.LoadUint8x32Slice(x)
3549 g := make([]int64, 8)
3550 f(a).StoreSlice(g)
3551 w := want(x)
3552 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3553 })
3554 }
3555
3556
3557
3558
3559 func testUint16x16ConvertToInt64(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int64x8, want func(x []uint16) []int64) {
3560 n := 16
3561 t.Helper()
3562 forSlice(t, uint16s, n, func(x []uint16) bool {
3563 t.Helper()
3564 a := archsimd.LoadUint16x16Slice(x)
3565 g := make([]int64, 8)
3566 f(a).StoreSlice(g)
3567 w := want(x)
3568 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3569 })
3570 }
3571
3572
3573
3574
3575 func testUint32x8ConvertToInt64(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int64x8, want func(x []uint32) []int64) {
3576 n := 8
3577 t.Helper()
3578 forSlice(t, uint32s, n, func(x []uint32) bool {
3579 t.Helper()
3580 a := archsimd.LoadUint32x8Slice(x)
3581 g := make([]int64, 8)
3582 f(a).StoreSlice(g)
3583 w := want(x)
3584 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3585 })
3586 }
3587
3588
3589
3590
3591 func testUint64x4ConvertToInt64(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int64x4, want func(x []uint64) []int64) {
3592 n := 4
3593 t.Helper()
3594 forSlice(t, uint64s, n, func(x []uint64) bool {
3595 t.Helper()
3596 a := archsimd.LoadUint64x4Slice(x)
3597 g := make([]int64, 4)
3598 f(a).StoreSlice(g)
3599 w := want(x)
3600 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3601 })
3602 }
3603
3604
3605
3606
3607 func testFloat32x8ConvertToInt64(t *testing.T, f func(x archsimd.Float32x8) archsimd.Int64x8, want func(x []float32) []int64) {
3608 n := 8
3609 t.Helper()
3610 forSlice(t, float32s, n, func(x []float32) bool {
3611 t.Helper()
3612 a := archsimd.LoadFloat32x8Slice(x)
3613 g := make([]int64, 8)
3614 f(a).StoreSlice(g)
3615 w := want(x)
3616 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3617 })
3618 }
3619
3620
3621
3622
3623 func testFloat64x4ConvertToInt64(t *testing.T, f func(x archsimd.Float64x4) archsimd.Int64x4, want func(x []float64) []int64) {
3624 n := 4
3625 t.Helper()
3626 forSlice(t, float64s, n, func(x []float64) bool {
3627 t.Helper()
3628 a := archsimd.LoadFloat64x4Slice(x)
3629 g := make([]int64, 4)
3630 f(a).StoreSlice(g)
3631 w := want(x)
3632 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3633 })
3634 }
3635
3636
3637
3638
3639 func testInt8x64ConvertToInt64(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int64x8, want func(x []int8) []int64) {
3640 n := 64
3641 t.Helper()
3642 forSlice(t, int8s, n, func(x []int8) bool {
3643 t.Helper()
3644 a := archsimd.LoadInt8x64Slice(x)
3645 g := make([]int64, 8)
3646 f(a).StoreSlice(g)
3647 w := want(x)
3648 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3649 })
3650 }
3651
3652
3653
3654
3655 func testInt16x32ConvertToInt64(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int64x8, want func(x []int16) []int64) {
3656 n := 32
3657 t.Helper()
3658 forSlice(t, int16s, n, func(x []int16) bool {
3659 t.Helper()
3660 a := archsimd.LoadInt16x32Slice(x)
3661 g := make([]int64, 8)
3662 f(a).StoreSlice(g)
3663 w := want(x)
3664 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3665 })
3666 }
3667
3668
3669
3670
3671 func testInt32x16ConvertToInt64(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int64x8, want func(x []int32) []int64) {
3672 n := 16
3673 t.Helper()
3674 forSlice(t, int32s, n, func(x []int32) bool {
3675 t.Helper()
3676 a := archsimd.LoadInt32x16Slice(x)
3677 g := make([]int64, 8)
3678 f(a).StoreSlice(g)
3679 w := want(x)
3680 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3681 })
3682 }
3683
3684
3685
3686
3687 func testInt64x8ConvertToInt64(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int64x8, want func(x []int64) []int64) {
3688 n := 8
3689 t.Helper()
3690 forSlice(t, int64s, n, func(x []int64) bool {
3691 t.Helper()
3692 a := archsimd.LoadInt64x8Slice(x)
3693 g := make([]int64, 8)
3694 f(a).StoreSlice(g)
3695 w := want(x)
3696 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3697 })
3698 }
3699
3700
3701
3702
3703 func testUint8x64ConvertToInt64(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int64x8, want func(x []uint8) []int64) {
3704 n := 64
3705 t.Helper()
3706 forSlice(t, uint8s, n, func(x []uint8) bool {
3707 t.Helper()
3708 a := archsimd.LoadUint8x64Slice(x)
3709 g := make([]int64, 8)
3710 f(a).StoreSlice(g)
3711 w := want(x)
3712 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3713 })
3714 }
3715
3716
3717
3718
3719 func testUint16x32ConvertToInt64(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int64x8, want func(x []uint16) []int64) {
3720 n := 32
3721 t.Helper()
3722 forSlice(t, uint16s, n, func(x []uint16) bool {
3723 t.Helper()
3724 a := archsimd.LoadUint16x32Slice(x)
3725 g := make([]int64, 8)
3726 f(a).StoreSlice(g)
3727 w := want(x)
3728 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3729 })
3730 }
3731
3732
3733
3734
3735 func testUint32x16ConvertToInt64(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int64x8, want func(x []uint32) []int64) {
3736 n := 16
3737 t.Helper()
3738 forSlice(t, uint32s, n, func(x []uint32) bool {
3739 t.Helper()
3740 a := archsimd.LoadUint32x16Slice(x)
3741 g := make([]int64, 8)
3742 f(a).StoreSlice(g)
3743 w := want(x)
3744 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3745 })
3746 }
3747
3748
3749
3750
3751 func testUint64x8ConvertToInt64(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int64x8, want func(x []uint64) []int64) {
3752 n := 8
3753 t.Helper()
3754 forSlice(t, uint64s, n, func(x []uint64) bool {
3755 t.Helper()
3756 a := archsimd.LoadUint64x8Slice(x)
3757 g := make([]int64, 8)
3758 f(a).StoreSlice(g)
3759 w := want(x)
3760 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3761 })
3762 }
3763
3764
3765
3766
3767 func testFloat32x16ConvertToInt64(t *testing.T, f func(x archsimd.Float32x16) archsimd.Int64x8, want func(x []float32) []int64) {
3768 n := 16
3769 t.Helper()
3770 forSlice(t, float32s, n, func(x []float32) bool {
3771 t.Helper()
3772 a := archsimd.LoadFloat32x16Slice(x)
3773 g := make([]int64, 8)
3774 f(a).StoreSlice(g)
3775 w := want(x)
3776 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3777 })
3778 }
3779
3780
3781
3782
3783 func testFloat64x8ConvertToInt64(t *testing.T, f func(x archsimd.Float64x8) archsimd.Int64x8, want func(x []float64) []int64) {
3784 n := 8
3785 t.Helper()
3786 forSlice(t, float64s, n, func(x []float64) bool {
3787 t.Helper()
3788 a := archsimd.LoadFloat64x8Slice(x)
3789 g := make([]int64, 8)
3790 f(a).StoreSlice(g)
3791 w := want(x)
3792 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3793 })
3794 }
3795
3796
3797
3798
3799 func testInt8x16ConvertToUint64(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint64x8, want func(x []int8) []uint64) {
3800 n := 16
3801 t.Helper()
3802 forSlice(t, int8s, n, func(x []int8) bool {
3803 t.Helper()
3804 a := archsimd.LoadInt8x16Slice(x)
3805 g := make([]uint64, 8)
3806 f(a).StoreSlice(g)
3807 w := want(x)
3808 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3809 })
3810 }
3811
3812
3813
3814
3815 func testInt16x8ConvertToUint64(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint64x8, want func(x []int16) []uint64) {
3816 n := 8
3817 t.Helper()
3818 forSlice(t, int16s, n, func(x []int16) bool {
3819 t.Helper()
3820 a := archsimd.LoadInt16x8Slice(x)
3821 g := make([]uint64, 8)
3822 f(a).StoreSlice(g)
3823 w := want(x)
3824 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3825 })
3826 }
3827
3828
3829
3830
3831 func testInt32x4ConvertToUint64(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint64x4, want func(x []int32) []uint64) {
3832 n := 4
3833 t.Helper()
3834 forSlice(t, int32s, n, func(x []int32) bool {
3835 t.Helper()
3836 a := archsimd.LoadInt32x4Slice(x)
3837 g := make([]uint64, 4)
3838 f(a).StoreSlice(g)
3839 w := want(x)
3840 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3841 })
3842 }
3843
3844
3845
3846
3847 func testInt64x2ConvertToUint64(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint64x2, want func(x []int64) []uint64) {
3848 n := 2
3849 t.Helper()
3850 forSlice(t, int64s, n, func(x []int64) bool {
3851 t.Helper()
3852 a := archsimd.LoadInt64x2Slice(x)
3853 g := make([]uint64, 2)
3854 f(a).StoreSlice(g)
3855 w := want(x)
3856 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3857 })
3858 }
3859
3860
3861
3862
3863 func testUint8x16ConvertToUint64(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint64x8, want func(x []uint8) []uint64) {
3864 n := 16
3865 t.Helper()
3866 forSlice(t, uint8s, n, func(x []uint8) bool {
3867 t.Helper()
3868 a := archsimd.LoadUint8x16Slice(x)
3869 g := make([]uint64, 8)
3870 f(a).StoreSlice(g)
3871 w := want(x)
3872 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3873 })
3874 }
3875
3876
3877
3878
3879 func testUint16x8ConvertToUint64(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint64x8, want func(x []uint16) []uint64) {
3880 n := 8
3881 t.Helper()
3882 forSlice(t, uint16s, n, func(x []uint16) bool {
3883 t.Helper()
3884 a := archsimd.LoadUint16x8Slice(x)
3885 g := make([]uint64, 8)
3886 f(a).StoreSlice(g)
3887 w := want(x)
3888 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3889 })
3890 }
3891
3892
3893
3894
3895 func testUint32x4ConvertToUint64(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint64x4, want func(x []uint32) []uint64) {
3896 n := 4
3897 t.Helper()
3898 forSlice(t, uint32s, n, func(x []uint32) bool {
3899 t.Helper()
3900 a := archsimd.LoadUint32x4Slice(x)
3901 g := make([]uint64, 4)
3902 f(a).StoreSlice(g)
3903 w := want(x)
3904 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3905 })
3906 }
3907
3908
3909
3910
3911 func testUint64x2ConvertToUint64(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint64x2, want func(x []uint64) []uint64) {
3912 n := 2
3913 t.Helper()
3914 forSlice(t, uint64s, n, func(x []uint64) bool {
3915 t.Helper()
3916 a := archsimd.LoadUint64x2Slice(x)
3917 g := make([]uint64, 2)
3918 f(a).StoreSlice(g)
3919 w := want(x)
3920 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3921 })
3922 }
3923
3924
3925
3926
3927 func testFloat32x4ConvertToUint64(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint64x4, want func(x []float32) []uint64) {
3928 n := 4
3929 t.Helper()
3930 forSlice(t, float32s, n, func(x []float32) bool {
3931 t.Helper()
3932 a := archsimd.LoadFloat32x4Slice(x)
3933 g := make([]uint64, 4)
3934 f(a).StoreSlice(g)
3935 w := want(x)
3936 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3937 })
3938 }
3939
3940
3941
3942
3943 func testFloat64x2ConvertToUint64(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint64x2, want func(x []float64) []uint64) {
3944 n := 2
3945 t.Helper()
3946 forSlice(t, float64s, n, func(x []float64) bool {
3947 t.Helper()
3948 a := archsimd.LoadFloat64x2Slice(x)
3949 g := make([]uint64, 2)
3950 f(a).StoreSlice(g)
3951 w := want(x)
3952 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3953 })
3954 }
3955
3956
3957
3958
3959 func testInt8x32ConvertToUint64(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint64x8, want func(x []int8) []uint64) {
3960 n := 32
3961 t.Helper()
3962 forSlice(t, int8s, n, func(x []int8) bool {
3963 t.Helper()
3964 a := archsimd.LoadInt8x32Slice(x)
3965 g := make([]uint64, 8)
3966 f(a).StoreSlice(g)
3967 w := want(x)
3968 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3969 })
3970 }
3971
3972
3973
3974
3975 func testInt16x16ConvertToUint64(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint64x8, want func(x []int16) []uint64) {
3976 n := 16
3977 t.Helper()
3978 forSlice(t, int16s, n, func(x []int16) bool {
3979 t.Helper()
3980 a := archsimd.LoadInt16x16Slice(x)
3981 g := make([]uint64, 8)
3982 f(a).StoreSlice(g)
3983 w := want(x)
3984 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
3985 })
3986 }
3987
3988
3989
3990
3991 func testInt32x8ConvertToUint64(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint64x8, want func(x []int32) []uint64) {
3992 n := 8
3993 t.Helper()
3994 forSlice(t, int32s, n, func(x []int32) bool {
3995 t.Helper()
3996 a := archsimd.LoadInt32x8Slice(x)
3997 g := make([]uint64, 8)
3998 f(a).StoreSlice(g)
3999 w := want(x)
4000 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4001 })
4002 }
4003
4004
4005
4006
4007 func testInt64x4ConvertToUint64(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint64x4, want func(x []int64) []uint64) {
4008 n := 4
4009 t.Helper()
4010 forSlice(t, int64s, n, func(x []int64) bool {
4011 t.Helper()
4012 a := archsimd.LoadInt64x4Slice(x)
4013 g := make([]uint64, 4)
4014 f(a).StoreSlice(g)
4015 w := want(x)
4016 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4017 })
4018 }
4019
4020
4021
4022
4023 func testUint8x32ConvertToUint64(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint64x8, want func(x []uint8) []uint64) {
4024 n := 32
4025 t.Helper()
4026 forSlice(t, uint8s, n, func(x []uint8) bool {
4027 t.Helper()
4028 a := archsimd.LoadUint8x32Slice(x)
4029 g := make([]uint64, 8)
4030 f(a).StoreSlice(g)
4031 w := want(x)
4032 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4033 })
4034 }
4035
4036
4037
4038
4039 func testUint16x16ConvertToUint64(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint64x8, want func(x []uint16) []uint64) {
4040 n := 16
4041 t.Helper()
4042 forSlice(t, uint16s, n, func(x []uint16) bool {
4043 t.Helper()
4044 a := archsimd.LoadUint16x16Slice(x)
4045 g := make([]uint64, 8)
4046 f(a).StoreSlice(g)
4047 w := want(x)
4048 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4049 })
4050 }
4051
4052
4053
4054
4055 func testUint32x8ConvertToUint64(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint64x8, want func(x []uint32) []uint64) {
4056 n := 8
4057 t.Helper()
4058 forSlice(t, uint32s, n, func(x []uint32) bool {
4059 t.Helper()
4060 a := archsimd.LoadUint32x8Slice(x)
4061 g := make([]uint64, 8)
4062 f(a).StoreSlice(g)
4063 w := want(x)
4064 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4065 })
4066 }
4067
4068
4069
4070
4071 func testUint64x4ConvertToUint64(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint64x4, want func(x []uint64) []uint64) {
4072 n := 4
4073 t.Helper()
4074 forSlice(t, uint64s, n, func(x []uint64) bool {
4075 t.Helper()
4076 a := archsimd.LoadUint64x4Slice(x)
4077 g := make([]uint64, 4)
4078 f(a).StoreSlice(g)
4079 w := want(x)
4080 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4081 })
4082 }
4083
4084
4085
4086
4087 func testFloat32x8ConvertToUint64(t *testing.T, f func(x archsimd.Float32x8) archsimd.Uint64x8, want func(x []float32) []uint64) {
4088 n := 8
4089 t.Helper()
4090 forSlice(t, float32s, n, func(x []float32) bool {
4091 t.Helper()
4092 a := archsimd.LoadFloat32x8Slice(x)
4093 g := make([]uint64, 8)
4094 f(a).StoreSlice(g)
4095 w := want(x)
4096 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4097 })
4098 }
4099
4100
4101
4102
4103 func testFloat64x4ConvertToUint64(t *testing.T, f func(x archsimd.Float64x4) archsimd.Uint64x4, want func(x []float64) []uint64) {
4104 n := 4
4105 t.Helper()
4106 forSlice(t, float64s, n, func(x []float64) bool {
4107 t.Helper()
4108 a := archsimd.LoadFloat64x4Slice(x)
4109 g := make([]uint64, 4)
4110 f(a).StoreSlice(g)
4111 w := want(x)
4112 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4113 })
4114 }
4115
4116
4117
4118
4119 func testInt8x64ConvertToUint64(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint64x8, want func(x []int8) []uint64) {
4120 n := 64
4121 t.Helper()
4122 forSlice(t, int8s, n, func(x []int8) bool {
4123 t.Helper()
4124 a := archsimd.LoadInt8x64Slice(x)
4125 g := make([]uint64, 8)
4126 f(a).StoreSlice(g)
4127 w := want(x)
4128 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4129 })
4130 }
4131
4132
4133
4134
4135 func testInt16x32ConvertToUint64(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint64x8, want func(x []int16) []uint64) {
4136 n := 32
4137 t.Helper()
4138 forSlice(t, int16s, n, func(x []int16) bool {
4139 t.Helper()
4140 a := archsimd.LoadInt16x32Slice(x)
4141 g := make([]uint64, 8)
4142 f(a).StoreSlice(g)
4143 w := want(x)
4144 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4145 })
4146 }
4147
4148
4149
4150
4151 func testInt32x16ConvertToUint64(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint64x8, want func(x []int32) []uint64) {
4152 n := 16
4153 t.Helper()
4154 forSlice(t, int32s, n, func(x []int32) bool {
4155 t.Helper()
4156 a := archsimd.LoadInt32x16Slice(x)
4157 g := make([]uint64, 8)
4158 f(a).StoreSlice(g)
4159 w := want(x)
4160 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4161 })
4162 }
4163
4164
4165
4166
4167 func testInt64x8ConvertToUint64(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint64x8, want func(x []int64) []uint64) {
4168 n := 8
4169 t.Helper()
4170 forSlice(t, int64s, n, func(x []int64) bool {
4171 t.Helper()
4172 a := archsimd.LoadInt64x8Slice(x)
4173 g := make([]uint64, 8)
4174 f(a).StoreSlice(g)
4175 w := want(x)
4176 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4177 })
4178 }
4179
4180
4181
4182
4183 func testUint8x64ConvertToUint64(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint64x8, want func(x []uint8) []uint64) {
4184 n := 64
4185 t.Helper()
4186 forSlice(t, uint8s, n, func(x []uint8) bool {
4187 t.Helper()
4188 a := archsimd.LoadUint8x64Slice(x)
4189 g := make([]uint64, 8)
4190 f(a).StoreSlice(g)
4191 w := want(x)
4192 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4193 })
4194 }
4195
4196
4197
4198
4199 func testUint16x32ConvertToUint64(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint64x8, want func(x []uint16) []uint64) {
4200 n := 32
4201 t.Helper()
4202 forSlice(t, uint16s, n, func(x []uint16) bool {
4203 t.Helper()
4204 a := archsimd.LoadUint16x32Slice(x)
4205 g := make([]uint64, 8)
4206 f(a).StoreSlice(g)
4207 w := want(x)
4208 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4209 })
4210 }
4211
4212
4213
4214
4215 func testUint32x16ConvertToUint64(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint64x8, want func(x []uint32) []uint64) {
4216 n := 16
4217 t.Helper()
4218 forSlice(t, uint32s, n, func(x []uint32) bool {
4219 t.Helper()
4220 a := archsimd.LoadUint32x16Slice(x)
4221 g := make([]uint64, 8)
4222 f(a).StoreSlice(g)
4223 w := want(x)
4224 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4225 })
4226 }
4227
4228
4229
4230
4231 func testUint64x8ConvertToUint64(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint64x8, want func(x []uint64) []uint64) {
4232 n := 8
4233 t.Helper()
4234 forSlice(t, uint64s, n, func(x []uint64) bool {
4235 t.Helper()
4236 a := archsimd.LoadUint64x8Slice(x)
4237 g := make([]uint64, 8)
4238 f(a).StoreSlice(g)
4239 w := want(x)
4240 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4241 })
4242 }
4243
4244
4245
4246
4247 func testFloat32x16ConvertToUint64(t *testing.T, f func(x archsimd.Float32x16) archsimd.Uint64x8, want func(x []float32) []uint64) {
4248 n := 16
4249 t.Helper()
4250 forSlice(t, float32s, n, func(x []float32) bool {
4251 t.Helper()
4252 a := archsimd.LoadFloat32x16Slice(x)
4253 g := make([]uint64, 8)
4254 f(a).StoreSlice(g)
4255 w := want(x)
4256 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4257 })
4258 }
4259
4260
4261
4262
4263 func testFloat64x8ConvertToUint64(t *testing.T, f func(x archsimd.Float64x8) archsimd.Uint64x8, want func(x []float64) []uint64) {
4264 n := 8
4265 t.Helper()
4266 forSlice(t, float64s, n, func(x []float64) bool {
4267 t.Helper()
4268 a := archsimd.LoadFloat64x8Slice(x)
4269 g := make([]uint64, 8)
4270 f(a).StoreSlice(g)
4271 w := want(x)
4272 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4273 })
4274 }
4275
4276
4277
4278
4279 func testInt8x16ConvertToFloat32(t *testing.T, f func(x archsimd.Int8x16) archsimd.Float32x16, want func(x []int8) []float32) {
4280 n := 16
4281 t.Helper()
4282 forSlice(t, int8s, n, func(x []int8) bool {
4283 t.Helper()
4284 a := archsimd.LoadInt8x16Slice(x)
4285 g := make([]float32, 16)
4286 f(a).StoreSlice(g)
4287 w := want(x)
4288 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4289 })
4290 }
4291
4292
4293
4294
4295 func testInt16x8ConvertToFloat32(t *testing.T, f func(x archsimd.Int16x8) archsimd.Float32x8, want func(x []int16) []float32) {
4296 n := 8
4297 t.Helper()
4298 forSlice(t, int16s, n, func(x []int16) bool {
4299 t.Helper()
4300 a := archsimd.LoadInt16x8Slice(x)
4301 g := make([]float32, 8)
4302 f(a).StoreSlice(g)
4303 w := want(x)
4304 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4305 })
4306 }
4307
4308
4309
4310
4311 func testInt32x4ConvertToFloat32(t *testing.T, f func(x archsimd.Int32x4) archsimd.Float32x4, want func(x []int32) []float32) {
4312 n := 4
4313 t.Helper()
4314 forSlice(t, int32s, n, func(x []int32) bool {
4315 t.Helper()
4316 a := archsimd.LoadInt32x4Slice(x)
4317 g := make([]float32, 4)
4318 f(a).StoreSlice(g)
4319 w := want(x)
4320 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4321 })
4322 }
4323
4324
4325
4326
4327 func testInt64x2ConvertToFloat32(t *testing.T, f func(x archsimd.Int64x2) archsimd.Float32x4, want func(x []int64) []float32) {
4328 n := 2
4329 t.Helper()
4330 forSlice(t, int64s, n, func(x []int64) bool {
4331 t.Helper()
4332 a := archsimd.LoadInt64x2Slice(x)
4333 g := make([]float32, 4)
4334 f(a).StoreSlice(g)
4335 w := want(x)
4336 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4337 })
4338 }
4339
4340
4341
4342
4343 func testUint8x16ConvertToFloat32(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Float32x16, want func(x []uint8) []float32) {
4344 n := 16
4345 t.Helper()
4346 forSlice(t, uint8s, n, func(x []uint8) bool {
4347 t.Helper()
4348 a := archsimd.LoadUint8x16Slice(x)
4349 g := make([]float32, 16)
4350 f(a).StoreSlice(g)
4351 w := want(x)
4352 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4353 })
4354 }
4355
4356
4357
4358
4359 func testUint16x8ConvertToFloat32(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Float32x8, want func(x []uint16) []float32) {
4360 n := 8
4361 t.Helper()
4362 forSlice(t, uint16s, n, func(x []uint16) bool {
4363 t.Helper()
4364 a := archsimd.LoadUint16x8Slice(x)
4365 g := make([]float32, 8)
4366 f(a).StoreSlice(g)
4367 w := want(x)
4368 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4369 })
4370 }
4371
4372
4373
4374
4375 func testUint32x4ConvertToFloat32(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Float32x4, want func(x []uint32) []float32) {
4376 n := 4
4377 t.Helper()
4378 forSlice(t, uint32s, n, func(x []uint32) bool {
4379 t.Helper()
4380 a := archsimd.LoadUint32x4Slice(x)
4381 g := make([]float32, 4)
4382 f(a).StoreSlice(g)
4383 w := want(x)
4384 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4385 })
4386 }
4387
4388
4389
4390
4391 func testUint64x2ConvertToFloat32(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Float32x4, want func(x []uint64) []float32) {
4392 n := 2
4393 t.Helper()
4394 forSlice(t, uint64s, n, func(x []uint64) bool {
4395 t.Helper()
4396 a := archsimd.LoadUint64x2Slice(x)
4397 g := make([]float32, 4)
4398 f(a).StoreSlice(g)
4399 w := want(x)
4400 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4401 })
4402 }
4403
4404
4405
4406
4407 func testFloat32x4ConvertToFloat32(t *testing.T, f func(x archsimd.Float32x4) archsimd.Float32x4, want func(x []float32) []float32) {
4408 n := 4
4409 t.Helper()
4410 forSlice(t, float32s, n, func(x []float32) bool {
4411 t.Helper()
4412 a := archsimd.LoadFloat32x4Slice(x)
4413 g := make([]float32, 4)
4414 f(a).StoreSlice(g)
4415 w := want(x)
4416 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4417 })
4418 }
4419
4420
4421
4422
4423 func testFloat64x2ConvertToFloat32(t *testing.T, f func(x archsimd.Float64x2) archsimd.Float32x4, want func(x []float64) []float32) {
4424 n := 2
4425 t.Helper()
4426 forSlice(t, float64s, n, func(x []float64) bool {
4427 t.Helper()
4428 a := archsimd.LoadFloat64x2Slice(x)
4429 g := make([]float32, 4)
4430 f(a).StoreSlice(g)
4431 w := want(x)
4432 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4433 })
4434 }
4435
4436
4437
4438
4439 func testInt8x32ConvertToFloat32(t *testing.T, f func(x archsimd.Int8x32) archsimd.Float32x16, want func(x []int8) []float32) {
4440 n := 32
4441 t.Helper()
4442 forSlice(t, int8s, n, func(x []int8) bool {
4443 t.Helper()
4444 a := archsimd.LoadInt8x32Slice(x)
4445 g := make([]float32, 16)
4446 f(a).StoreSlice(g)
4447 w := want(x)
4448 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4449 })
4450 }
4451
4452
4453
4454
4455 func testInt16x16ConvertToFloat32(t *testing.T, f func(x archsimd.Int16x16) archsimd.Float32x16, want func(x []int16) []float32) {
4456 n := 16
4457 t.Helper()
4458 forSlice(t, int16s, n, func(x []int16) bool {
4459 t.Helper()
4460 a := archsimd.LoadInt16x16Slice(x)
4461 g := make([]float32, 16)
4462 f(a).StoreSlice(g)
4463 w := want(x)
4464 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4465 })
4466 }
4467
4468
4469
4470
4471 func testInt32x8ConvertToFloat32(t *testing.T, f func(x archsimd.Int32x8) archsimd.Float32x8, want func(x []int32) []float32) {
4472 n := 8
4473 t.Helper()
4474 forSlice(t, int32s, n, func(x []int32) bool {
4475 t.Helper()
4476 a := archsimd.LoadInt32x8Slice(x)
4477 g := make([]float32, 8)
4478 f(a).StoreSlice(g)
4479 w := want(x)
4480 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4481 })
4482 }
4483
4484
4485
4486
4487 func testInt64x4ConvertToFloat32(t *testing.T, f func(x archsimd.Int64x4) archsimd.Float32x4, want func(x []int64) []float32) {
4488 n := 4
4489 t.Helper()
4490 forSlice(t, int64s, n, func(x []int64) bool {
4491 t.Helper()
4492 a := archsimd.LoadInt64x4Slice(x)
4493 g := make([]float32, 4)
4494 f(a).StoreSlice(g)
4495 w := want(x)
4496 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4497 })
4498 }
4499
4500
4501
4502
4503 func testUint8x32ConvertToFloat32(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Float32x16, want func(x []uint8) []float32) {
4504 n := 32
4505 t.Helper()
4506 forSlice(t, uint8s, n, func(x []uint8) bool {
4507 t.Helper()
4508 a := archsimd.LoadUint8x32Slice(x)
4509 g := make([]float32, 16)
4510 f(a).StoreSlice(g)
4511 w := want(x)
4512 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4513 })
4514 }
4515
4516
4517
4518
4519 func testUint16x16ConvertToFloat32(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Float32x16, want func(x []uint16) []float32) {
4520 n := 16
4521 t.Helper()
4522 forSlice(t, uint16s, n, func(x []uint16) bool {
4523 t.Helper()
4524 a := archsimd.LoadUint16x16Slice(x)
4525 g := make([]float32, 16)
4526 f(a).StoreSlice(g)
4527 w := want(x)
4528 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4529 })
4530 }
4531
4532
4533
4534
4535 func testUint32x8ConvertToFloat32(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Float32x8, want func(x []uint32) []float32) {
4536 n := 8
4537 t.Helper()
4538 forSlice(t, uint32s, n, func(x []uint32) bool {
4539 t.Helper()
4540 a := archsimd.LoadUint32x8Slice(x)
4541 g := make([]float32, 8)
4542 f(a).StoreSlice(g)
4543 w := want(x)
4544 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4545 })
4546 }
4547
4548
4549
4550
4551 func testUint64x4ConvertToFloat32(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Float32x4, want func(x []uint64) []float32) {
4552 n := 4
4553 t.Helper()
4554 forSlice(t, uint64s, n, func(x []uint64) bool {
4555 t.Helper()
4556 a := archsimd.LoadUint64x4Slice(x)
4557 g := make([]float32, 4)
4558 f(a).StoreSlice(g)
4559 w := want(x)
4560 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4561 })
4562 }
4563
4564
4565
4566
4567 func testFloat32x8ConvertToFloat32(t *testing.T, f func(x archsimd.Float32x8) archsimd.Float32x8, want func(x []float32) []float32) {
4568 n := 8
4569 t.Helper()
4570 forSlice(t, float32s, n, func(x []float32) bool {
4571 t.Helper()
4572 a := archsimd.LoadFloat32x8Slice(x)
4573 g := make([]float32, 8)
4574 f(a).StoreSlice(g)
4575 w := want(x)
4576 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4577 })
4578 }
4579
4580
4581
4582
4583 func testFloat64x4ConvertToFloat32(t *testing.T, f func(x archsimd.Float64x4) archsimd.Float32x4, want func(x []float64) []float32) {
4584 n := 4
4585 t.Helper()
4586 forSlice(t, float64s, n, func(x []float64) bool {
4587 t.Helper()
4588 a := archsimd.LoadFloat64x4Slice(x)
4589 g := make([]float32, 4)
4590 f(a).StoreSlice(g)
4591 w := want(x)
4592 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4593 })
4594 }
4595
4596
4597
4598
4599 func testInt8x64ConvertToFloat32(t *testing.T, f func(x archsimd.Int8x64) archsimd.Float32x16, want func(x []int8) []float32) {
4600 n := 64
4601 t.Helper()
4602 forSlice(t, int8s, n, func(x []int8) bool {
4603 t.Helper()
4604 a := archsimd.LoadInt8x64Slice(x)
4605 g := make([]float32, 16)
4606 f(a).StoreSlice(g)
4607 w := want(x)
4608 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4609 })
4610 }
4611
4612
4613
4614
4615 func testInt16x32ConvertToFloat32(t *testing.T, f func(x archsimd.Int16x32) archsimd.Float32x16, want func(x []int16) []float32) {
4616 n := 32
4617 t.Helper()
4618 forSlice(t, int16s, n, func(x []int16) bool {
4619 t.Helper()
4620 a := archsimd.LoadInt16x32Slice(x)
4621 g := make([]float32, 16)
4622 f(a).StoreSlice(g)
4623 w := want(x)
4624 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4625 })
4626 }
4627
4628
4629
4630
4631 func testInt32x16ConvertToFloat32(t *testing.T, f func(x archsimd.Int32x16) archsimd.Float32x16, want func(x []int32) []float32) {
4632 n := 16
4633 t.Helper()
4634 forSlice(t, int32s, n, func(x []int32) bool {
4635 t.Helper()
4636 a := archsimd.LoadInt32x16Slice(x)
4637 g := make([]float32, 16)
4638 f(a).StoreSlice(g)
4639 w := want(x)
4640 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4641 })
4642 }
4643
4644
4645
4646
4647 func testInt64x8ConvertToFloat32(t *testing.T, f func(x archsimd.Int64x8) archsimd.Float32x8, want func(x []int64) []float32) {
4648 n := 8
4649 t.Helper()
4650 forSlice(t, int64s, n, func(x []int64) bool {
4651 t.Helper()
4652 a := archsimd.LoadInt64x8Slice(x)
4653 g := make([]float32, 8)
4654 f(a).StoreSlice(g)
4655 w := want(x)
4656 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4657 })
4658 }
4659
4660
4661
4662
4663 func testUint8x64ConvertToFloat32(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Float32x16, want func(x []uint8) []float32) {
4664 n := 64
4665 t.Helper()
4666 forSlice(t, uint8s, n, func(x []uint8) bool {
4667 t.Helper()
4668 a := archsimd.LoadUint8x64Slice(x)
4669 g := make([]float32, 16)
4670 f(a).StoreSlice(g)
4671 w := want(x)
4672 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4673 })
4674 }
4675
4676
4677
4678
4679 func testUint16x32ConvertToFloat32(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Float32x16, want func(x []uint16) []float32) {
4680 n := 32
4681 t.Helper()
4682 forSlice(t, uint16s, n, func(x []uint16) bool {
4683 t.Helper()
4684 a := archsimd.LoadUint16x32Slice(x)
4685 g := make([]float32, 16)
4686 f(a).StoreSlice(g)
4687 w := want(x)
4688 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4689 })
4690 }
4691
4692
4693
4694
4695 func testUint32x16ConvertToFloat32(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Float32x16, want func(x []uint32) []float32) {
4696 n := 16
4697 t.Helper()
4698 forSlice(t, uint32s, n, func(x []uint32) bool {
4699 t.Helper()
4700 a := archsimd.LoadUint32x16Slice(x)
4701 g := make([]float32, 16)
4702 f(a).StoreSlice(g)
4703 w := want(x)
4704 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4705 })
4706 }
4707
4708
4709
4710
4711 func testUint64x8ConvertToFloat32(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Float32x8, want func(x []uint64) []float32) {
4712 n := 8
4713 t.Helper()
4714 forSlice(t, uint64s, n, func(x []uint64) bool {
4715 t.Helper()
4716 a := archsimd.LoadUint64x8Slice(x)
4717 g := make([]float32, 8)
4718 f(a).StoreSlice(g)
4719 w := want(x)
4720 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4721 })
4722 }
4723
4724
4725
4726
4727 func testFloat32x16ConvertToFloat32(t *testing.T, f func(x archsimd.Float32x16) archsimd.Float32x16, want func(x []float32) []float32) {
4728 n := 16
4729 t.Helper()
4730 forSlice(t, float32s, n, func(x []float32) bool {
4731 t.Helper()
4732 a := archsimd.LoadFloat32x16Slice(x)
4733 g := make([]float32, 16)
4734 f(a).StoreSlice(g)
4735 w := want(x)
4736 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4737 })
4738 }
4739
4740
4741
4742
4743 func testFloat64x8ConvertToFloat32(t *testing.T, f func(x archsimd.Float64x8) archsimd.Float32x8, want func(x []float64) []float32) {
4744 n := 8
4745 t.Helper()
4746 forSlice(t, float64s, n, func(x []float64) bool {
4747 t.Helper()
4748 a := archsimd.LoadFloat64x8Slice(x)
4749 g := make([]float32, 8)
4750 f(a).StoreSlice(g)
4751 w := want(x)
4752 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4753 })
4754 }
4755
4756
4757
4758
4759 func testInt8x16ConvertToFloat64(t *testing.T, f func(x archsimd.Int8x16) archsimd.Float64x8, want func(x []int8) []float64) {
4760 n := 16
4761 t.Helper()
4762 forSlice(t, int8s, n, func(x []int8) bool {
4763 t.Helper()
4764 a := archsimd.LoadInt8x16Slice(x)
4765 g := make([]float64, 8)
4766 f(a).StoreSlice(g)
4767 w := want(x)
4768 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4769 })
4770 }
4771
4772
4773
4774
4775 func testInt16x8ConvertToFloat64(t *testing.T, f func(x archsimd.Int16x8) archsimd.Float64x8, want func(x []int16) []float64) {
4776 n := 8
4777 t.Helper()
4778 forSlice(t, int16s, n, func(x []int16) bool {
4779 t.Helper()
4780 a := archsimd.LoadInt16x8Slice(x)
4781 g := make([]float64, 8)
4782 f(a).StoreSlice(g)
4783 w := want(x)
4784 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4785 })
4786 }
4787
4788
4789
4790
4791 func testInt32x4ConvertToFloat64(t *testing.T, f func(x archsimd.Int32x4) archsimd.Float64x4, want func(x []int32) []float64) {
4792 n := 4
4793 t.Helper()
4794 forSlice(t, int32s, n, func(x []int32) bool {
4795 t.Helper()
4796 a := archsimd.LoadInt32x4Slice(x)
4797 g := make([]float64, 4)
4798 f(a).StoreSlice(g)
4799 w := want(x)
4800 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4801 })
4802 }
4803
4804
4805
4806
4807 func testInt64x2ConvertToFloat64(t *testing.T, f func(x archsimd.Int64x2) archsimd.Float64x2, want func(x []int64) []float64) {
4808 n := 2
4809 t.Helper()
4810 forSlice(t, int64s, n, func(x []int64) bool {
4811 t.Helper()
4812 a := archsimd.LoadInt64x2Slice(x)
4813 g := make([]float64, 2)
4814 f(a).StoreSlice(g)
4815 w := want(x)
4816 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4817 })
4818 }
4819
4820
4821
4822
4823 func testUint8x16ConvertToFloat64(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Float64x8, want func(x []uint8) []float64) {
4824 n := 16
4825 t.Helper()
4826 forSlice(t, uint8s, n, func(x []uint8) bool {
4827 t.Helper()
4828 a := archsimd.LoadUint8x16Slice(x)
4829 g := make([]float64, 8)
4830 f(a).StoreSlice(g)
4831 w := want(x)
4832 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4833 })
4834 }
4835
4836
4837
4838
4839 func testUint16x8ConvertToFloat64(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Float64x8, want func(x []uint16) []float64) {
4840 n := 8
4841 t.Helper()
4842 forSlice(t, uint16s, n, func(x []uint16) bool {
4843 t.Helper()
4844 a := archsimd.LoadUint16x8Slice(x)
4845 g := make([]float64, 8)
4846 f(a).StoreSlice(g)
4847 w := want(x)
4848 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4849 })
4850 }
4851
4852
4853
4854
4855 func testUint32x4ConvertToFloat64(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Float64x4, want func(x []uint32) []float64) {
4856 n := 4
4857 t.Helper()
4858 forSlice(t, uint32s, n, func(x []uint32) bool {
4859 t.Helper()
4860 a := archsimd.LoadUint32x4Slice(x)
4861 g := make([]float64, 4)
4862 f(a).StoreSlice(g)
4863 w := want(x)
4864 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4865 })
4866 }
4867
4868
4869
4870
4871 func testUint64x2ConvertToFloat64(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Float64x2, want func(x []uint64) []float64) {
4872 n := 2
4873 t.Helper()
4874 forSlice(t, uint64s, n, func(x []uint64) bool {
4875 t.Helper()
4876 a := archsimd.LoadUint64x2Slice(x)
4877 g := make([]float64, 2)
4878 f(a).StoreSlice(g)
4879 w := want(x)
4880 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4881 })
4882 }
4883
4884
4885
4886
4887 func testFloat32x4ConvertToFloat64(t *testing.T, f func(x archsimd.Float32x4) archsimd.Float64x4, want func(x []float32) []float64) {
4888 n := 4
4889 t.Helper()
4890 forSlice(t, float32s, n, func(x []float32) bool {
4891 t.Helper()
4892 a := archsimd.LoadFloat32x4Slice(x)
4893 g := make([]float64, 4)
4894 f(a).StoreSlice(g)
4895 w := want(x)
4896 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4897 })
4898 }
4899
4900
4901
4902
4903 func testFloat64x2ConvertToFloat64(t *testing.T, f func(x archsimd.Float64x2) archsimd.Float64x2, want func(x []float64) []float64) {
4904 n := 2
4905 t.Helper()
4906 forSlice(t, float64s, n, func(x []float64) bool {
4907 t.Helper()
4908 a := archsimd.LoadFloat64x2Slice(x)
4909 g := make([]float64, 2)
4910 f(a).StoreSlice(g)
4911 w := want(x)
4912 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4913 })
4914 }
4915
4916
4917
4918
4919 func testInt8x32ConvertToFloat64(t *testing.T, f func(x archsimd.Int8x32) archsimd.Float64x8, want func(x []int8) []float64) {
4920 n := 32
4921 t.Helper()
4922 forSlice(t, int8s, n, func(x []int8) bool {
4923 t.Helper()
4924 a := archsimd.LoadInt8x32Slice(x)
4925 g := make([]float64, 8)
4926 f(a).StoreSlice(g)
4927 w := want(x)
4928 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4929 })
4930 }
4931
4932
4933
4934
4935 func testInt16x16ConvertToFloat64(t *testing.T, f func(x archsimd.Int16x16) archsimd.Float64x8, want func(x []int16) []float64) {
4936 n := 16
4937 t.Helper()
4938 forSlice(t, int16s, n, func(x []int16) bool {
4939 t.Helper()
4940 a := archsimd.LoadInt16x16Slice(x)
4941 g := make([]float64, 8)
4942 f(a).StoreSlice(g)
4943 w := want(x)
4944 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4945 })
4946 }
4947
4948
4949
4950
4951 func testInt32x8ConvertToFloat64(t *testing.T, f func(x archsimd.Int32x8) archsimd.Float64x8, want func(x []int32) []float64) {
4952 n := 8
4953 t.Helper()
4954 forSlice(t, int32s, n, func(x []int32) bool {
4955 t.Helper()
4956 a := archsimd.LoadInt32x8Slice(x)
4957 g := make([]float64, 8)
4958 f(a).StoreSlice(g)
4959 w := want(x)
4960 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4961 })
4962 }
4963
4964
4965
4966
4967 func testInt64x4ConvertToFloat64(t *testing.T, f func(x archsimd.Int64x4) archsimd.Float64x4, want func(x []int64) []float64) {
4968 n := 4
4969 t.Helper()
4970 forSlice(t, int64s, n, func(x []int64) bool {
4971 t.Helper()
4972 a := archsimd.LoadInt64x4Slice(x)
4973 g := make([]float64, 4)
4974 f(a).StoreSlice(g)
4975 w := want(x)
4976 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4977 })
4978 }
4979
4980
4981
4982
4983 func testUint8x32ConvertToFloat64(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Float64x8, want func(x []uint8) []float64) {
4984 n := 32
4985 t.Helper()
4986 forSlice(t, uint8s, n, func(x []uint8) bool {
4987 t.Helper()
4988 a := archsimd.LoadUint8x32Slice(x)
4989 g := make([]float64, 8)
4990 f(a).StoreSlice(g)
4991 w := want(x)
4992 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
4993 })
4994 }
4995
4996
4997
4998
4999 func testUint16x16ConvertToFloat64(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Float64x8, want func(x []uint16) []float64) {
5000 n := 16
5001 t.Helper()
5002 forSlice(t, uint16s, n, func(x []uint16) bool {
5003 t.Helper()
5004 a := archsimd.LoadUint16x16Slice(x)
5005 g := make([]float64, 8)
5006 f(a).StoreSlice(g)
5007 w := want(x)
5008 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5009 })
5010 }
5011
5012
5013
5014
5015 func testUint32x8ConvertToFloat64(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Float64x8, want func(x []uint32) []float64) {
5016 n := 8
5017 t.Helper()
5018 forSlice(t, uint32s, n, func(x []uint32) bool {
5019 t.Helper()
5020 a := archsimd.LoadUint32x8Slice(x)
5021 g := make([]float64, 8)
5022 f(a).StoreSlice(g)
5023 w := want(x)
5024 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5025 })
5026 }
5027
5028
5029
5030
5031 func testUint64x4ConvertToFloat64(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Float64x4, want func(x []uint64) []float64) {
5032 n := 4
5033 t.Helper()
5034 forSlice(t, uint64s, n, func(x []uint64) bool {
5035 t.Helper()
5036 a := archsimd.LoadUint64x4Slice(x)
5037 g := make([]float64, 4)
5038 f(a).StoreSlice(g)
5039 w := want(x)
5040 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5041 })
5042 }
5043
5044
5045
5046
5047 func testFloat32x8ConvertToFloat64(t *testing.T, f func(x archsimd.Float32x8) archsimd.Float64x8, want func(x []float32) []float64) {
5048 n := 8
5049 t.Helper()
5050 forSlice(t, float32s, n, func(x []float32) bool {
5051 t.Helper()
5052 a := archsimd.LoadFloat32x8Slice(x)
5053 g := make([]float64, 8)
5054 f(a).StoreSlice(g)
5055 w := want(x)
5056 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5057 })
5058 }
5059
5060
5061
5062
5063 func testFloat64x4ConvertToFloat64(t *testing.T, f func(x archsimd.Float64x4) archsimd.Float64x4, want func(x []float64) []float64) {
5064 n := 4
5065 t.Helper()
5066 forSlice(t, float64s, n, func(x []float64) bool {
5067 t.Helper()
5068 a := archsimd.LoadFloat64x4Slice(x)
5069 g := make([]float64, 4)
5070 f(a).StoreSlice(g)
5071 w := want(x)
5072 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5073 })
5074 }
5075
5076
5077
5078
5079 func testInt8x64ConvertToFloat64(t *testing.T, f func(x archsimd.Int8x64) archsimd.Float64x8, want func(x []int8) []float64) {
5080 n := 64
5081 t.Helper()
5082 forSlice(t, int8s, n, func(x []int8) bool {
5083 t.Helper()
5084 a := archsimd.LoadInt8x64Slice(x)
5085 g := make([]float64, 8)
5086 f(a).StoreSlice(g)
5087 w := want(x)
5088 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5089 })
5090 }
5091
5092
5093
5094
5095 func testInt16x32ConvertToFloat64(t *testing.T, f func(x archsimd.Int16x32) archsimd.Float64x8, want func(x []int16) []float64) {
5096 n := 32
5097 t.Helper()
5098 forSlice(t, int16s, n, func(x []int16) bool {
5099 t.Helper()
5100 a := archsimd.LoadInt16x32Slice(x)
5101 g := make([]float64, 8)
5102 f(a).StoreSlice(g)
5103 w := want(x)
5104 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5105 })
5106 }
5107
5108
5109
5110
5111 func testInt32x16ConvertToFloat64(t *testing.T, f func(x archsimd.Int32x16) archsimd.Float64x8, want func(x []int32) []float64) {
5112 n := 16
5113 t.Helper()
5114 forSlice(t, int32s, n, func(x []int32) bool {
5115 t.Helper()
5116 a := archsimd.LoadInt32x16Slice(x)
5117 g := make([]float64, 8)
5118 f(a).StoreSlice(g)
5119 w := want(x)
5120 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5121 })
5122 }
5123
5124
5125
5126
5127 func testInt64x8ConvertToFloat64(t *testing.T, f func(x archsimd.Int64x8) archsimd.Float64x8, want func(x []int64) []float64) {
5128 n := 8
5129 t.Helper()
5130 forSlice(t, int64s, n, func(x []int64) bool {
5131 t.Helper()
5132 a := archsimd.LoadInt64x8Slice(x)
5133 g := make([]float64, 8)
5134 f(a).StoreSlice(g)
5135 w := want(x)
5136 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5137 })
5138 }
5139
5140
5141
5142
5143 func testUint8x64ConvertToFloat64(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Float64x8, want func(x []uint8) []float64) {
5144 n := 64
5145 t.Helper()
5146 forSlice(t, uint8s, n, func(x []uint8) bool {
5147 t.Helper()
5148 a := archsimd.LoadUint8x64Slice(x)
5149 g := make([]float64, 8)
5150 f(a).StoreSlice(g)
5151 w := want(x)
5152 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5153 })
5154 }
5155
5156
5157
5158
5159 func testUint16x32ConvertToFloat64(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Float64x8, want func(x []uint16) []float64) {
5160 n := 32
5161 t.Helper()
5162 forSlice(t, uint16s, n, func(x []uint16) bool {
5163 t.Helper()
5164 a := archsimd.LoadUint16x32Slice(x)
5165 g := make([]float64, 8)
5166 f(a).StoreSlice(g)
5167 w := want(x)
5168 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5169 })
5170 }
5171
5172
5173
5174
5175 func testUint32x16ConvertToFloat64(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Float64x8, want func(x []uint32) []float64) {
5176 n := 16
5177 t.Helper()
5178 forSlice(t, uint32s, n, func(x []uint32) bool {
5179 t.Helper()
5180 a := archsimd.LoadUint32x16Slice(x)
5181 g := make([]float64, 8)
5182 f(a).StoreSlice(g)
5183 w := want(x)
5184 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5185 })
5186 }
5187
5188
5189
5190
5191 func testUint64x8ConvertToFloat64(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Float64x8, want func(x []uint64) []float64) {
5192 n := 8
5193 t.Helper()
5194 forSlice(t, uint64s, n, func(x []uint64) bool {
5195 t.Helper()
5196 a := archsimd.LoadUint64x8Slice(x)
5197 g := make([]float64, 8)
5198 f(a).StoreSlice(g)
5199 w := want(x)
5200 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5201 })
5202 }
5203
5204
5205
5206
5207 func testFloat32x16ConvertToFloat64(t *testing.T, f func(x archsimd.Float32x16) archsimd.Float64x8, want func(x []float32) []float64) {
5208 n := 16
5209 t.Helper()
5210 forSlice(t, float32s, n, func(x []float32) bool {
5211 t.Helper()
5212 a := archsimd.LoadFloat32x16Slice(x)
5213 g := make([]float64, 8)
5214 f(a).StoreSlice(g)
5215 w := want(x)
5216 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5217 })
5218 }
5219
5220
5221
5222
5223 func testFloat64x8ConvertToFloat64(t *testing.T, f func(x archsimd.Float64x8) archsimd.Float64x8, want func(x []float64) []float64) {
5224 n := 8
5225 t.Helper()
5226 forSlice(t, float64s, n, func(x []float64) bool {
5227 t.Helper()
5228 a := archsimd.LoadFloat64x8Slice(x)
5229 g := make([]float64, 8)
5230 f(a).StoreSlice(g)
5231 w := want(x)
5232 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5233 })
5234 }
5235
5236
5237
5238 func testInt8x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int64x2, want func(x []int8) []int64) {
5239 n := 16
5240 t.Helper()
5241 forSlice(t, int8s, n, func(x []int8) bool {
5242 t.Helper()
5243 a := archsimd.LoadInt8x16Slice(x)
5244 g := make([]int64, 2)
5245 f(a).StoreSlice(g)
5246 w := want(x)
5247 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5248 })
5249 }
5250
5251
5252
5253 func testInt16x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int64x2, want func(x []int16) []int64) {
5254 n := 8
5255 t.Helper()
5256 forSlice(t, int16s, n, func(x []int16) bool {
5257 t.Helper()
5258 a := archsimd.LoadInt16x8Slice(x)
5259 g := make([]int64, 2)
5260 f(a).StoreSlice(g)
5261 w := want(x)
5262 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5263 })
5264 }
5265
5266
5267
5268 func testInt32x4ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int64x2, want func(x []int32) []int64) {
5269 n := 4
5270 t.Helper()
5271 forSlice(t, int32s, n, func(x []int32) bool {
5272 t.Helper()
5273 a := archsimd.LoadInt32x4Slice(x)
5274 g := make([]int64, 2)
5275 f(a).StoreSlice(g)
5276 w := want(x)
5277 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5278 })
5279 }
5280
5281
5282
5283 func testInt64x2ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int64x2, want func(x []int64) []int64) {
5284 n := 2
5285 t.Helper()
5286 forSlice(t, int64s, n, func(x []int64) bool {
5287 t.Helper()
5288 a := archsimd.LoadInt64x2Slice(x)
5289 g := make([]int64, 2)
5290 f(a).StoreSlice(g)
5291 w := want(x)
5292 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5293 })
5294 }
5295
5296
5297
5298 func testUint8x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int64x2, want func(x []uint8) []int64) {
5299 n := 16
5300 t.Helper()
5301 forSlice(t, uint8s, n, func(x []uint8) bool {
5302 t.Helper()
5303 a := archsimd.LoadUint8x16Slice(x)
5304 g := make([]int64, 2)
5305 f(a).StoreSlice(g)
5306 w := want(x)
5307 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5308 })
5309 }
5310
5311
5312
5313 func testUint16x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int64x2, want func(x []uint16) []int64) {
5314 n := 8
5315 t.Helper()
5316 forSlice(t, uint16s, n, func(x []uint16) bool {
5317 t.Helper()
5318 a := archsimd.LoadUint16x8Slice(x)
5319 g := make([]int64, 2)
5320 f(a).StoreSlice(g)
5321 w := want(x)
5322 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5323 })
5324 }
5325
5326
5327
5328 func testUint32x4ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int64x2, want func(x []uint32) []int64) {
5329 n := 4
5330 t.Helper()
5331 forSlice(t, uint32s, n, func(x []uint32) bool {
5332 t.Helper()
5333 a := archsimd.LoadUint32x4Slice(x)
5334 g := make([]int64, 2)
5335 f(a).StoreSlice(g)
5336 w := want(x)
5337 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5338 })
5339 }
5340
5341
5342
5343 func testUint64x2ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int64x2, want func(x []uint64) []int64) {
5344 n := 2
5345 t.Helper()
5346 forSlice(t, uint64s, n, func(x []uint64) bool {
5347 t.Helper()
5348 a := archsimd.LoadUint64x2Slice(x)
5349 g := make([]int64, 2)
5350 f(a).StoreSlice(g)
5351 w := want(x)
5352 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5353 })
5354 }
5355
5356
5357
5358 func testInt8x32ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int64x2, want func(x []int8) []int64) {
5359 n := 32
5360 t.Helper()
5361 forSlice(t, int8s, n, func(x []int8) bool {
5362 t.Helper()
5363 a := archsimd.LoadInt8x32Slice(x)
5364 g := make([]int64, 2)
5365 f(a).StoreSlice(g)
5366 w := want(x)
5367 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5368 })
5369 }
5370
5371
5372
5373 func testInt16x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int64x2, want func(x []int16) []int64) {
5374 n := 16
5375 t.Helper()
5376 forSlice(t, int16s, n, func(x []int16) bool {
5377 t.Helper()
5378 a := archsimd.LoadInt16x16Slice(x)
5379 g := make([]int64, 2)
5380 f(a).StoreSlice(g)
5381 w := want(x)
5382 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5383 })
5384 }
5385
5386
5387
5388 func testInt32x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int64x2, want func(x []int32) []int64) {
5389 n := 8
5390 t.Helper()
5391 forSlice(t, int32s, n, func(x []int32) bool {
5392 t.Helper()
5393 a := archsimd.LoadInt32x8Slice(x)
5394 g := make([]int64, 2)
5395 f(a).StoreSlice(g)
5396 w := want(x)
5397 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5398 })
5399 }
5400
5401
5402
5403 func testInt64x4ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int64x2, want func(x []int64) []int64) {
5404 n := 4
5405 t.Helper()
5406 forSlice(t, int64s, n, func(x []int64) bool {
5407 t.Helper()
5408 a := archsimd.LoadInt64x4Slice(x)
5409 g := make([]int64, 2)
5410 f(a).StoreSlice(g)
5411 w := want(x)
5412 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5413 })
5414 }
5415
5416
5417
5418 func testUint8x32ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int64x2, want func(x []uint8) []int64) {
5419 n := 32
5420 t.Helper()
5421 forSlice(t, uint8s, n, func(x []uint8) bool {
5422 t.Helper()
5423 a := archsimd.LoadUint8x32Slice(x)
5424 g := make([]int64, 2)
5425 f(a).StoreSlice(g)
5426 w := want(x)
5427 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5428 })
5429 }
5430
5431
5432
5433 func testUint16x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int64x2, want func(x []uint16) []int64) {
5434 n := 16
5435 t.Helper()
5436 forSlice(t, uint16s, n, func(x []uint16) bool {
5437 t.Helper()
5438 a := archsimd.LoadUint16x16Slice(x)
5439 g := make([]int64, 2)
5440 f(a).StoreSlice(g)
5441 w := want(x)
5442 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5443 })
5444 }
5445
5446
5447
5448 func testUint32x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int64x2, want func(x []uint32) []int64) {
5449 n := 8
5450 t.Helper()
5451 forSlice(t, uint32s, n, func(x []uint32) bool {
5452 t.Helper()
5453 a := archsimd.LoadUint32x8Slice(x)
5454 g := make([]int64, 2)
5455 f(a).StoreSlice(g)
5456 w := want(x)
5457 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5458 })
5459 }
5460
5461
5462
5463 func testUint64x4ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int64x2, want func(x []uint64) []int64) {
5464 n := 4
5465 t.Helper()
5466 forSlice(t, uint64s, n, func(x []uint64) bool {
5467 t.Helper()
5468 a := archsimd.LoadUint64x4Slice(x)
5469 g := make([]int64, 2)
5470 f(a).StoreSlice(g)
5471 w := want(x)
5472 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5473 })
5474 }
5475
5476
5477
5478 func testInt8x64ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int64x2, want func(x []int8) []int64) {
5479 n := 64
5480 t.Helper()
5481 forSlice(t, int8s, n, func(x []int8) bool {
5482 t.Helper()
5483 a := archsimd.LoadInt8x64Slice(x)
5484 g := make([]int64, 2)
5485 f(a).StoreSlice(g)
5486 w := want(x)
5487 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5488 })
5489 }
5490
5491
5492
5493 func testInt16x32ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int64x2, want func(x []int16) []int64) {
5494 n := 32
5495 t.Helper()
5496 forSlice(t, int16s, n, func(x []int16) bool {
5497 t.Helper()
5498 a := archsimd.LoadInt16x32Slice(x)
5499 g := make([]int64, 2)
5500 f(a).StoreSlice(g)
5501 w := want(x)
5502 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5503 })
5504 }
5505
5506
5507
5508 func testInt32x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int64x2, want func(x []int32) []int64) {
5509 n := 16
5510 t.Helper()
5511 forSlice(t, int32s, n, func(x []int32) bool {
5512 t.Helper()
5513 a := archsimd.LoadInt32x16Slice(x)
5514 g := make([]int64, 2)
5515 f(a).StoreSlice(g)
5516 w := want(x)
5517 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5518 })
5519 }
5520
5521
5522
5523 func testInt64x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int64x2, want func(x []int64) []int64) {
5524 n := 8
5525 t.Helper()
5526 forSlice(t, int64s, n, func(x []int64) bool {
5527 t.Helper()
5528 a := archsimd.LoadInt64x8Slice(x)
5529 g := make([]int64, 2)
5530 f(a).StoreSlice(g)
5531 w := want(x)
5532 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5533 })
5534 }
5535
5536
5537
5538 func testUint8x64ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int64x2, want func(x []uint8) []int64) {
5539 n := 64
5540 t.Helper()
5541 forSlice(t, uint8s, n, func(x []uint8) bool {
5542 t.Helper()
5543 a := archsimd.LoadUint8x64Slice(x)
5544 g := make([]int64, 2)
5545 f(a).StoreSlice(g)
5546 w := want(x)
5547 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5548 })
5549 }
5550
5551
5552
5553 func testUint16x32ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int64x2, want func(x []uint16) []int64) {
5554 n := 32
5555 t.Helper()
5556 forSlice(t, uint16s, n, func(x []uint16) bool {
5557 t.Helper()
5558 a := archsimd.LoadUint16x32Slice(x)
5559 g := make([]int64, 2)
5560 f(a).StoreSlice(g)
5561 w := want(x)
5562 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5563 })
5564 }
5565
5566
5567
5568 func testUint32x16ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int64x2, want func(x []uint32) []int64) {
5569 n := 16
5570 t.Helper()
5571 forSlice(t, uint32s, n, func(x []uint32) bool {
5572 t.Helper()
5573 a := archsimd.LoadUint32x16Slice(x)
5574 g := make([]int64, 2)
5575 f(a).StoreSlice(g)
5576 w := want(x)
5577 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5578 })
5579 }
5580
5581
5582
5583 func testUint64x8ConvertLoToInt64x2(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int64x2, want func(x []uint64) []int64) {
5584 n := 8
5585 t.Helper()
5586 forSlice(t, uint64s, n, func(x []uint64) bool {
5587 t.Helper()
5588 a := archsimd.LoadUint64x8Slice(x)
5589 g := make([]int64, 2)
5590 f(a).StoreSlice(g)
5591 w := want(x)
5592 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5593 })
5594 }
5595
5596
5597
5598 func testInt8x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int64x4, want func(x []int8) []int64) {
5599 n := 16
5600 t.Helper()
5601 forSlice(t, int8s, n, func(x []int8) bool {
5602 t.Helper()
5603 a := archsimd.LoadInt8x16Slice(x)
5604 g := make([]int64, 4)
5605 f(a).StoreSlice(g)
5606 w := want(x)
5607 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5608 })
5609 }
5610
5611
5612
5613 func testInt16x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int64x4, want func(x []int16) []int64) {
5614 n := 8
5615 t.Helper()
5616 forSlice(t, int16s, n, func(x []int16) bool {
5617 t.Helper()
5618 a := archsimd.LoadInt16x8Slice(x)
5619 g := make([]int64, 4)
5620 f(a).StoreSlice(g)
5621 w := want(x)
5622 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5623 })
5624 }
5625
5626
5627
5628 func testInt32x4ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int64x4, want func(x []int32) []int64) {
5629 n := 4
5630 t.Helper()
5631 forSlice(t, int32s, n, func(x []int32) bool {
5632 t.Helper()
5633 a := archsimd.LoadInt32x4Slice(x)
5634 g := make([]int64, 4)
5635 f(a).StoreSlice(g)
5636 w := want(x)
5637 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5638 })
5639 }
5640
5641
5642
5643 func testInt64x2ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int64x4, want func(x []int64) []int64) {
5644 n := 2
5645 t.Helper()
5646 forSlice(t, int64s, n, func(x []int64) bool {
5647 t.Helper()
5648 a := archsimd.LoadInt64x2Slice(x)
5649 g := make([]int64, 4)
5650 f(a).StoreSlice(g)
5651 w := want(x)
5652 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5653 })
5654 }
5655
5656
5657
5658 func testUint8x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int64x4, want func(x []uint8) []int64) {
5659 n := 16
5660 t.Helper()
5661 forSlice(t, uint8s, n, func(x []uint8) bool {
5662 t.Helper()
5663 a := archsimd.LoadUint8x16Slice(x)
5664 g := make([]int64, 4)
5665 f(a).StoreSlice(g)
5666 w := want(x)
5667 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5668 })
5669 }
5670
5671
5672
5673 func testUint16x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int64x4, want func(x []uint16) []int64) {
5674 n := 8
5675 t.Helper()
5676 forSlice(t, uint16s, n, func(x []uint16) bool {
5677 t.Helper()
5678 a := archsimd.LoadUint16x8Slice(x)
5679 g := make([]int64, 4)
5680 f(a).StoreSlice(g)
5681 w := want(x)
5682 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5683 })
5684 }
5685
5686
5687
5688 func testUint32x4ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int64x4, want func(x []uint32) []int64) {
5689 n := 4
5690 t.Helper()
5691 forSlice(t, uint32s, n, func(x []uint32) bool {
5692 t.Helper()
5693 a := archsimd.LoadUint32x4Slice(x)
5694 g := make([]int64, 4)
5695 f(a).StoreSlice(g)
5696 w := want(x)
5697 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5698 })
5699 }
5700
5701
5702
5703 func testUint64x2ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int64x4, want func(x []uint64) []int64) {
5704 n := 2
5705 t.Helper()
5706 forSlice(t, uint64s, n, func(x []uint64) bool {
5707 t.Helper()
5708 a := archsimd.LoadUint64x2Slice(x)
5709 g := make([]int64, 4)
5710 f(a).StoreSlice(g)
5711 w := want(x)
5712 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5713 })
5714 }
5715
5716
5717
5718 func testInt8x32ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int64x4, want func(x []int8) []int64) {
5719 n := 32
5720 t.Helper()
5721 forSlice(t, int8s, n, func(x []int8) bool {
5722 t.Helper()
5723 a := archsimd.LoadInt8x32Slice(x)
5724 g := make([]int64, 4)
5725 f(a).StoreSlice(g)
5726 w := want(x)
5727 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5728 })
5729 }
5730
5731
5732
5733 func testInt16x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int64x4, want func(x []int16) []int64) {
5734 n := 16
5735 t.Helper()
5736 forSlice(t, int16s, n, func(x []int16) bool {
5737 t.Helper()
5738 a := archsimd.LoadInt16x16Slice(x)
5739 g := make([]int64, 4)
5740 f(a).StoreSlice(g)
5741 w := want(x)
5742 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5743 })
5744 }
5745
5746
5747
5748 func testInt32x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int64x4, want func(x []int32) []int64) {
5749 n := 8
5750 t.Helper()
5751 forSlice(t, int32s, n, func(x []int32) bool {
5752 t.Helper()
5753 a := archsimd.LoadInt32x8Slice(x)
5754 g := make([]int64, 4)
5755 f(a).StoreSlice(g)
5756 w := want(x)
5757 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5758 })
5759 }
5760
5761
5762
5763 func testInt64x4ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int64x4, want func(x []int64) []int64) {
5764 n := 4
5765 t.Helper()
5766 forSlice(t, int64s, n, func(x []int64) bool {
5767 t.Helper()
5768 a := archsimd.LoadInt64x4Slice(x)
5769 g := make([]int64, 4)
5770 f(a).StoreSlice(g)
5771 w := want(x)
5772 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5773 })
5774 }
5775
5776
5777
5778 func testUint8x32ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int64x4, want func(x []uint8) []int64) {
5779 n := 32
5780 t.Helper()
5781 forSlice(t, uint8s, n, func(x []uint8) bool {
5782 t.Helper()
5783 a := archsimd.LoadUint8x32Slice(x)
5784 g := make([]int64, 4)
5785 f(a).StoreSlice(g)
5786 w := want(x)
5787 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5788 })
5789 }
5790
5791
5792
5793 func testUint16x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int64x4, want func(x []uint16) []int64) {
5794 n := 16
5795 t.Helper()
5796 forSlice(t, uint16s, n, func(x []uint16) bool {
5797 t.Helper()
5798 a := archsimd.LoadUint16x16Slice(x)
5799 g := make([]int64, 4)
5800 f(a).StoreSlice(g)
5801 w := want(x)
5802 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5803 })
5804 }
5805
5806
5807
5808 func testUint32x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int64x4, want func(x []uint32) []int64) {
5809 n := 8
5810 t.Helper()
5811 forSlice(t, uint32s, n, func(x []uint32) bool {
5812 t.Helper()
5813 a := archsimd.LoadUint32x8Slice(x)
5814 g := make([]int64, 4)
5815 f(a).StoreSlice(g)
5816 w := want(x)
5817 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5818 })
5819 }
5820
5821
5822
5823 func testUint64x4ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int64x4, want func(x []uint64) []int64) {
5824 n := 4
5825 t.Helper()
5826 forSlice(t, uint64s, n, func(x []uint64) bool {
5827 t.Helper()
5828 a := archsimd.LoadUint64x4Slice(x)
5829 g := make([]int64, 4)
5830 f(a).StoreSlice(g)
5831 w := want(x)
5832 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5833 })
5834 }
5835
5836
5837
5838 func testInt8x64ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int64x4, want func(x []int8) []int64) {
5839 n := 64
5840 t.Helper()
5841 forSlice(t, int8s, n, func(x []int8) bool {
5842 t.Helper()
5843 a := archsimd.LoadInt8x64Slice(x)
5844 g := make([]int64, 4)
5845 f(a).StoreSlice(g)
5846 w := want(x)
5847 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5848 })
5849 }
5850
5851
5852
5853 func testInt16x32ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int64x4, want func(x []int16) []int64) {
5854 n := 32
5855 t.Helper()
5856 forSlice(t, int16s, n, func(x []int16) bool {
5857 t.Helper()
5858 a := archsimd.LoadInt16x32Slice(x)
5859 g := make([]int64, 4)
5860 f(a).StoreSlice(g)
5861 w := want(x)
5862 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5863 })
5864 }
5865
5866
5867
5868 func testInt32x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int64x4, want func(x []int32) []int64) {
5869 n := 16
5870 t.Helper()
5871 forSlice(t, int32s, n, func(x []int32) bool {
5872 t.Helper()
5873 a := archsimd.LoadInt32x16Slice(x)
5874 g := make([]int64, 4)
5875 f(a).StoreSlice(g)
5876 w := want(x)
5877 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5878 })
5879 }
5880
5881
5882
5883 func testInt64x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int64x4, want func(x []int64) []int64) {
5884 n := 8
5885 t.Helper()
5886 forSlice(t, int64s, n, func(x []int64) bool {
5887 t.Helper()
5888 a := archsimd.LoadInt64x8Slice(x)
5889 g := make([]int64, 4)
5890 f(a).StoreSlice(g)
5891 w := want(x)
5892 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5893 })
5894 }
5895
5896
5897
5898 func testUint8x64ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int64x4, want func(x []uint8) []int64) {
5899 n := 64
5900 t.Helper()
5901 forSlice(t, uint8s, n, func(x []uint8) bool {
5902 t.Helper()
5903 a := archsimd.LoadUint8x64Slice(x)
5904 g := make([]int64, 4)
5905 f(a).StoreSlice(g)
5906 w := want(x)
5907 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5908 })
5909 }
5910
5911
5912
5913 func testUint16x32ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int64x4, want func(x []uint16) []int64) {
5914 n := 32
5915 t.Helper()
5916 forSlice(t, uint16s, n, func(x []uint16) bool {
5917 t.Helper()
5918 a := archsimd.LoadUint16x32Slice(x)
5919 g := make([]int64, 4)
5920 f(a).StoreSlice(g)
5921 w := want(x)
5922 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5923 })
5924 }
5925
5926
5927
5928 func testUint32x16ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int64x4, want func(x []uint32) []int64) {
5929 n := 16
5930 t.Helper()
5931 forSlice(t, uint32s, n, func(x []uint32) bool {
5932 t.Helper()
5933 a := archsimd.LoadUint32x16Slice(x)
5934 g := make([]int64, 4)
5935 f(a).StoreSlice(g)
5936 w := want(x)
5937 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5938 })
5939 }
5940
5941
5942
5943 func testUint64x8ConvertLoToInt64x4(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int64x4, want func(x []uint64) []int64) {
5944 n := 8
5945 t.Helper()
5946 forSlice(t, uint64s, n, func(x []uint64) bool {
5947 t.Helper()
5948 a := archsimd.LoadUint64x8Slice(x)
5949 g := make([]int64, 4)
5950 f(a).StoreSlice(g)
5951 w := want(x)
5952 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5953 })
5954 }
5955
5956
5957
5958 func testInt8x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint64x2, want func(x []int8) []uint64) {
5959 n := 16
5960 t.Helper()
5961 forSlice(t, int8s, n, func(x []int8) bool {
5962 t.Helper()
5963 a := archsimd.LoadInt8x16Slice(x)
5964 g := make([]uint64, 2)
5965 f(a).StoreSlice(g)
5966 w := want(x)
5967 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5968 })
5969 }
5970
5971
5972
5973 func testInt16x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint64x2, want func(x []int16) []uint64) {
5974 n := 8
5975 t.Helper()
5976 forSlice(t, int16s, n, func(x []int16) bool {
5977 t.Helper()
5978 a := archsimd.LoadInt16x8Slice(x)
5979 g := make([]uint64, 2)
5980 f(a).StoreSlice(g)
5981 w := want(x)
5982 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5983 })
5984 }
5985
5986
5987
5988 func testInt32x4ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint64x2, want func(x []int32) []uint64) {
5989 n := 4
5990 t.Helper()
5991 forSlice(t, int32s, n, func(x []int32) bool {
5992 t.Helper()
5993 a := archsimd.LoadInt32x4Slice(x)
5994 g := make([]uint64, 2)
5995 f(a).StoreSlice(g)
5996 w := want(x)
5997 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
5998 })
5999 }
6000
6001
6002
6003 func testInt64x2ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint64x2, want func(x []int64) []uint64) {
6004 n := 2
6005 t.Helper()
6006 forSlice(t, int64s, n, func(x []int64) bool {
6007 t.Helper()
6008 a := archsimd.LoadInt64x2Slice(x)
6009 g := make([]uint64, 2)
6010 f(a).StoreSlice(g)
6011 w := want(x)
6012 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6013 })
6014 }
6015
6016
6017
6018 func testUint8x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint64x2, want func(x []uint8) []uint64) {
6019 n := 16
6020 t.Helper()
6021 forSlice(t, uint8s, n, func(x []uint8) bool {
6022 t.Helper()
6023 a := archsimd.LoadUint8x16Slice(x)
6024 g := make([]uint64, 2)
6025 f(a).StoreSlice(g)
6026 w := want(x)
6027 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6028 })
6029 }
6030
6031
6032
6033 func testUint16x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint64x2, want func(x []uint16) []uint64) {
6034 n := 8
6035 t.Helper()
6036 forSlice(t, uint16s, n, func(x []uint16) bool {
6037 t.Helper()
6038 a := archsimd.LoadUint16x8Slice(x)
6039 g := make([]uint64, 2)
6040 f(a).StoreSlice(g)
6041 w := want(x)
6042 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6043 })
6044 }
6045
6046
6047
6048 func testUint32x4ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint64x2, want func(x []uint32) []uint64) {
6049 n := 4
6050 t.Helper()
6051 forSlice(t, uint32s, n, func(x []uint32) bool {
6052 t.Helper()
6053 a := archsimd.LoadUint32x4Slice(x)
6054 g := make([]uint64, 2)
6055 f(a).StoreSlice(g)
6056 w := want(x)
6057 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6058 })
6059 }
6060
6061
6062
6063 func testUint64x2ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint64x2, want func(x []uint64) []uint64) {
6064 n := 2
6065 t.Helper()
6066 forSlice(t, uint64s, n, func(x []uint64) bool {
6067 t.Helper()
6068 a := archsimd.LoadUint64x2Slice(x)
6069 g := make([]uint64, 2)
6070 f(a).StoreSlice(g)
6071 w := want(x)
6072 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6073 })
6074 }
6075
6076
6077
6078 func testInt8x32ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint64x2, want func(x []int8) []uint64) {
6079 n := 32
6080 t.Helper()
6081 forSlice(t, int8s, n, func(x []int8) bool {
6082 t.Helper()
6083 a := archsimd.LoadInt8x32Slice(x)
6084 g := make([]uint64, 2)
6085 f(a).StoreSlice(g)
6086 w := want(x)
6087 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6088 })
6089 }
6090
6091
6092
6093 func testInt16x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint64x2, want func(x []int16) []uint64) {
6094 n := 16
6095 t.Helper()
6096 forSlice(t, int16s, n, func(x []int16) bool {
6097 t.Helper()
6098 a := archsimd.LoadInt16x16Slice(x)
6099 g := make([]uint64, 2)
6100 f(a).StoreSlice(g)
6101 w := want(x)
6102 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6103 })
6104 }
6105
6106
6107
6108 func testInt32x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint64x2, want func(x []int32) []uint64) {
6109 n := 8
6110 t.Helper()
6111 forSlice(t, int32s, n, func(x []int32) bool {
6112 t.Helper()
6113 a := archsimd.LoadInt32x8Slice(x)
6114 g := make([]uint64, 2)
6115 f(a).StoreSlice(g)
6116 w := want(x)
6117 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6118 })
6119 }
6120
6121
6122
6123 func testInt64x4ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint64x2, want func(x []int64) []uint64) {
6124 n := 4
6125 t.Helper()
6126 forSlice(t, int64s, n, func(x []int64) bool {
6127 t.Helper()
6128 a := archsimd.LoadInt64x4Slice(x)
6129 g := make([]uint64, 2)
6130 f(a).StoreSlice(g)
6131 w := want(x)
6132 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6133 })
6134 }
6135
6136
6137
6138 func testUint8x32ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint64x2, want func(x []uint8) []uint64) {
6139 n := 32
6140 t.Helper()
6141 forSlice(t, uint8s, n, func(x []uint8) bool {
6142 t.Helper()
6143 a := archsimd.LoadUint8x32Slice(x)
6144 g := make([]uint64, 2)
6145 f(a).StoreSlice(g)
6146 w := want(x)
6147 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6148 })
6149 }
6150
6151
6152
6153 func testUint16x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint64x2, want func(x []uint16) []uint64) {
6154 n := 16
6155 t.Helper()
6156 forSlice(t, uint16s, n, func(x []uint16) bool {
6157 t.Helper()
6158 a := archsimd.LoadUint16x16Slice(x)
6159 g := make([]uint64, 2)
6160 f(a).StoreSlice(g)
6161 w := want(x)
6162 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6163 })
6164 }
6165
6166
6167
6168 func testUint32x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint64x2, want func(x []uint32) []uint64) {
6169 n := 8
6170 t.Helper()
6171 forSlice(t, uint32s, n, func(x []uint32) bool {
6172 t.Helper()
6173 a := archsimd.LoadUint32x8Slice(x)
6174 g := make([]uint64, 2)
6175 f(a).StoreSlice(g)
6176 w := want(x)
6177 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6178 })
6179 }
6180
6181
6182
6183 func testUint64x4ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint64x2, want func(x []uint64) []uint64) {
6184 n := 4
6185 t.Helper()
6186 forSlice(t, uint64s, n, func(x []uint64) bool {
6187 t.Helper()
6188 a := archsimd.LoadUint64x4Slice(x)
6189 g := make([]uint64, 2)
6190 f(a).StoreSlice(g)
6191 w := want(x)
6192 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6193 })
6194 }
6195
6196
6197
6198 func testInt8x64ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint64x2, want func(x []int8) []uint64) {
6199 n := 64
6200 t.Helper()
6201 forSlice(t, int8s, n, func(x []int8) bool {
6202 t.Helper()
6203 a := archsimd.LoadInt8x64Slice(x)
6204 g := make([]uint64, 2)
6205 f(a).StoreSlice(g)
6206 w := want(x)
6207 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6208 })
6209 }
6210
6211
6212
6213 func testInt16x32ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint64x2, want func(x []int16) []uint64) {
6214 n := 32
6215 t.Helper()
6216 forSlice(t, int16s, n, func(x []int16) bool {
6217 t.Helper()
6218 a := archsimd.LoadInt16x32Slice(x)
6219 g := make([]uint64, 2)
6220 f(a).StoreSlice(g)
6221 w := want(x)
6222 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6223 })
6224 }
6225
6226
6227
6228 func testInt32x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint64x2, want func(x []int32) []uint64) {
6229 n := 16
6230 t.Helper()
6231 forSlice(t, int32s, n, func(x []int32) bool {
6232 t.Helper()
6233 a := archsimd.LoadInt32x16Slice(x)
6234 g := make([]uint64, 2)
6235 f(a).StoreSlice(g)
6236 w := want(x)
6237 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6238 })
6239 }
6240
6241
6242
6243 func testInt64x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint64x2, want func(x []int64) []uint64) {
6244 n := 8
6245 t.Helper()
6246 forSlice(t, int64s, n, func(x []int64) bool {
6247 t.Helper()
6248 a := archsimd.LoadInt64x8Slice(x)
6249 g := make([]uint64, 2)
6250 f(a).StoreSlice(g)
6251 w := want(x)
6252 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6253 })
6254 }
6255
6256
6257
6258 func testUint8x64ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint64x2, want func(x []uint8) []uint64) {
6259 n := 64
6260 t.Helper()
6261 forSlice(t, uint8s, n, func(x []uint8) bool {
6262 t.Helper()
6263 a := archsimd.LoadUint8x64Slice(x)
6264 g := make([]uint64, 2)
6265 f(a).StoreSlice(g)
6266 w := want(x)
6267 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6268 })
6269 }
6270
6271
6272
6273 func testUint16x32ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint64x2, want func(x []uint16) []uint64) {
6274 n := 32
6275 t.Helper()
6276 forSlice(t, uint16s, n, func(x []uint16) bool {
6277 t.Helper()
6278 a := archsimd.LoadUint16x32Slice(x)
6279 g := make([]uint64, 2)
6280 f(a).StoreSlice(g)
6281 w := want(x)
6282 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6283 })
6284 }
6285
6286
6287
6288 func testUint32x16ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint64x2, want func(x []uint32) []uint64) {
6289 n := 16
6290 t.Helper()
6291 forSlice(t, uint32s, n, func(x []uint32) bool {
6292 t.Helper()
6293 a := archsimd.LoadUint32x16Slice(x)
6294 g := make([]uint64, 2)
6295 f(a).StoreSlice(g)
6296 w := want(x)
6297 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6298 })
6299 }
6300
6301
6302
6303 func testUint64x8ConvertLoToUint64x2(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint64x2, want func(x []uint64) []uint64) {
6304 n := 8
6305 t.Helper()
6306 forSlice(t, uint64s, n, func(x []uint64) bool {
6307 t.Helper()
6308 a := archsimd.LoadUint64x8Slice(x)
6309 g := make([]uint64, 2)
6310 f(a).StoreSlice(g)
6311 w := want(x)
6312 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6313 })
6314 }
6315
6316
6317
6318 func testInt8x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint64x4, want func(x []int8) []uint64) {
6319 n := 16
6320 t.Helper()
6321 forSlice(t, int8s, n, func(x []int8) bool {
6322 t.Helper()
6323 a := archsimd.LoadInt8x16Slice(x)
6324 g := make([]uint64, 4)
6325 f(a).StoreSlice(g)
6326 w := want(x)
6327 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6328 })
6329 }
6330
6331
6332
6333 func testInt16x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint64x4, want func(x []int16) []uint64) {
6334 n := 8
6335 t.Helper()
6336 forSlice(t, int16s, n, func(x []int16) bool {
6337 t.Helper()
6338 a := archsimd.LoadInt16x8Slice(x)
6339 g := make([]uint64, 4)
6340 f(a).StoreSlice(g)
6341 w := want(x)
6342 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6343 })
6344 }
6345
6346
6347
6348 func testInt32x4ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint64x4, want func(x []int32) []uint64) {
6349 n := 4
6350 t.Helper()
6351 forSlice(t, int32s, n, func(x []int32) bool {
6352 t.Helper()
6353 a := archsimd.LoadInt32x4Slice(x)
6354 g := make([]uint64, 4)
6355 f(a).StoreSlice(g)
6356 w := want(x)
6357 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6358 })
6359 }
6360
6361
6362
6363 func testInt64x2ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint64x4, want func(x []int64) []uint64) {
6364 n := 2
6365 t.Helper()
6366 forSlice(t, int64s, n, func(x []int64) bool {
6367 t.Helper()
6368 a := archsimd.LoadInt64x2Slice(x)
6369 g := make([]uint64, 4)
6370 f(a).StoreSlice(g)
6371 w := want(x)
6372 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6373 })
6374 }
6375
6376
6377
6378 func testUint8x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint64x4, want func(x []uint8) []uint64) {
6379 n := 16
6380 t.Helper()
6381 forSlice(t, uint8s, n, func(x []uint8) bool {
6382 t.Helper()
6383 a := archsimd.LoadUint8x16Slice(x)
6384 g := make([]uint64, 4)
6385 f(a).StoreSlice(g)
6386 w := want(x)
6387 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6388 })
6389 }
6390
6391
6392
6393 func testUint16x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint64x4, want func(x []uint16) []uint64) {
6394 n := 8
6395 t.Helper()
6396 forSlice(t, uint16s, n, func(x []uint16) bool {
6397 t.Helper()
6398 a := archsimd.LoadUint16x8Slice(x)
6399 g := make([]uint64, 4)
6400 f(a).StoreSlice(g)
6401 w := want(x)
6402 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6403 })
6404 }
6405
6406
6407
6408 func testUint32x4ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint64x4, want func(x []uint32) []uint64) {
6409 n := 4
6410 t.Helper()
6411 forSlice(t, uint32s, n, func(x []uint32) bool {
6412 t.Helper()
6413 a := archsimd.LoadUint32x4Slice(x)
6414 g := make([]uint64, 4)
6415 f(a).StoreSlice(g)
6416 w := want(x)
6417 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6418 })
6419 }
6420
6421
6422
6423 func testUint64x2ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint64x4, want func(x []uint64) []uint64) {
6424 n := 2
6425 t.Helper()
6426 forSlice(t, uint64s, n, func(x []uint64) bool {
6427 t.Helper()
6428 a := archsimd.LoadUint64x2Slice(x)
6429 g := make([]uint64, 4)
6430 f(a).StoreSlice(g)
6431 w := want(x)
6432 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6433 })
6434 }
6435
6436
6437
6438 func testInt8x32ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint64x4, want func(x []int8) []uint64) {
6439 n := 32
6440 t.Helper()
6441 forSlice(t, int8s, n, func(x []int8) bool {
6442 t.Helper()
6443 a := archsimd.LoadInt8x32Slice(x)
6444 g := make([]uint64, 4)
6445 f(a).StoreSlice(g)
6446 w := want(x)
6447 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6448 })
6449 }
6450
6451
6452
6453 func testInt16x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint64x4, want func(x []int16) []uint64) {
6454 n := 16
6455 t.Helper()
6456 forSlice(t, int16s, n, func(x []int16) bool {
6457 t.Helper()
6458 a := archsimd.LoadInt16x16Slice(x)
6459 g := make([]uint64, 4)
6460 f(a).StoreSlice(g)
6461 w := want(x)
6462 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6463 })
6464 }
6465
6466
6467
6468 func testInt32x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint64x4, want func(x []int32) []uint64) {
6469 n := 8
6470 t.Helper()
6471 forSlice(t, int32s, n, func(x []int32) bool {
6472 t.Helper()
6473 a := archsimd.LoadInt32x8Slice(x)
6474 g := make([]uint64, 4)
6475 f(a).StoreSlice(g)
6476 w := want(x)
6477 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6478 })
6479 }
6480
6481
6482
6483 func testInt64x4ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint64x4, want func(x []int64) []uint64) {
6484 n := 4
6485 t.Helper()
6486 forSlice(t, int64s, n, func(x []int64) bool {
6487 t.Helper()
6488 a := archsimd.LoadInt64x4Slice(x)
6489 g := make([]uint64, 4)
6490 f(a).StoreSlice(g)
6491 w := want(x)
6492 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6493 })
6494 }
6495
6496
6497
6498 func testUint8x32ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint64x4, want func(x []uint8) []uint64) {
6499 n := 32
6500 t.Helper()
6501 forSlice(t, uint8s, n, func(x []uint8) bool {
6502 t.Helper()
6503 a := archsimd.LoadUint8x32Slice(x)
6504 g := make([]uint64, 4)
6505 f(a).StoreSlice(g)
6506 w := want(x)
6507 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6508 })
6509 }
6510
6511
6512
6513 func testUint16x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint64x4, want func(x []uint16) []uint64) {
6514 n := 16
6515 t.Helper()
6516 forSlice(t, uint16s, n, func(x []uint16) bool {
6517 t.Helper()
6518 a := archsimd.LoadUint16x16Slice(x)
6519 g := make([]uint64, 4)
6520 f(a).StoreSlice(g)
6521 w := want(x)
6522 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6523 })
6524 }
6525
6526
6527
6528 func testUint32x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint64x4, want func(x []uint32) []uint64) {
6529 n := 8
6530 t.Helper()
6531 forSlice(t, uint32s, n, func(x []uint32) bool {
6532 t.Helper()
6533 a := archsimd.LoadUint32x8Slice(x)
6534 g := make([]uint64, 4)
6535 f(a).StoreSlice(g)
6536 w := want(x)
6537 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6538 })
6539 }
6540
6541
6542
6543 func testUint64x4ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint64x4, want func(x []uint64) []uint64) {
6544 n := 4
6545 t.Helper()
6546 forSlice(t, uint64s, n, func(x []uint64) bool {
6547 t.Helper()
6548 a := archsimd.LoadUint64x4Slice(x)
6549 g := make([]uint64, 4)
6550 f(a).StoreSlice(g)
6551 w := want(x)
6552 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6553 })
6554 }
6555
6556
6557
6558 func testInt8x64ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint64x4, want func(x []int8) []uint64) {
6559 n := 64
6560 t.Helper()
6561 forSlice(t, int8s, n, func(x []int8) bool {
6562 t.Helper()
6563 a := archsimd.LoadInt8x64Slice(x)
6564 g := make([]uint64, 4)
6565 f(a).StoreSlice(g)
6566 w := want(x)
6567 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6568 })
6569 }
6570
6571
6572
6573 func testInt16x32ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint64x4, want func(x []int16) []uint64) {
6574 n := 32
6575 t.Helper()
6576 forSlice(t, int16s, n, func(x []int16) bool {
6577 t.Helper()
6578 a := archsimd.LoadInt16x32Slice(x)
6579 g := make([]uint64, 4)
6580 f(a).StoreSlice(g)
6581 w := want(x)
6582 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6583 })
6584 }
6585
6586
6587
6588 func testInt32x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint64x4, want func(x []int32) []uint64) {
6589 n := 16
6590 t.Helper()
6591 forSlice(t, int32s, n, func(x []int32) bool {
6592 t.Helper()
6593 a := archsimd.LoadInt32x16Slice(x)
6594 g := make([]uint64, 4)
6595 f(a).StoreSlice(g)
6596 w := want(x)
6597 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6598 })
6599 }
6600
6601
6602
6603 func testInt64x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint64x4, want func(x []int64) []uint64) {
6604 n := 8
6605 t.Helper()
6606 forSlice(t, int64s, n, func(x []int64) bool {
6607 t.Helper()
6608 a := archsimd.LoadInt64x8Slice(x)
6609 g := make([]uint64, 4)
6610 f(a).StoreSlice(g)
6611 w := want(x)
6612 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6613 })
6614 }
6615
6616
6617
6618 func testUint8x64ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint64x4, want func(x []uint8) []uint64) {
6619 n := 64
6620 t.Helper()
6621 forSlice(t, uint8s, n, func(x []uint8) bool {
6622 t.Helper()
6623 a := archsimd.LoadUint8x64Slice(x)
6624 g := make([]uint64, 4)
6625 f(a).StoreSlice(g)
6626 w := want(x)
6627 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6628 })
6629 }
6630
6631
6632
6633 func testUint16x32ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint64x4, want func(x []uint16) []uint64) {
6634 n := 32
6635 t.Helper()
6636 forSlice(t, uint16s, n, func(x []uint16) bool {
6637 t.Helper()
6638 a := archsimd.LoadUint16x32Slice(x)
6639 g := make([]uint64, 4)
6640 f(a).StoreSlice(g)
6641 w := want(x)
6642 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6643 })
6644 }
6645
6646
6647
6648 func testUint32x16ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint64x4, want func(x []uint32) []uint64) {
6649 n := 16
6650 t.Helper()
6651 forSlice(t, uint32s, n, func(x []uint32) bool {
6652 t.Helper()
6653 a := archsimd.LoadUint32x16Slice(x)
6654 g := make([]uint64, 4)
6655 f(a).StoreSlice(g)
6656 w := want(x)
6657 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6658 })
6659 }
6660
6661
6662
6663 func testUint64x8ConvertLoToUint64x4(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint64x4, want func(x []uint64) []uint64) {
6664 n := 8
6665 t.Helper()
6666 forSlice(t, uint64s, n, func(x []uint64) bool {
6667 t.Helper()
6668 a := archsimd.LoadUint64x8Slice(x)
6669 g := make([]uint64, 4)
6670 f(a).StoreSlice(g)
6671 w := want(x)
6672 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6673 })
6674 }
6675
6676
6677
6678 func testInt8x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int32x4, want func(x []int8) []int32) {
6679 n := 16
6680 t.Helper()
6681 forSlice(t, int8s, n, func(x []int8) bool {
6682 t.Helper()
6683 a := archsimd.LoadInt8x16Slice(x)
6684 g := make([]int32, 4)
6685 f(a).StoreSlice(g)
6686 w := want(x)
6687 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6688 })
6689 }
6690
6691
6692
6693 func testInt16x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int32x4, want func(x []int16) []int32) {
6694 n := 8
6695 t.Helper()
6696 forSlice(t, int16s, n, func(x []int16) bool {
6697 t.Helper()
6698 a := archsimd.LoadInt16x8Slice(x)
6699 g := make([]int32, 4)
6700 f(a).StoreSlice(g)
6701 w := want(x)
6702 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6703 })
6704 }
6705
6706
6707
6708 func testInt32x4ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int32x4, want func(x []int32) []int32) {
6709 n := 4
6710 t.Helper()
6711 forSlice(t, int32s, n, func(x []int32) bool {
6712 t.Helper()
6713 a := archsimd.LoadInt32x4Slice(x)
6714 g := make([]int32, 4)
6715 f(a).StoreSlice(g)
6716 w := want(x)
6717 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6718 })
6719 }
6720
6721
6722
6723 func testInt64x2ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int32x4, want func(x []int64) []int32) {
6724 n := 2
6725 t.Helper()
6726 forSlice(t, int64s, n, func(x []int64) bool {
6727 t.Helper()
6728 a := archsimd.LoadInt64x2Slice(x)
6729 g := make([]int32, 4)
6730 f(a).StoreSlice(g)
6731 w := want(x)
6732 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6733 })
6734 }
6735
6736
6737
6738 func testUint8x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int32x4, want func(x []uint8) []int32) {
6739 n := 16
6740 t.Helper()
6741 forSlice(t, uint8s, n, func(x []uint8) bool {
6742 t.Helper()
6743 a := archsimd.LoadUint8x16Slice(x)
6744 g := make([]int32, 4)
6745 f(a).StoreSlice(g)
6746 w := want(x)
6747 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6748 })
6749 }
6750
6751
6752
6753 func testUint16x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int32x4, want func(x []uint16) []int32) {
6754 n := 8
6755 t.Helper()
6756 forSlice(t, uint16s, n, func(x []uint16) bool {
6757 t.Helper()
6758 a := archsimd.LoadUint16x8Slice(x)
6759 g := make([]int32, 4)
6760 f(a).StoreSlice(g)
6761 w := want(x)
6762 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6763 })
6764 }
6765
6766
6767
6768 func testUint32x4ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int32x4, want func(x []uint32) []int32) {
6769 n := 4
6770 t.Helper()
6771 forSlice(t, uint32s, n, func(x []uint32) bool {
6772 t.Helper()
6773 a := archsimd.LoadUint32x4Slice(x)
6774 g := make([]int32, 4)
6775 f(a).StoreSlice(g)
6776 w := want(x)
6777 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6778 })
6779 }
6780
6781
6782
6783 func testUint64x2ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int32x4, want func(x []uint64) []int32) {
6784 n := 2
6785 t.Helper()
6786 forSlice(t, uint64s, n, func(x []uint64) bool {
6787 t.Helper()
6788 a := archsimd.LoadUint64x2Slice(x)
6789 g := make([]int32, 4)
6790 f(a).StoreSlice(g)
6791 w := want(x)
6792 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6793 })
6794 }
6795
6796
6797
6798 func testInt8x32ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int32x4, want func(x []int8) []int32) {
6799 n := 32
6800 t.Helper()
6801 forSlice(t, int8s, n, func(x []int8) bool {
6802 t.Helper()
6803 a := archsimd.LoadInt8x32Slice(x)
6804 g := make([]int32, 4)
6805 f(a).StoreSlice(g)
6806 w := want(x)
6807 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6808 })
6809 }
6810
6811
6812
6813 func testInt16x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int32x4, want func(x []int16) []int32) {
6814 n := 16
6815 t.Helper()
6816 forSlice(t, int16s, n, func(x []int16) bool {
6817 t.Helper()
6818 a := archsimd.LoadInt16x16Slice(x)
6819 g := make([]int32, 4)
6820 f(a).StoreSlice(g)
6821 w := want(x)
6822 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6823 })
6824 }
6825
6826
6827
6828 func testInt32x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int32x4, want func(x []int32) []int32) {
6829 n := 8
6830 t.Helper()
6831 forSlice(t, int32s, n, func(x []int32) bool {
6832 t.Helper()
6833 a := archsimd.LoadInt32x8Slice(x)
6834 g := make([]int32, 4)
6835 f(a).StoreSlice(g)
6836 w := want(x)
6837 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6838 })
6839 }
6840
6841
6842
6843 func testInt64x4ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int32x4, want func(x []int64) []int32) {
6844 n := 4
6845 t.Helper()
6846 forSlice(t, int64s, n, func(x []int64) bool {
6847 t.Helper()
6848 a := archsimd.LoadInt64x4Slice(x)
6849 g := make([]int32, 4)
6850 f(a).StoreSlice(g)
6851 w := want(x)
6852 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6853 })
6854 }
6855
6856
6857
6858 func testUint8x32ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int32x4, want func(x []uint8) []int32) {
6859 n := 32
6860 t.Helper()
6861 forSlice(t, uint8s, n, func(x []uint8) bool {
6862 t.Helper()
6863 a := archsimd.LoadUint8x32Slice(x)
6864 g := make([]int32, 4)
6865 f(a).StoreSlice(g)
6866 w := want(x)
6867 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6868 })
6869 }
6870
6871
6872
6873 func testUint16x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int32x4, want func(x []uint16) []int32) {
6874 n := 16
6875 t.Helper()
6876 forSlice(t, uint16s, n, func(x []uint16) bool {
6877 t.Helper()
6878 a := archsimd.LoadUint16x16Slice(x)
6879 g := make([]int32, 4)
6880 f(a).StoreSlice(g)
6881 w := want(x)
6882 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6883 })
6884 }
6885
6886
6887
6888 func testUint32x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int32x4, want func(x []uint32) []int32) {
6889 n := 8
6890 t.Helper()
6891 forSlice(t, uint32s, n, func(x []uint32) bool {
6892 t.Helper()
6893 a := archsimd.LoadUint32x8Slice(x)
6894 g := make([]int32, 4)
6895 f(a).StoreSlice(g)
6896 w := want(x)
6897 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6898 })
6899 }
6900
6901
6902
6903 func testUint64x4ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int32x4, want func(x []uint64) []int32) {
6904 n := 4
6905 t.Helper()
6906 forSlice(t, uint64s, n, func(x []uint64) bool {
6907 t.Helper()
6908 a := archsimd.LoadUint64x4Slice(x)
6909 g := make([]int32, 4)
6910 f(a).StoreSlice(g)
6911 w := want(x)
6912 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6913 })
6914 }
6915
6916
6917
6918 func testInt8x64ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int32x4, want func(x []int8) []int32) {
6919 n := 64
6920 t.Helper()
6921 forSlice(t, int8s, n, func(x []int8) bool {
6922 t.Helper()
6923 a := archsimd.LoadInt8x64Slice(x)
6924 g := make([]int32, 4)
6925 f(a).StoreSlice(g)
6926 w := want(x)
6927 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6928 })
6929 }
6930
6931
6932
6933 func testInt16x32ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int32x4, want func(x []int16) []int32) {
6934 n := 32
6935 t.Helper()
6936 forSlice(t, int16s, n, func(x []int16) bool {
6937 t.Helper()
6938 a := archsimd.LoadInt16x32Slice(x)
6939 g := make([]int32, 4)
6940 f(a).StoreSlice(g)
6941 w := want(x)
6942 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6943 })
6944 }
6945
6946
6947
6948 func testInt32x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int32x4, want func(x []int32) []int32) {
6949 n := 16
6950 t.Helper()
6951 forSlice(t, int32s, n, func(x []int32) bool {
6952 t.Helper()
6953 a := archsimd.LoadInt32x16Slice(x)
6954 g := make([]int32, 4)
6955 f(a).StoreSlice(g)
6956 w := want(x)
6957 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6958 })
6959 }
6960
6961
6962
6963 func testInt64x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int32x4, want func(x []int64) []int32) {
6964 n := 8
6965 t.Helper()
6966 forSlice(t, int64s, n, func(x []int64) bool {
6967 t.Helper()
6968 a := archsimd.LoadInt64x8Slice(x)
6969 g := make([]int32, 4)
6970 f(a).StoreSlice(g)
6971 w := want(x)
6972 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6973 })
6974 }
6975
6976
6977
6978 func testUint8x64ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int32x4, want func(x []uint8) []int32) {
6979 n := 64
6980 t.Helper()
6981 forSlice(t, uint8s, n, func(x []uint8) bool {
6982 t.Helper()
6983 a := archsimd.LoadUint8x64Slice(x)
6984 g := make([]int32, 4)
6985 f(a).StoreSlice(g)
6986 w := want(x)
6987 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
6988 })
6989 }
6990
6991
6992
6993 func testUint16x32ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int32x4, want func(x []uint16) []int32) {
6994 n := 32
6995 t.Helper()
6996 forSlice(t, uint16s, n, func(x []uint16) bool {
6997 t.Helper()
6998 a := archsimd.LoadUint16x32Slice(x)
6999 g := make([]int32, 4)
7000 f(a).StoreSlice(g)
7001 w := want(x)
7002 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7003 })
7004 }
7005
7006
7007
7008 func testUint32x16ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int32x4, want func(x []uint32) []int32) {
7009 n := 16
7010 t.Helper()
7011 forSlice(t, uint32s, n, func(x []uint32) bool {
7012 t.Helper()
7013 a := archsimd.LoadUint32x16Slice(x)
7014 g := make([]int32, 4)
7015 f(a).StoreSlice(g)
7016 w := want(x)
7017 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7018 })
7019 }
7020
7021
7022
7023 func testUint64x8ConvertLoToInt32x4(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int32x4, want func(x []uint64) []int32) {
7024 n := 8
7025 t.Helper()
7026 forSlice(t, uint64s, n, func(x []uint64) bool {
7027 t.Helper()
7028 a := archsimd.LoadUint64x8Slice(x)
7029 g := make([]int32, 4)
7030 f(a).StoreSlice(g)
7031 w := want(x)
7032 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7033 })
7034 }
7035
7036
7037
7038 func testInt8x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int32x8, want func(x []int8) []int32) {
7039 n := 16
7040 t.Helper()
7041 forSlice(t, int8s, n, func(x []int8) bool {
7042 t.Helper()
7043 a := archsimd.LoadInt8x16Slice(x)
7044 g := make([]int32, 8)
7045 f(a).StoreSlice(g)
7046 w := want(x)
7047 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7048 })
7049 }
7050
7051
7052
7053 func testInt16x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int32x8, want func(x []int16) []int32) {
7054 n := 8
7055 t.Helper()
7056 forSlice(t, int16s, n, func(x []int16) bool {
7057 t.Helper()
7058 a := archsimd.LoadInt16x8Slice(x)
7059 g := make([]int32, 8)
7060 f(a).StoreSlice(g)
7061 w := want(x)
7062 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7063 })
7064 }
7065
7066
7067
7068 func testInt32x4ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int32x8, want func(x []int32) []int32) {
7069 n := 4
7070 t.Helper()
7071 forSlice(t, int32s, n, func(x []int32) bool {
7072 t.Helper()
7073 a := archsimd.LoadInt32x4Slice(x)
7074 g := make([]int32, 8)
7075 f(a).StoreSlice(g)
7076 w := want(x)
7077 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7078 })
7079 }
7080
7081
7082
7083 func testInt64x2ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int32x8, want func(x []int64) []int32) {
7084 n := 2
7085 t.Helper()
7086 forSlice(t, int64s, n, func(x []int64) bool {
7087 t.Helper()
7088 a := archsimd.LoadInt64x2Slice(x)
7089 g := make([]int32, 8)
7090 f(a).StoreSlice(g)
7091 w := want(x)
7092 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7093 })
7094 }
7095
7096
7097
7098 func testUint8x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int32x8, want func(x []uint8) []int32) {
7099 n := 16
7100 t.Helper()
7101 forSlice(t, uint8s, n, func(x []uint8) bool {
7102 t.Helper()
7103 a := archsimd.LoadUint8x16Slice(x)
7104 g := make([]int32, 8)
7105 f(a).StoreSlice(g)
7106 w := want(x)
7107 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7108 })
7109 }
7110
7111
7112
7113 func testUint16x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int32x8, want func(x []uint16) []int32) {
7114 n := 8
7115 t.Helper()
7116 forSlice(t, uint16s, n, func(x []uint16) bool {
7117 t.Helper()
7118 a := archsimd.LoadUint16x8Slice(x)
7119 g := make([]int32, 8)
7120 f(a).StoreSlice(g)
7121 w := want(x)
7122 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7123 })
7124 }
7125
7126
7127
7128 func testUint32x4ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int32x8, want func(x []uint32) []int32) {
7129 n := 4
7130 t.Helper()
7131 forSlice(t, uint32s, n, func(x []uint32) bool {
7132 t.Helper()
7133 a := archsimd.LoadUint32x4Slice(x)
7134 g := make([]int32, 8)
7135 f(a).StoreSlice(g)
7136 w := want(x)
7137 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7138 })
7139 }
7140
7141
7142
7143 func testUint64x2ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int32x8, want func(x []uint64) []int32) {
7144 n := 2
7145 t.Helper()
7146 forSlice(t, uint64s, n, func(x []uint64) bool {
7147 t.Helper()
7148 a := archsimd.LoadUint64x2Slice(x)
7149 g := make([]int32, 8)
7150 f(a).StoreSlice(g)
7151 w := want(x)
7152 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7153 })
7154 }
7155
7156
7157
7158 func testInt8x32ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int32x8, want func(x []int8) []int32) {
7159 n := 32
7160 t.Helper()
7161 forSlice(t, int8s, n, func(x []int8) bool {
7162 t.Helper()
7163 a := archsimd.LoadInt8x32Slice(x)
7164 g := make([]int32, 8)
7165 f(a).StoreSlice(g)
7166 w := want(x)
7167 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7168 })
7169 }
7170
7171
7172
7173 func testInt16x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int32x8, want func(x []int16) []int32) {
7174 n := 16
7175 t.Helper()
7176 forSlice(t, int16s, n, func(x []int16) bool {
7177 t.Helper()
7178 a := archsimd.LoadInt16x16Slice(x)
7179 g := make([]int32, 8)
7180 f(a).StoreSlice(g)
7181 w := want(x)
7182 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7183 })
7184 }
7185
7186
7187
7188 func testInt32x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int32x8, want func(x []int32) []int32) {
7189 n := 8
7190 t.Helper()
7191 forSlice(t, int32s, n, func(x []int32) bool {
7192 t.Helper()
7193 a := archsimd.LoadInt32x8Slice(x)
7194 g := make([]int32, 8)
7195 f(a).StoreSlice(g)
7196 w := want(x)
7197 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7198 })
7199 }
7200
7201
7202
7203 func testInt64x4ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int32x8, want func(x []int64) []int32) {
7204 n := 4
7205 t.Helper()
7206 forSlice(t, int64s, n, func(x []int64) bool {
7207 t.Helper()
7208 a := archsimd.LoadInt64x4Slice(x)
7209 g := make([]int32, 8)
7210 f(a).StoreSlice(g)
7211 w := want(x)
7212 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7213 })
7214 }
7215
7216
7217
7218 func testUint8x32ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int32x8, want func(x []uint8) []int32) {
7219 n := 32
7220 t.Helper()
7221 forSlice(t, uint8s, n, func(x []uint8) bool {
7222 t.Helper()
7223 a := archsimd.LoadUint8x32Slice(x)
7224 g := make([]int32, 8)
7225 f(a).StoreSlice(g)
7226 w := want(x)
7227 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7228 })
7229 }
7230
7231
7232
7233 func testUint16x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int32x8, want func(x []uint16) []int32) {
7234 n := 16
7235 t.Helper()
7236 forSlice(t, uint16s, n, func(x []uint16) bool {
7237 t.Helper()
7238 a := archsimd.LoadUint16x16Slice(x)
7239 g := make([]int32, 8)
7240 f(a).StoreSlice(g)
7241 w := want(x)
7242 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7243 })
7244 }
7245
7246
7247
7248 func testUint32x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int32x8, want func(x []uint32) []int32) {
7249 n := 8
7250 t.Helper()
7251 forSlice(t, uint32s, n, func(x []uint32) bool {
7252 t.Helper()
7253 a := archsimd.LoadUint32x8Slice(x)
7254 g := make([]int32, 8)
7255 f(a).StoreSlice(g)
7256 w := want(x)
7257 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7258 })
7259 }
7260
7261
7262
7263 func testUint64x4ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int32x8, want func(x []uint64) []int32) {
7264 n := 4
7265 t.Helper()
7266 forSlice(t, uint64s, n, func(x []uint64) bool {
7267 t.Helper()
7268 a := archsimd.LoadUint64x4Slice(x)
7269 g := make([]int32, 8)
7270 f(a).StoreSlice(g)
7271 w := want(x)
7272 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7273 })
7274 }
7275
7276
7277
7278 func testInt8x64ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int32x8, want func(x []int8) []int32) {
7279 n := 64
7280 t.Helper()
7281 forSlice(t, int8s, n, func(x []int8) bool {
7282 t.Helper()
7283 a := archsimd.LoadInt8x64Slice(x)
7284 g := make([]int32, 8)
7285 f(a).StoreSlice(g)
7286 w := want(x)
7287 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7288 })
7289 }
7290
7291
7292
7293 func testInt16x32ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int32x8, want func(x []int16) []int32) {
7294 n := 32
7295 t.Helper()
7296 forSlice(t, int16s, n, func(x []int16) bool {
7297 t.Helper()
7298 a := archsimd.LoadInt16x32Slice(x)
7299 g := make([]int32, 8)
7300 f(a).StoreSlice(g)
7301 w := want(x)
7302 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7303 })
7304 }
7305
7306
7307
7308 func testInt32x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int32x8, want func(x []int32) []int32) {
7309 n := 16
7310 t.Helper()
7311 forSlice(t, int32s, n, func(x []int32) bool {
7312 t.Helper()
7313 a := archsimd.LoadInt32x16Slice(x)
7314 g := make([]int32, 8)
7315 f(a).StoreSlice(g)
7316 w := want(x)
7317 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7318 })
7319 }
7320
7321
7322
7323 func testInt64x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int32x8, want func(x []int64) []int32) {
7324 n := 8
7325 t.Helper()
7326 forSlice(t, int64s, n, func(x []int64) bool {
7327 t.Helper()
7328 a := archsimd.LoadInt64x8Slice(x)
7329 g := make([]int32, 8)
7330 f(a).StoreSlice(g)
7331 w := want(x)
7332 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7333 })
7334 }
7335
7336
7337
7338 func testUint8x64ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int32x8, want func(x []uint8) []int32) {
7339 n := 64
7340 t.Helper()
7341 forSlice(t, uint8s, n, func(x []uint8) bool {
7342 t.Helper()
7343 a := archsimd.LoadUint8x64Slice(x)
7344 g := make([]int32, 8)
7345 f(a).StoreSlice(g)
7346 w := want(x)
7347 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7348 })
7349 }
7350
7351
7352
7353 func testUint16x32ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int32x8, want func(x []uint16) []int32) {
7354 n := 32
7355 t.Helper()
7356 forSlice(t, uint16s, n, func(x []uint16) bool {
7357 t.Helper()
7358 a := archsimd.LoadUint16x32Slice(x)
7359 g := make([]int32, 8)
7360 f(a).StoreSlice(g)
7361 w := want(x)
7362 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7363 })
7364 }
7365
7366
7367
7368 func testUint32x16ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int32x8, want func(x []uint32) []int32) {
7369 n := 16
7370 t.Helper()
7371 forSlice(t, uint32s, n, func(x []uint32) bool {
7372 t.Helper()
7373 a := archsimd.LoadUint32x16Slice(x)
7374 g := make([]int32, 8)
7375 f(a).StoreSlice(g)
7376 w := want(x)
7377 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7378 })
7379 }
7380
7381
7382
7383 func testUint64x8ConvertLoToInt32x8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int32x8, want func(x []uint64) []int32) {
7384 n := 8
7385 t.Helper()
7386 forSlice(t, uint64s, n, func(x []uint64) bool {
7387 t.Helper()
7388 a := archsimd.LoadUint64x8Slice(x)
7389 g := make([]int32, 8)
7390 f(a).StoreSlice(g)
7391 w := want(x)
7392 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7393 })
7394 }
7395
7396
7397
7398 func testInt8x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint32x4, want func(x []int8) []uint32) {
7399 n := 16
7400 t.Helper()
7401 forSlice(t, int8s, n, func(x []int8) bool {
7402 t.Helper()
7403 a := archsimd.LoadInt8x16Slice(x)
7404 g := make([]uint32, 4)
7405 f(a).StoreSlice(g)
7406 w := want(x)
7407 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7408 })
7409 }
7410
7411
7412
7413 func testInt16x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint32x4, want func(x []int16) []uint32) {
7414 n := 8
7415 t.Helper()
7416 forSlice(t, int16s, n, func(x []int16) bool {
7417 t.Helper()
7418 a := archsimd.LoadInt16x8Slice(x)
7419 g := make([]uint32, 4)
7420 f(a).StoreSlice(g)
7421 w := want(x)
7422 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7423 })
7424 }
7425
7426
7427
7428 func testInt32x4ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint32x4, want func(x []int32) []uint32) {
7429 n := 4
7430 t.Helper()
7431 forSlice(t, int32s, n, func(x []int32) bool {
7432 t.Helper()
7433 a := archsimd.LoadInt32x4Slice(x)
7434 g := make([]uint32, 4)
7435 f(a).StoreSlice(g)
7436 w := want(x)
7437 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7438 })
7439 }
7440
7441
7442
7443 func testInt64x2ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint32x4, want func(x []int64) []uint32) {
7444 n := 2
7445 t.Helper()
7446 forSlice(t, int64s, n, func(x []int64) bool {
7447 t.Helper()
7448 a := archsimd.LoadInt64x2Slice(x)
7449 g := make([]uint32, 4)
7450 f(a).StoreSlice(g)
7451 w := want(x)
7452 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7453 })
7454 }
7455
7456
7457
7458 func testUint8x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint32x4, want func(x []uint8) []uint32) {
7459 n := 16
7460 t.Helper()
7461 forSlice(t, uint8s, n, func(x []uint8) bool {
7462 t.Helper()
7463 a := archsimd.LoadUint8x16Slice(x)
7464 g := make([]uint32, 4)
7465 f(a).StoreSlice(g)
7466 w := want(x)
7467 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7468 })
7469 }
7470
7471
7472
7473 func testUint16x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint32x4, want func(x []uint16) []uint32) {
7474 n := 8
7475 t.Helper()
7476 forSlice(t, uint16s, n, func(x []uint16) bool {
7477 t.Helper()
7478 a := archsimd.LoadUint16x8Slice(x)
7479 g := make([]uint32, 4)
7480 f(a).StoreSlice(g)
7481 w := want(x)
7482 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7483 })
7484 }
7485
7486
7487
7488 func testUint32x4ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint32x4, want func(x []uint32) []uint32) {
7489 n := 4
7490 t.Helper()
7491 forSlice(t, uint32s, n, func(x []uint32) bool {
7492 t.Helper()
7493 a := archsimd.LoadUint32x4Slice(x)
7494 g := make([]uint32, 4)
7495 f(a).StoreSlice(g)
7496 w := want(x)
7497 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7498 })
7499 }
7500
7501
7502
7503 func testUint64x2ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint32x4, want func(x []uint64) []uint32) {
7504 n := 2
7505 t.Helper()
7506 forSlice(t, uint64s, n, func(x []uint64) bool {
7507 t.Helper()
7508 a := archsimd.LoadUint64x2Slice(x)
7509 g := make([]uint32, 4)
7510 f(a).StoreSlice(g)
7511 w := want(x)
7512 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7513 })
7514 }
7515
7516
7517
7518 func testInt8x32ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint32x4, want func(x []int8) []uint32) {
7519 n := 32
7520 t.Helper()
7521 forSlice(t, int8s, n, func(x []int8) bool {
7522 t.Helper()
7523 a := archsimd.LoadInt8x32Slice(x)
7524 g := make([]uint32, 4)
7525 f(a).StoreSlice(g)
7526 w := want(x)
7527 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7528 })
7529 }
7530
7531
7532
7533 func testInt16x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint32x4, want func(x []int16) []uint32) {
7534 n := 16
7535 t.Helper()
7536 forSlice(t, int16s, n, func(x []int16) bool {
7537 t.Helper()
7538 a := archsimd.LoadInt16x16Slice(x)
7539 g := make([]uint32, 4)
7540 f(a).StoreSlice(g)
7541 w := want(x)
7542 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7543 })
7544 }
7545
7546
7547
7548 func testInt32x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint32x4, want func(x []int32) []uint32) {
7549 n := 8
7550 t.Helper()
7551 forSlice(t, int32s, n, func(x []int32) bool {
7552 t.Helper()
7553 a := archsimd.LoadInt32x8Slice(x)
7554 g := make([]uint32, 4)
7555 f(a).StoreSlice(g)
7556 w := want(x)
7557 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7558 })
7559 }
7560
7561
7562
7563 func testInt64x4ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint32x4, want func(x []int64) []uint32) {
7564 n := 4
7565 t.Helper()
7566 forSlice(t, int64s, n, func(x []int64) bool {
7567 t.Helper()
7568 a := archsimd.LoadInt64x4Slice(x)
7569 g := make([]uint32, 4)
7570 f(a).StoreSlice(g)
7571 w := want(x)
7572 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7573 })
7574 }
7575
7576
7577
7578 func testUint8x32ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint32x4, want func(x []uint8) []uint32) {
7579 n := 32
7580 t.Helper()
7581 forSlice(t, uint8s, n, func(x []uint8) bool {
7582 t.Helper()
7583 a := archsimd.LoadUint8x32Slice(x)
7584 g := make([]uint32, 4)
7585 f(a).StoreSlice(g)
7586 w := want(x)
7587 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7588 })
7589 }
7590
7591
7592
7593 func testUint16x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint32x4, want func(x []uint16) []uint32) {
7594 n := 16
7595 t.Helper()
7596 forSlice(t, uint16s, n, func(x []uint16) bool {
7597 t.Helper()
7598 a := archsimd.LoadUint16x16Slice(x)
7599 g := make([]uint32, 4)
7600 f(a).StoreSlice(g)
7601 w := want(x)
7602 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7603 })
7604 }
7605
7606
7607
7608 func testUint32x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint32x4, want func(x []uint32) []uint32) {
7609 n := 8
7610 t.Helper()
7611 forSlice(t, uint32s, n, func(x []uint32) bool {
7612 t.Helper()
7613 a := archsimd.LoadUint32x8Slice(x)
7614 g := make([]uint32, 4)
7615 f(a).StoreSlice(g)
7616 w := want(x)
7617 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7618 })
7619 }
7620
7621
7622
7623 func testUint64x4ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint32x4, want func(x []uint64) []uint32) {
7624 n := 4
7625 t.Helper()
7626 forSlice(t, uint64s, n, func(x []uint64) bool {
7627 t.Helper()
7628 a := archsimd.LoadUint64x4Slice(x)
7629 g := make([]uint32, 4)
7630 f(a).StoreSlice(g)
7631 w := want(x)
7632 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7633 })
7634 }
7635
7636
7637
7638 func testInt8x64ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint32x4, want func(x []int8) []uint32) {
7639 n := 64
7640 t.Helper()
7641 forSlice(t, int8s, n, func(x []int8) bool {
7642 t.Helper()
7643 a := archsimd.LoadInt8x64Slice(x)
7644 g := make([]uint32, 4)
7645 f(a).StoreSlice(g)
7646 w := want(x)
7647 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7648 })
7649 }
7650
7651
7652
7653 func testInt16x32ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint32x4, want func(x []int16) []uint32) {
7654 n := 32
7655 t.Helper()
7656 forSlice(t, int16s, n, func(x []int16) bool {
7657 t.Helper()
7658 a := archsimd.LoadInt16x32Slice(x)
7659 g := make([]uint32, 4)
7660 f(a).StoreSlice(g)
7661 w := want(x)
7662 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7663 })
7664 }
7665
7666
7667
7668 func testInt32x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint32x4, want func(x []int32) []uint32) {
7669 n := 16
7670 t.Helper()
7671 forSlice(t, int32s, n, func(x []int32) bool {
7672 t.Helper()
7673 a := archsimd.LoadInt32x16Slice(x)
7674 g := make([]uint32, 4)
7675 f(a).StoreSlice(g)
7676 w := want(x)
7677 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7678 })
7679 }
7680
7681
7682
7683 func testInt64x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint32x4, want func(x []int64) []uint32) {
7684 n := 8
7685 t.Helper()
7686 forSlice(t, int64s, n, func(x []int64) bool {
7687 t.Helper()
7688 a := archsimd.LoadInt64x8Slice(x)
7689 g := make([]uint32, 4)
7690 f(a).StoreSlice(g)
7691 w := want(x)
7692 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7693 })
7694 }
7695
7696
7697
7698 func testUint8x64ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint32x4, want func(x []uint8) []uint32) {
7699 n := 64
7700 t.Helper()
7701 forSlice(t, uint8s, n, func(x []uint8) bool {
7702 t.Helper()
7703 a := archsimd.LoadUint8x64Slice(x)
7704 g := make([]uint32, 4)
7705 f(a).StoreSlice(g)
7706 w := want(x)
7707 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7708 })
7709 }
7710
7711
7712
7713 func testUint16x32ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint32x4, want func(x []uint16) []uint32) {
7714 n := 32
7715 t.Helper()
7716 forSlice(t, uint16s, n, func(x []uint16) bool {
7717 t.Helper()
7718 a := archsimd.LoadUint16x32Slice(x)
7719 g := make([]uint32, 4)
7720 f(a).StoreSlice(g)
7721 w := want(x)
7722 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7723 })
7724 }
7725
7726
7727
7728 func testUint32x16ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint32x4, want func(x []uint32) []uint32) {
7729 n := 16
7730 t.Helper()
7731 forSlice(t, uint32s, n, func(x []uint32) bool {
7732 t.Helper()
7733 a := archsimd.LoadUint32x16Slice(x)
7734 g := make([]uint32, 4)
7735 f(a).StoreSlice(g)
7736 w := want(x)
7737 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7738 })
7739 }
7740
7741
7742
7743 func testUint64x8ConvertLoToUint32x4(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint32x4, want func(x []uint64) []uint32) {
7744 n := 8
7745 t.Helper()
7746 forSlice(t, uint64s, n, func(x []uint64) bool {
7747 t.Helper()
7748 a := archsimd.LoadUint64x8Slice(x)
7749 g := make([]uint32, 4)
7750 f(a).StoreSlice(g)
7751 w := want(x)
7752 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7753 })
7754 }
7755
7756
7757
7758 func testInt8x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint32x8, want func(x []int8) []uint32) {
7759 n := 16
7760 t.Helper()
7761 forSlice(t, int8s, n, func(x []int8) bool {
7762 t.Helper()
7763 a := archsimd.LoadInt8x16Slice(x)
7764 g := make([]uint32, 8)
7765 f(a).StoreSlice(g)
7766 w := want(x)
7767 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7768 })
7769 }
7770
7771
7772
7773 func testInt16x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint32x8, want func(x []int16) []uint32) {
7774 n := 8
7775 t.Helper()
7776 forSlice(t, int16s, n, func(x []int16) bool {
7777 t.Helper()
7778 a := archsimd.LoadInt16x8Slice(x)
7779 g := make([]uint32, 8)
7780 f(a).StoreSlice(g)
7781 w := want(x)
7782 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7783 })
7784 }
7785
7786
7787
7788 func testInt32x4ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint32x8, want func(x []int32) []uint32) {
7789 n := 4
7790 t.Helper()
7791 forSlice(t, int32s, n, func(x []int32) bool {
7792 t.Helper()
7793 a := archsimd.LoadInt32x4Slice(x)
7794 g := make([]uint32, 8)
7795 f(a).StoreSlice(g)
7796 w := want(x)
7797 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7798 })
7799 }
7800
7801
7802
7803 func testInt64x2ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint32x8, want func(x []int64) []uint32) {
7804 n := 2
7805 t.Helper()
7806 forSlice(t, int64s, n, func(x []int64) bool {
7807 t.Helper()
7808 a := archsimd.LoadInt64x2Slice(x)
7809 g := make([]uint32, 8)
7810 f(a).StoreSlice(g)
7811 w := want(x)
7812 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7813 })
7814 }
7815
7816
7817
7818 func testUint8x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint32x8, want func(x []uint8) []uint32) {
7819 n := 16
7820 t.Helper()
7821 forSlice(t, uint8s, n, func(x []uint8) bool {
7822 t.Helper()
7823 a := archsimd.LoadUint8x16Slice(x)
7824 g := make([]uint32, 8)
7825 f(a).StoreSlice(g)
7826 w := want(x)
7827 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7828 })
7829 }
7830
7831
7832
7833 func testUint16x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint32x8, want func(x []uint16) []uint32) {
7834 n := 8
7835 t.Helper()
7836 forSlice(t, uint16s, n, func(x []uint16) bool {
7837 t.Helper()
7838 a := archsimd.LoadUint16x8Slice(x)
7839 g := make([]uint32, 8)
7840 f(a).StoreSlice(g)
7841 w := want(x)
7842 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7843 })
7844 }
7845
7846
7847
7848 func testUint32x4ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint32x8, want func(x []uint32) []uint32) {
7849 n := 4
7850 t.Helper()
7851 forSlice(t, uint32s, n, func(x []uint32) bool {
7852 t.Helper()
7853 a := archsimd.LoadUint32x4Slice(x)
7854 g := make([]uint32, 8)
7855 f(a).StoreSlice(g)
7856 w := want(x)
7857 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7858 })
7859 }
7860
7861
7862
7863 func testUint64x2ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint32x8, want func(x []uint64) []uint32) {
7864 n := 2
7865 t.Helper()
7866 forSlice(t, uint64s, n, func(x []uint64) bool {
7867 t.Helper()
7868 a := archsimd.LoadUint64x2Slice(x)
7869 g := make([]uint32, 8)
7870 f(a).StoreSlice(g)
7871 w := want(x)
7872 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7873 })
7874 }
7875
7876
7877
7878 func testInt8x32ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint32x8, want func(x []int8) []uint32) {
7879 n := 32
7880 t.Helper()
7881 forSlice(t, int8s, n, func(x []int8) bool {
7882 t.Helper()
7883 a := archsimd.LoadInt8x32Slice(x)
7884 g := make([]uint32, 8)
7885 f(a).StoreSlice(g)
7886 w := want(x)
7887 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7888 })
7889 }
7890
7891
7892
7893 func testInt16x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint32x8, want func(x []int16) []uint32) {
7894 n := 16
7895 t.Helper()
7896 forSlice(t, int16s, n, func(x []int16) bool {
7897 t.Helper()
7898 a := archsimd.LoadInt16x16Slice(x)
7899 g := make([]uint32, 8)
7900 f(a).StoreSlice(g)
7901 w := want(x)
7902 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7903 })
7904 }
7905
7906
7907
7908 func testInt32x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint32x8, want func(x []int32) []uint32) {
7909 n := 8
7910 t.Helper()
7911 forSlice(t, int32s, n, func(x []int32) bool {
7912 t.Helper()
7913 a := archsimd.LoadInt32x8Slice(x)
7914 g := make([]uint32, 8)
7915 f(a).StoreSlice(g)
7916 w := want(x)
7917 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7918 })
7919 }
7920
7921
7922
7923 func testInt64x4ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint32x8, want func(x []int64) []uint32) {
7924 n := 4
7925 t.Helper()
7926 forSlice(t, int64s, n, func(x []int64) bool {
7927 t.Helper()
7928 a := archsimd.LoadInt64x4Slice(x)
7929 g := make([]uint32, 8)
7930 f(a).StoreSlice(g)
7931 w := want(x)
7932 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7933 })
7934 }
7935
7936
7937
7938 func testUint8x32ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint32x8, want func(x []uint8) []uint32) {
7939 n := 32
7940 t.Helper()
7941 forSlice(t, uint8s, n, func(x []uint8) bool {
7942 t.Helper()
7943 a := archsimd.LoadUint8x32Slice(x)
7944 g := make([]uint32, 8)
7945 f(a).StoreSlice(g)
7946 w := want(x)
7947 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7948 })
7949 }
7950
7951
7952
7953 func testUint16x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint32x8, want func(x []uint16) []uint32) {
7954 n := 16
7955 t.Helper()
7956 forSlice(t, uint16s, n, func(x []uint16) bool {
7957 t.Helper()
7958 a := archsimd.LoadUint16x16Slice(x)
7959 g := make([]uint32, 8)
7960 f(a).StoreSlice(g)
7961 w := want(x)
7962 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7963 })
7964 }
7965
7966
7967
7968 func testUint32x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint32x8, want func(x []uint32) []uint32) {
7969 n := 8
7970 t.Helper()
7971 forSlice(t, uint32s, n, func(x []uint32) bool {
7972 t.Helper()
7973 a := archsimd.LoadUint32x8Slice(x)
7974 g := make([]uint32, 8)
7975 f(a).StoreSlice(g)
7976 w := want(x)
7977 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7978 })
7979 }
7980
7981
7982
7983 func testUint64x4ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint32x8, want func(x []uint64) []uint32) {
7984 n := 4
7985 t.Helper()
7986 forSlice(t, uint64s, n, func(x []uint64) bool {
7987 t.Helper()
7988 a := archsimd.LoadUint64x4Slice(x)
7989 g := make([]uint32, 8)
7990 f(a).StoreSlice(g)
7991 w := want(x)
7992 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
7993 })
7994 }
7995
7996
7997
7998 func testInt8x64ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint32x8, want func(x []int8) []uint32) {
7999 n := 64
8000 t.Helper()
8001 forSlice(t, int8s, n, func(x []int8) bool {
8002 t.Helper()
8003 a := archsimd.LoadInt8x64Slice(x)
8004 g := make([]uint32, 8)
8005 f(a).StoreSlice(g)
8006 w := want(x)
8007 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8008 })
8009 }
8010
8011
8012
8013 func testInt16x32ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint32x8, want func(x []int16) []uint32) {
8014 n := 32
8015 t.Helper()
8016 forSlice(t, int16s, n, func(x []int16) bool {
8017 t.Helper()
8018 a := archsimd.LoadInt16x32Slice(x)
8019 g := make([]uint32, 8)
8020 f(a).StoreSlice(g)
8021 w := want(x)
8022 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8023 })
8024 }
8025
8026
8027
8028 func testInt32x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint32x8, want func(x []int32) []uint32) {
8029 n := 16
8030 t.Helper()
8031 forSlice(t, int32s, n, func(x []int32) bool {
8032 t.Helper()
8033 a := archsimd.LoadInt32x16Slice(x)
8034 g := make([]uint32, 8)
8035 f(a).StoreSlice(g)
8036 w := want(x)
8037 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8038 })
8039 }
8040
8041
8042
8043 func testInt64x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint32x8, want func(x []int64) []uint32) {
8044 n := 8
8045 t.Helper()
8046 forSlice(t, int64s, n, func(x []int64) bool {
8047 t.Helper()
8048 a := archsimd.LoadInt64x8Slice(x)
8049 g := make([]uint32, 8)
8050 f(a).StoreSlice(g)
8051 w := want(x)
8052 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8053 })
8054 }
8055
8056
8057
8058 func testUint8x64ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint32x8, want func(x []uint8) []uint32) {
8059 n := 64
8060 t.Helper()
8061 forSlice(t, uint8s, n, func(x []uint8) bool {
8062 t.Helper()
8063 a := archsimd.LoadUint8x64Slice(x)
8064 g := make([]uint32, 8)
8065 f(a).StoreSlice(g)
8066 w := want(x)
8067 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8068 })
8069 }
8070
8071
8072
8073 func testUint16x32ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint32x8, want func(x []uint16) []uint32) {
8074 n := 32
8075 t.Helper()
8076 forSlice(t, uint16s, n, func(x []uint16) bool {
8077 t.Helper()
8078 a := archsimd.LoadUint16x32Slice(x)
8079 g := make([]uint32, 8)
8080 f(a).StoreSlice(g)
8081 w := want(x)
8082 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8083 })
8084 }
8085
8086
8087
8088 func testUint32x16ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint32x8, want func(x []uint32) []uint32) {
8089 n := 16
8090 t.Helper()
8091 forSlice(t, uint32s, n, func(x []uint32) bool {
8092 t.Helper()
8093 a := archsimd.LoadUint32x16Slice(x)
8094 g := make([]uint32, 8)
8095 f(a).StoreSlice(g)
8096 w := want(x)
8097 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8098 })
8099 }
8100
8101
8102
8103 func testUint64x8ConvertLoToUint32x8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint32x8, want func(x []uint64) []uint32) {
8104 n := 8
8105 t.Helper()
8106 forSlice(t, uint64s, n, func(x []uint64) bool {
8107 t.Helper()
8108 a := archsimd.LoadUint64x8Slice(x)
8109 g := make([]uint32, 8)
8110 f(a).StoreSlice(g)
8111 w := want(x)
8112 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8113 })
8114 }
8115
8116
8117
8118 func testInt8x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int16x8, want func(x []int8) []int16) {
8119 n := 16
8120 t.Helper()
8121 forSlice(t, int8s, n, func(x []int8) bool {
8122 t.Helper()
8123 a := archsimd.LoadInt8x16Slice(x)
8124 g := make([]int16, 8)
8125 f(a).StoreSlice(g)
8126 w := want(x)
8127 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8128 })
8129 }
8130
8131
8132
8133 func testInt16x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int16x8, want func(x []int16) []int16) {
8134 n := 8
8135 t.Helper()
8136 forSlice(t, int16s, n, func(x []int16) bool {
8137 t.Helper()
8138 a := archsimd.LoadInt16x8Slice(x)
8139 g := make([]int16, 8)
8140 f(a).StoreSlice(g)
8141 w := want(x)
8142 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8143 })
8144 }
8145
8146
8147
8148 func testInt32x4ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int16x8, want func(x []int32) []int16) {
8149 n := 4
8150 t.Helper()
8151 forSlice(t, int32s, n, func(x []int32) bool {
8152 t.Helper()
8153 a := archsimd.LoadInt32x4Slice(x)
8154 g := make([]int16, 8)
8155 f(a).StoreSlice(g)
8156 w := want(x)
8157 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8158 })
8159 }
8160
8161
8162
8163 func testInt64x2ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int16x8, want func(x []int64) []int16) {
8164 n := 2
8165 t.Helper()
8166 forSlice(t, int64s, n, func(x []int64) bool {
8167 t.Helper()
8168 a := archsimd.LoadInt64x2Slice(x)
8169 g := make([]int16, 8)
8170 f(a).StoreSlice(g)
8171 w := want(x)
8172 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8173 })
8174 }
8175
8176
8177
8178 func testUint8x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int16x8, want func(x []uint8) []int16) {
8179 n := 16
8180 t.Helper()
8181 forSlice(t, uint8s, n, func(x []uint8) bool {
8182 t.Helper()
8183 a := archsimd.LoadUint8x16Slice(x)
8184 g := make([]int16, 8)
8185 f(a).StoreSlice(g)
8186 w := want(x)
8187 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8188 })
8189 }
8190
8191
8192
8193 func testUint16x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int16x8, want func(x []uint16) []int16) {
8194 n := 8
8195 t.Helper()
8196 forSlice(t, uint16s, n, func(x []uint16) bool {
8197 t.Helper()
8198 a := archsimd.LoadUint16x8Slice(x)
8199 g := make([]int16, 8)
8200 f(a).StoreSlice(g)
8201 w := want(x)
8202 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8203 })
8204 }
8205
8206
8207
8208 func testUint32x4ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int16x8, want func(x []uint32) []int16) {
8209 n := 4
8210 t.Helper()
8211 forSlice(t, uint32s, n, func(x []uint32) bool {
8212 t.Helper()
8213 a := archsimd.LoadUint32x4Slice(x)
8214 g := make([]int16, 8)
8215 f(a).StoreSlice(g)
8216 w := want(x)
8217 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8218 })
8219 }
8220
8221
8222
8223 func testUint64x2ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int16x8, want func(x []uint64) []int16) {
8224 n := 2
8225 t.Helper()
8226 forSlice(t, uint64s, n, func(x []uint64) bool {
8227 t.Helper()
8228 a := archsimd.LoadUint64x2Slice(x)
8229 g := make([]int16, 8)
8230 f(a).StoreSlice(g)
8231 w := want(x)
8232 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8233 })
8234 }
8235
8236
8237
8238 func testInt8x32ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Int16x8, want func(x []int8) []int16) {
8239 n := 32
8240 t.Helper()
8241 forSlice(t, int8s, n, func(x []int8) bool {
8242 t.Helper()
8243 a := archsimd.LoadInt8x32Slice(x)
8244 g := make([]int16, 8)
8245 f(a).StoreSlice(g)
8246 w := want(x)
8247 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8248 })
8249 }
8250
8251
8252
8253 func testInt16x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Int16x8, want func(x []int16) []int16) {
8254 n := 16
8255 t.Helper()
8256 forSlice(t, int16s, n, func(x []int16) bool {
8257 t.Helper()
8258 a := archsimd.LoadInt16x16Slice(x)
8259 g := make([]int16, 8)
8260 f(a).StoreSlice(g)
8261 w := want(x)
8262 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8263 })
8264 }
8265
8266
8267
8268 func testInt32x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Int16x8, want func(x []int32) []int16) {
8269 n := 8
8270 t.Helper()
8271 forSlice(t, int32s, n, func(x []int32) bool {
8272 t.Helper()
8273 a := archsimd.LoadInt32x8Slice(x)
8274 g := make([]int16, 8)
8275 f(a).StoreSlice(g)
8276 w := want(x)
8277 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8278 })
8279 }
8280
8281
8282
8283 func testInt64x4ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Int16x8, want func(x []int64) []int16) {
8284 n := 4
8285 t.Helper()
8286 forSlice(t, int64s, n, func(x []int64) bool {
8287 t.Helper()
8288 a := archsimd.LoadInt64x4Slice(x)
8289 g := make([]int16, 8)
8290 f(a).StoreSlice(g)
8291 w := want(x)
8292 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8293 })
8294 }
8295
8296
8297
8298 func testUint8x32ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Int16x8, want func(x []uint8) []int16) {
8299 n := 32
8300 t.Helper()
8301 forSlice(t, uint8s, n, func(x []uint8) bool {
8302 t.Helper()
8303 a := archsimd.LoadUint8x32Slice(x)
8304 g := make([]int16, 8)
8305 f(a).StoreSlice(g)
8306 w := want(x)
8307 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8308 })
8309 }
8310
8311
8312
8313 func testUint16x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Int16x8, want func(x []uint16) []int16) {
8314 n := 16
8315 t.Helper()
8316 forSlice(t, uint16s, n, func(x []uint16) bool {
8317 t.Helper()
8318 a := archsimd.LoadUint16x16Slice(x)
8319 g := make([]int16, 8)
8320 f(a).StoreSlice(g)
8321 w := want(x)
8322 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8323 })
8324 }
8325
8326
8327
8328 func testUint32x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Int16x8, want func(x []uint32) []int16) {
8329 n := 8
8330 t.Helper()
8331 forSlice(t, uint32s, n, func(x []uint32) bool {
8332 t.Helper()
8333 a := archsimd.LoadUint32x8Slice(x)
8334 g := make([]int16, 8)
8335 f(a).StoreSlice(g)
8336 w := want(x)
8337 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8338 })
8339 }
8340
8341
8342
8343 func testUint64x4ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Int16x8, want func(x []uint64) []int16) {
8344 n := 4
8345 t.Helper()
8346 forSlice(t, uint64s, n, func(x []uint64) bool {
8347 t.Helper()
8348 a := archsimd.LoadUint64x4Slice(x)
8349 g := make([]int16, 8)
8350 f(a).StoreSlice(g)
8351 w := want(x)
8352 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8353 })
8354 }
8355
8356
8357
8358 func testInt8x64ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Int16x8, want func(x []int8) []int16) {
8359 n := 64
8360 t.Helper()
8361 forSlice(t, int8s, n, func(x []int8) bool {
8362 t.Helper()
8363 a := archsimd.LoadInt8x64Slice(x)
8364 g := make([]int16, 8)
8365 f(a).StoreSlice(g)
8366 w := want(x)
8367 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8368 })
8369 }
8370
8371
8372
8373 func testInt16x32ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Int16x8, want func(x []int16) []int16) {
8374 n := 32
8375 t.Helper()
8376 forSlice(t, int16s, n, func(x []int16) bool {
8377 t.Helper()
8378 a := archsimd.LoadInt16x32Slice(x)
8379 g := make([]int16, 8)
8380 f(a).StoreSlice(g)
8381 w := want(x)
8382 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8383 })
8384 }
8385
8386
8387
8388 func testInt32x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Int16x8, want func(x []int32) []int16) {
8389 n := 16
8390 t.Helper()
8391 forSlice(t, int32s, n, func(x []int32) bool {
8392 t.Helper()
8393 a := archsimd.LoadInt32x16Slice(x)
8394 g := make([]int16, 8)
8395 f(a).StoreSlice(g)
8396 w := want(x)
8397 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8398 })
8399 }
8400
8401
8402
8403 func testInt64x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Int16x8, want func(x []int64) []int16) {
8404 n := 8
8405 t.Helper()
8406 forSlice(t, int64s, n, func(x []int64) bool {
8407 t.Helper()
8408 a := archsimd.LoadInt64x8Slice(x)
8409 g := make([]int16, 8)
8410 f(a).StoreSlice(g)
8411 w := want(x)
8412 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8413 })
8414 }
8415
8416
8417
8418 func testUint8x64ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Int16x8, want func(x []uint8) []int16) {
8419 n := 64
8420 t.Helper()
8421 forSlice(t, uint8s, n, func(x []uint8) bool {
8422 t.Helper()
8423 a := archsimd.LoadUint8x64Slice(x)
8424 g := make([]int16, 8)
8425 f(a).StoreSlice(g)
8426 w := want(x)
8427 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8428 })
8429 }
8430
8431
8432
8433 func testUint16x32ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Int16x8, want func(x []uint16) []int16) {
8434 n := 32
8435 t.Helper()
8436 forSlice(t, uint16s, n, func(x []uint16) bool {
8437 t.Helper()
8438 a := archsimd.LoadUint16x32Slice(x)
8439 g := make([]int16, 8)
8440 f(a).StoreSlice(g)
8441 w := want(x)
8442 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8443 })
8444 }
8445
8446
8447
8448 func testUint32x16ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Int16x8, want func(x []uint32) []int16) {
8449 n := 16
8450 t.Helper()
8451 forSlice(t, uint32s, n, func(x []uint32) bool {
8452 t.Helper()
8453 a := archsimd.LoadUint32x16Slice(x)
8454 g := make([]int16, 8)
8455 f(a).StoreSlice(g)
8456 w := want(x)
8457 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8458 })
8459 }
8460
8461
8462
8463 func testUint64x8ConvertLoToInt16x8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Int16x8, want func(x []uint64) []int16) {
8464 n := 8
8465 t.Helper()
8466 forSlice(t, uint64s, n, func(x []uint64) bool {
8467 t.Helper()
8468 a := archsimd.LoadUint64x8Slice(x)
8469 g := make([]int16, 8)
8470 f(a).StoreSlice(g)
8471 w := want(x)
8472 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8473 })
8474 }
8475
8476
8477
8478 func testInt8x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint16x8, want func(x []int8) []uint16) {
8479 n := 16
8480 t.Helper()
8481 forSlice(t, int8s, n, func(x []int8) bool {
8482 t.Helper()
8483 a := archsimd.LoadInt8x16Slice(x)
8484 g := make([]uint16, 8)
8485 f(a).StoreSlice(g)
8486 w := want(x)
8487 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8488 })
8489 }
8490
8491
8492
8493 func testInt16x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint16x8, want func(x []int16) []uint16) {
8494 n := 8
8495 t.Helper()
8496 forSlice(t, int16s, n, func(x []int16) bool {
8497 t.Helper()
8498 a := archsimd.LoadInt16x8Slice(x)
8499 g := make([]uint16, 8)
8500 f(a).StoreSlice(g)
8501 w := want(x)
8502 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8503 })
8504 }
8505
8506
8507
8508 func testInt32x4ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint16x8, want func(x []int32) []uint16) {
8509 n := 4
8510 t.Helper()
8511 forSlice(t, int32s, n, func(x []int32) bool {
8512 t.Helper()
8513 a := archsimd.LoadInt32x4Slice(x)
8514 g := make([]uint16, 8)
8515 f(a).StoreSlice(g)
8516 w := want(x)
8517 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8518 })
8519 }
8520
8521
8522
8523 func testInt64x2ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint16x8, want func(x []int64) []uint16) {
8524 n := 2
8525 t.Helper()
8526 forSlice(t, int64s, n, func(x []int64) bool {
8527 t.Helper()
8528 a := archsimd.LoadInt64x2Slice(x)
8529 g := make([]uint16, 8)
8530 f(a).StoreSlice(g)
8531 w := want(x)
8532 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8533 })
8534 }
8535
8536
8537
8538 func testUint8x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint16x8, want func(x []uint8) []uint16) {
8539 n := 16
8540 t.Helper()
8541 forSlice(t, uint8s, n, func(x []uint8) bool {
8542 t.Helper()
8543 a := archsimd.LoadUint8x16Slice(x)
8544 g := make([]uint16, 8)
8545 f(a).StoreSlice(g)
8546 w := want(x)
8547 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8548 })
8549 }
8550
8551
8552
8553 func testUint16x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint16x8, want func(x []uint16) []uint16) {
8554 n := 8
8555 t.Helper()
8556 forSlice(t, uint16s, n, func(x []uint16) bool {
8557 t.Helper()
8558 a := archsimd.LoadUint16x8Slice(x)
8559 g := make([]uint16, 8)
8560 f(a).StoreSlice(g)
8561 w := want(x)
8562 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8563 })
8564 }
8565
8566
8567
8568 func testUint32x4ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint16x8, want func(x []uint32) []uint16) {
8569 n := 4
8570 t.Helper()
8571 forSlice(t, uint32s, n, func(x []uint32) bool {
8572 t.Helper()
8573 a := archsimd.LoadUint32x4Slice(x)
8574 g := make([]uint16, 8)
8575 f(a).StoreSlice(g)
8576 w := want(x)
8577 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8578 })
8579 }
8580
8581
8582
8583 func testUint64x2ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint16x8, want func(x []uint64) []uint16) {
8584 n := 2
8585 t.Helper()
8586 forSlice(t, uint64s, n, func(x []uint64) bool {
8587 t.Helper()
8588 a := archsimd.LoadUint64x2Slice(x)
8589 g := make([]uint16, 8)
8590 f(a).StoreSlice(g)
8591 w := want(x)
8592 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8593 })
8594 }
8595
8596
8597
8598 func testInt8x32ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int8x32) archsimd.Uint16x8, want func(x []int8) []uint16) {
8599 n := 32
8600 t.Helper()
8601 forSlice(t, int8s, n, func(x []int8) bool {
8602 t.Helper()
8603 a := archsimd.LoadInt8x32Slice(x)
8604 g := make([]uint16, 8)
8605 f(a).StoreSlice(g)
8606 w := want(x)
8607 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8608 })
8609 }
8610
8611
8612
8613 func testInt16x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int16x16) archsimd.Uint16x8, want func(x []int16) []uint16) {
8614 n := 16
8615 t.Helper()
8616 forSlice(t, int16s, n, func(x []int16) bool {
8617 t.Helper()
8618 a := archsimd.LoadInt16x16Slice(x)
8619 g := make([]uint16, 8)
8620 f(a).StoreSlice(g)
8621 w := want(x)
8622 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8623 })
8624 }
8625
8626
8627
8628 func testInt32x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int32x8) archsimd.Uint16x8, want func(x []int32) []uint16) {
8629 n := 8
8630 t.Helper()
8631 forSlice(t, int32s, n, func(x []int32) bool {
8632 t.Helper()
8633 a := archsimd.LoadInt32x8Slice(x)
8634 g := make([]uint16, 8)
8635 f(a).StoreSlice(g)
8636 w := want(x)
8637 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8638 })
8639 }
8640
8641
8642
8643 func testInt64x4ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int64x4) archsimd.Uint16x8, want func(x []int64) []uint16) {
8644 n := 4
8645 t.Helper()
8646 forSlice(t, int64s, n, func(x []int64) bool {
8647 t.Helper()
8648 a := archsimd.LoadInt64x4Slice(x)
8649 g := make([]uint16, 8)
8650 f(a).StoreSlice(g)
8651 w := want(x)
8652 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8653 })
8654 }
8655
8656
8657
8658 func testUint8x32ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint8x32) archsimd.Uint16x8, want func(x []uint8) []uint16) {
8659 n := 32
8660 t.Helper()
8661 forSlice(t, uint8s, n, func(x []uint8) bool {
8662 t.Helper()
8663 a := archsimd.LoadUint8x32Slice(x)
8664 g := make([]uint16, 8)
8665 f(a).StoreSlice(g)
8666 w := want(x)
8667 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8668 })
8669 }
8670
8671
8672
8673 func testUint16x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint16x16) archsimd.Uint16x8, want func(x []uint16) []uint16) {
8674 n := 16
8675 t.Helper()
8676 forSlice(t, uint16s, n, func(x []uint16) bool {
8677 t.Helper()
8678 a := archsimd.LoadUint16x16Slice(x)
8679 g := make([]uint16, 8)
8680 f(a).StoreSlice(g)
8681 w := want(x)
8682 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8683 })
8684 }
8685
8686
8687
8688 func testUint32x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint32x8) archsimd.Uint16x8, want func(x []uint32) []uint16) {
8689 n := 8
8690 t.Helper()
8691 forSlice(t, uint32s, n, func(x []uint32) bool {
8692 t.Helper()
8693 a := archsimd.LoadUint32x8Slice(x)
8694 g := make([]uint16, 8)
8695 f(a).StoreSlice(g)
8696 w := want(x)
8697 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8698 })
8699 }
8700
8701
8702
8703 func testUint64x4ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint64x4) archsimd.Uint16x8, want func(x []uint64) []uint16) {
8704 n := 4
8705 t.Helper()
8706 forSlice(t, uint64s, n, func(x []uint64) bool {
8707 t.Helper()
8708 a := archsimd.LoadUint64x4Slice(x)
8709 g := make([]uint16, 8)
8710 f(a).StoreSlice(g)
8711 w := want(x)
8712 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8713 })
8714 }
8715
8716
8717
8718 func testInt8x64ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int8x64) archsimd.Uint16x8, want func(x []int8) []uint16) {
8719 n := 64
8720 t.Helper()
8721 forSlice(t, int8s, n, func(x []int8) bool {
8722 t.Helper()
8723 a := archsimd.LoadInt8x64Slice(x)
8724 g := make([]uint16, 8)
8725 f(a).StoreSlice(g)
8726 w := want(x)
8727 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8728 })
8729 }
8730
8731
8732
8733 func testInt16x32ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int16x32) archsimd.Uint16x8, want func(x []int16) []uint16) {
8734 n := 32
8735 t.Helper()
8736 forSlice(t, int16s, n, func(x []int16) bool {
8737 t.Helper()
8738 a := archsimd.LoadInt16x32Slice(x)
8739 g := make([]uint16, 8)
8740 f(a).StoreSlice(g)
8741 w := want(x)
8742 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8743 })
8744 }
8745
8746
8747
8748 func testInt32x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int32x16) archsimd.Uint16x8, want func(x []int32) []uint16) {
8749 n := 16
8750 t.Helper()
8751 forSlice(t, int32s, n, func(x []int32) bool {
8752 t.Helper()
8753 a := archsimd.LoadInt32x16Slice(x)
8754 g := make([]uint16, 8)
8755 f(a).StoreSlice(g)
8756 w := want(x)
8757 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8758 })
8759 }
8760
8761
8762
8763 func testInt64x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Int64x8) archsimd.Uint16x8, want func(x []int64) []uint16) {
8764 n := 8
8765 t.Helper()
8766 forSlice(t, int64s, n, func(x []int64) bool {
8767 t.Helper()
8768 a := archsimd.LoadInt64x8Slice(x)
8769 g := make([]uint16, 8)
8770 f(a).StoreSlice(g)
8771 w := want(x)
8772 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8773 })
8774 }
8775
8776
8777
8778 func testUint8x64ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint8x64) archsimd.Uint16x8, want func(x []uint8) []uint16) {
8779 n := 64
8780 t.Helper()
8781 forSlice(t, uint8s, n, func(x []uint8) bool {
8782 t.Helper()
8783 a := archsimd.LoadUint8x64Slice(x)
8784 g := make([]uint16, 8)
8785 f(a).StoreSlice(g)
8786 w := want(x)
8787 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8788 })
8789 }
8790
8791
8792
8793 func testUint16x32ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint16x32) archsimd.Uint16x8, want func(x []uint16) []uint16) {
8794 n := 32
8795 t.Helper()
8796 forSlice(t, uint16s, n, func(x []uint16) bool {
8797 t.Helper()
8798 a := archsimd.LoadUint16x32Slice(x)
8799 g := make([]uint16, 8)
8800 f(a).StoreSlice(g)
8801 w := want(x)
8802 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8803 })
8804 }
8805
8806
8807
8808 func testUint32x16ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint32x16) archsimd.Uint16x8, want func(x []uint32) []uint16) {
8809 n := 16
8810 t.Helper()
8811 forSlice(t, uint32s, n, func(x []uint32) bool {
8812 t.Helper()
8813 a := archsimd.LoadUint32x16Slice(x)
8814 g := make([]uint16, 8)
8815 f(a).StoreSlice(g)
8816 w := want(x)
8817 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8818 })
8819 }
8820
8821
8822
8823 func testUint64x8ConvertLoToUint16x8(t *testing.T, f func(x archsimd.Uint64x8) archsimd.Uint16x8, want func(x []uint64) []uint16) {
8824 n := 8
8825 t.Helper()
8826 forSlice(t, uint64s, n, func(x []uint64) bool {
8827 t.Helper()
8828 a := archsimd.LoadUint64x8Slice(x)
8829 g := make([]uint16, 8)
8830 f(a).StoreSlice(g)
8831 w := want(x)
8832 return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) })
8833 })
8834 }
8835
8836
8837
8838 func testFloat32x4UnaryFlaky(t *testing.T, f func(x archsimd.Float32x4) archsimd.Float32x4, want func(x []float32) []float32, flakiness float64) {
8839 n := 4
8840 t.Helper()
8841 forSlice(t, float32s, n, func(x []float32) bool {
8842 t.Helper()
8843 a := archsimd.LoadFloat32x4Slice(x)
8844 g := make([]float32, n)
8845 f(a).StoreSlice(g)
8846 w := want(x)
8847 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8848 })
8849 }
8850
8851
8852
8853 func testFloat64x2UnaryFlaky(t *testing.T, f func(x archsimd.Float64x2) archsimd.Float64x2, want func(x []float64) []float64, flakiness float64) {
8854 n := 2
8855 t.Helper()
8856 forSlice(t, float64s, n, func(x []float64) bool {
8857 t.Helper()
8858 a := archsimd.LoadFloat64x2Slice(x)
8859 g := make([]float64, n)
8860 f(a).StoreSlice(g)
8861 w := want(x)
8862 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8863 })
8864 }
8865
8866
8867
8868 func testFloat32x8UnaryFlaky(t *testing.T, f func(x archsimd.Float32x8) archsimd.Float32x8, want func(x []float32) []float32, flakiness float64) {
8869 n := 8
8870 t.Helper()
8871 forSlice(t, float32s, n, func(x []float32) bool {
8872 t.Helper()
8873 a := archsimd.LoadFloat32x8Slice(x)
8874 g := make([]float32, n)
8875 f(a).StoreSlice(g)
8876 w := want(x)
8877 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8878 })
8879 }
8880
8881
8882
8883 func testFloat64x4UnaryFlaky(t *testing.T, f func(x archsimd.Float64x4) archsimd.Float64x4, want func(x []float64) []float64, flakiness float64) {
8884 n := 4
8885 t.Helper()
8886 forSlice(t, float64s, n, func(x []float64) bool {
8887 t.Helper()
8888 a := archsimd.LoadFloat64x4Slice(x)
8889 g := make([]float64, n)
8890 f(a).StoreSlice(g)
8891 w := want(x)
8892 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8893 })
8894 }
8895
8896
8897
8898 func testFloat32x16UnaryFlaky(t *testing.T, f func(x archsimd.Float32x16) archsimd.Float32x16, want func(x []float32) []float32, flakiness float64) {
8899 n := 16
8900 t.Helper()
8901 forSlice(t, float32s, n, func(x []float32) bool {
8902 t.Helper()
8903 a := archsimd.LoadFloat32x16Slice(x)
8904 g := make([]float32, n)
8905 f(a).StoreSlice(g)
8906 w := want(x)
8907 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8908 })
8909 }
8910
8911
8912
8913 func testFloat64x8UnaryFlaky(t *testing.T, f func(x archsimd.Float64x8) archsimd.Float64x8, want func(x []float64) []float64, flakiness float64) {
8914 n := 8
8915 t.Helper()
8916 forSlice(t, float64s, n, func(x []float64) bool {
8917 t.Helper()
8918 a := archsimd.LoadFloat64x8Slice(x)
8919 g := make([]float64, n)
8920 f(a).StoreSlice(g)
8921 w := want(x)
8922 return checkSlicesLogInput(t, g, w, flakiness, func() { t.Helper(); t.Logf("x=%v", x) })
8923 })
8924 }
8925
View as plain text