| // Code generated by 'tmplgen'; DO NOT EDIT. |
| |
| //go:build goexperiment.simd && arm64 |
| |
| // This file contains functions testing unary simd methods. |
| // Each function in this file is specialized for a |
| // particular simd type <BaseType><Width>x<Count>. |
| |
| package simd_test |
| |
| import ( |
| "simd/archsimd" |
| "testing" |
| ) |
| |
| // testInt8x16ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToInt8x16(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int8x16, want func(x []int8) []int8) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToInt8x16(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int8x16, want func(x []int16) []int8) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToInt8x16(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int8x16, want func(x []int32) []int8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToInt8x16(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int8x16, want func(x []int64) []int8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToInt8x16(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int8x16, want func(x []uint8) []int8) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToInt8x16(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int8x16, want func(x []uint16) []int8) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToInt8x16(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int8x16, want func(x []uint32) []int8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToInt8x16(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int8x16, want func(x []uint64) []int8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToInt8x16(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int8x16, want func(x []float32) []int8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToInt8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToInt8x16(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int8x16, want func(x []float64) []int8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]int8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToUint8x16(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint8x16, want func(x []int8) []uint8) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToUint8x16(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint8x16, want func(x []int16) []uint8) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToUint8x16(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint8x16, want func(x []int32) []uint8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToUint8x16(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint8x16, want func(x []int64) []uint8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToUint8x16(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint8x16, want func(x []uint8) []uint8) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToUint8x16(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint8x16, want func(x []uint16) []uint8) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToUint8x16(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint8x16, want func(x []uint32) []uint8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToUint8x16(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint8x16, want func(x []uint64) []uint8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToUint8x16(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint8x16, want func(x []float32) []uint8) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToUint8x16 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToUint8x16(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint8x16, want func(x []float64) []uint8) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]uint8, 16) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToInt16x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int16x8, want func(x []int8) []int16) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToInt16x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int16x8, want func(x []int16) []int16) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToInt16x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int16x8, want func(x []int32) []int16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToInt16x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int16x8, want func(x []int64) []int16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToInt16x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int16x8, want func(x []uint8) []int16) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToInt16x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int16x8, want func(x []uint16) []int16) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToInt16x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int16x8, want func(x []uint32) []int16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToInt16x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int16x8, want func(x []uint64) []int16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToInt16x8(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int16x8, want func(x []float32) []int16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToInt16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToInt16x8(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int16x8, want func(x []float64) []int16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]int16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToUint16x8(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint16x8, want func(x []int8) []uint16) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToUint16x8(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint16x8, want func(x []int16) []uint16) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToUint16x8(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint16x8, want func(x []int32) []uint16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToUint16x8(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint16x8, want func(x []int64) []uint16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToUint16x8(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint16x8, want func(x []uint8) []uint16) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToUint16x8(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint16x8, want func(x []uint16) []uint16) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToUint16x8(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint16x8, want func(x []uint32) []uint16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToUint16x8(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint16x8, want func(x []uint64) []uint16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToUint16x8(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint16x8, want func(x []float32) []uint16) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToUint16x8 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToUint16x8(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint16x8, want func(x []float64) []uint16) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]uint16, 8) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToInt32x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int32x4, want func(x []int8) []int32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToInt32x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int32x4, want func(x []int16) []int32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToInt32x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int32x4, want func(x []int32) []int32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToInt32x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int32x4, want func(x []int64) []int32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToInt32x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int32x4, want func(x []uint8) []int32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToInt32x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int32x4, want func(x []uint16) []int32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToInt32x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int32x4, want func(x []uint32) []int32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToInt32x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int32x4, want func(x []uint64) []int32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToInt32x4(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int32x4, want func(x []float32) []int32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToInt32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToInt32x4(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int32x4, want func(x []float64) []int32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]int32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToUint32x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint32x4, want func(x []int8) []uint32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToUint32x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint32x4, want func(x []int16) []uint32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToUint32x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint32x4, want func(x []int32) []uint32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToUint32x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint32x4, want func(x []int64) []uint32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToUint32x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint32x4, want func(x []uint8) []uint32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToUint32x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint32x4, want func(x []uint16) []uint32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToUint32x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint32x4, want func(x []uint32) []uint32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToUint32x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint32x4, want func(x []uint64) []uint32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToUint32x4(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint32x4, want func(x []float32) []uint32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToUint32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToUint32x4(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint32x4, want func(x []float64) []uint32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]uint32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToInt64x2(t *testing.T, f func(x archsimd.Int8x16) archsimd.Int64x2, want func(x []int8) []int64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToInt64x2(t *testing.T, f func(x archsimd.Int16x8) archsimd.Int64x2, want func(x []int16) []int64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToInt64x2(t *testing.T, f func(x archsimd.Int32x4) archsimd.Int64x2, want func(x []int32) []int64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToInt64x2(t *testing.T, f func(x archsimd.Int64x2) archsimd.Int64x2, want func(x []int64) []int64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToInt64x2(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Int64x2, want func(x []uint8) []int64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToInt64x2(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Int64x2, want func(x []uint16) []int64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToInt64x2(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Int64x2, want func(x []uint32) []int64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToInt64x2(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Int64x2, want func(x []uint64) []int64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToInt64x2(t *testing.T, f func(x archsimd.Float32x4) archsimd.Int64x2, want func(x []float32) []int64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToInt64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToInt64x2(t *testing.T, f func(x archsimd.Float64x2) archsimd.Int64x2, want func(x []float64) []int64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]int64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToUint64x2(t *testing.T, f func(x archsimd.Int8x16) archsimd.Uint64x2, want func(x []int8) []uint64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToUint64x2(t *testing.T, f func(x archsimd.Int16x8) archsimd.Uint64x2, want func(x []int16) []uint64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToUint64x2(t *testing.T, f func(x archsimd.Int32x4) archsimd.Uint64x2, want func(x []int32) []uint64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToUint64x2(t *testing.T, f func(x archsimd.Int64x2) archsimd.Uint64x2, want func(x []int64) []uint64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToUint64x2(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Uint64x2, want func(x []uint8) []uint64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToUint64x2(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Uint64x2, want func(x []uint16) []uint64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToUint64x2(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Uint64x2, want func(x []uint32) []uint64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToUint64x2(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Uint64x2, want func(x []uint64) []uint64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToUint64x2(t *testing.T, f func(x archsimd.Float32x4) archsimd.Uint64x2, want func(x []float32) []uint64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToUint64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToUint64x2(t *testing.T, f func(x archsimd.Float64x2) archsimd.Uint64x2, want func(x []float64) []uint64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]uint64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToFloat32x4(t *testing.T, f func(x archsimd.Int8x16) archsimd.Float32x4, want func(x []int8) []float32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToFloat32x4(t *testing.T, f func(x archsimd.Int16x8) archsimd.Float32x4, want func(x []int16) []float32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToFloat32x4(t *testing.T, f func(x archsimd.Int32x4) archsimd.Float32x4, want func(x []int32) []float32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToFloat32x4(t *testing.T, f func(x archsimd.Int64x2) archsimd.Float32x4, want func(x []int64) []float32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToFloat32x4(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Float32x4, want func(x []uint8) []float32) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToFloat32x4(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Float32x4, want func(x []uint16) []float32) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToFloat32x4(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Float32x4, want func(x []uint32) []float32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToFloat32x4(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Float32x4, want func(x []uint64) []float32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToFloat32x4(t *testing.T, f func(x archsimd.Float32x4) archsimd.Float32x4, want func(x []float32) []float32) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToFloat32x4 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToFloat32x4(t *testing.T, f func(x archsimd.Float64x2) archsimd.Float32x4, want func(x []float64) []float32) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]float32, 4) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt8x16ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt8x16ConvertToFloat64x2(t *testing.T, f func(x archsimd.Int8x16) archsimd.Float64x2, want func(x []int8) []float64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, int8s, n, func(x []int8) bool { |
| t.Helper() |
| a := archsimd.LoadInt8x16(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt16x8ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt16x8ConvertToFloat64x2(t *testing.T, f func(x archsimd.Int16x8) archsimd.Float64x2, want func(x []int16) []float64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, int16s, n, func(x []int16) bool { |
| t.Helper() |
| a := archsimd.LoadInt16x8(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt32x4ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt32x4ConvertToFloat64x2(t *testing.T, f func(x archsimd.Int32x4) archsimd.Float64x2, want func(x []int32) []float64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, int32s, n, func(x []int32) bool { |
| t.Helper() |
| a := archsimd.LoadInt32x4(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testInt64x2ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testInt64x2ConvertToFloat64x2(t *testing.T, f func(x archsimd.Int64x2) archsimd.Float64x2, want func(x []int64) []float64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, int64s, n, func(x []int64) bool { |
| t.Helper() |
| a := archsimd.LoadInt64x2(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint8x16ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint8x16ConvertToFloat64x2(t *testing.T, f func(x archsimd.Uint8x16) archsimd.Float64x2, want func(x []uint8) []float64) { |
| n := 16 |
| t.Helper() |
| forSlice(t, uint8s, n, func(x []uint8) bool { |
| t.Helper() |
| a := archsimd.LoadUint8x16(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint16x8ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint16x8ConvertToFloat64x2(t *testing.T, f func(x archsimd.Uint16x8) archsimd.Float64x2, want func(x []uint16) []float64) { |
| n := 8 |
| t.Helper() |
| forSlice(t, uint16s, n, func(x []uint16) bool { |
| t.Helper() |
| a := archsimd.LoadUint16x8(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint32x4ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint32x4ConvertToFloat64x2(t *testing.T, f func(x archsimd.Uint32x4) archsimd.Float64x2, want func(x []uint32) []float64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, uint32s, n, func(x []uint32) bool { |
| t.Helper() |
| a := archsimd.LoadUint32x4(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testUint64x2ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testUint64x2ConvertToFloat64x2(t *testing.T, f func(x archsimd.Uint64x2) archsimd.Float64x2, want func(x []uint64) []float64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, uint64s, n, func(x []uint64) bool { |
| t.Helper() |
| a := archsimd.LoadUint64x2(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat32x4ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat32x4ConvertToFloat64x2(t *testing.T, f func(x archsimd.Float32x4) archsimd.Float64x2, want func(x []float32) []float64) { |
| n := 4 |
| t.Helper() |
| forSlice(t, float32s, n, func(x []float32) bool { |
| t.Helper() |
| a := archsimd.LoadFloat32x4(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |
| |
| // testFloat64x2ConvertToFloat64x2 tests the simd conversion method f against the expected behavior generated by want. |
| func testFloat64x2ConvertToFloat64x2(t *testing.T, f func(x archsimd.Float64x2) archsimd.Float64x2, want func(x []float64) []float64) { |
| n := 2 |
| t.Helper() |
| forSlice(t, float64s, n, func(x []float64) bool { |
| t.Helper() |
| a := archsimd.LoadFloat64x2(x) |
| g := make([]float64, 2) |
| f(a).Store(g) |
| w := want(x) |
| return checkSlicesLogInput(t, g, w, 0.0, func() { t.Helper(); t.Logf("x=%v", x) }) |
| }) |
| } |