Source file src/simd/archsimd/internal/simd_test/equal_128_gen_test.go

     1  // Code generated by 'tmplgen'; DO NOT EDIT.
     2  
     3  //go:build goexperiment.simdstable && (amd64 || wasm || arm64)
     4  
     5  // This file contains tests of == and != on simd vectors and masks.
     6  
     7  package simd_test
     8  
     9  import (
    10  	"simd/archsimd"
    11  	"simd/internal/test_helpers"
    12  	"testing"
    13  )
    14  
    15  func TestEqualInt8x16(t *testing.T) {
    16  	test_helpers.CheckVectorEqual(t, archsimd.LoadInt8x16,
    17  		func(x, y archsimd.Int8x16) bool { return x == y },
    18  		func(x, y archsimd.Int8x16) bool { return x != y },
    19  		int8s)
    20  }
    21  
    22  func TestEqualMask8x16(t *testing.T) {
    23  	test_helpers.CheckMaskEqual(t, archsimd.LoadInt8x16,
    24  		func(x, y archsimd.Mask8x16) bool { return x == y },
    25  		func(x, y archsimd.Mask8x16) bool { return x != y })
    26  }
    27  
    28  func TestEqualInt16x8(t *testing.T) {
    29  	test_helpers.CheckVectorEqual(t, archsimd.LoadInt16x8,
    30  		func(x, y archsimd.Int16x8) bool { return x == y },
    31  		func(x, y archsimd.Int16x8) bool { return x != y },
    32  		int16s)
    33  }
    34  
    35  func TestEqualMask16x8(t *testing.T) {
    36  	test_helpers.CheckMaskEqual(t, archsimd.LoadInt16x8,
    37  		func(x, y archsimd.Mask16x8) bool { return x == y },
    38  		func(x, y archsimd.Mask16x8) bool { return x != y })
    39  }
    40  
    41  func TestEqualInt32x4(t *testing.T) {
    42  	test_helpers.CheckVectorEqual(t, archsimd.LoadInt32x4,
    43  		func(x, y archsimd.Int32x4) bool { return x == y },
    44  		func(x, y archsimd.Int32x4) bool { return x != y },
    45  		int32s)
    46  }
    47  
    48  func TestEqualMask32x4(t *testing.T) {
    49  	test_helpers.CheckMaskEqual(t, archsimd.LoadInt32x4,
    50  		func(x, y archsimd.Mask32x4) bool { return x == y },
    51  		func(x, y archsimd.Mask32x4) bool { return x != y })
    52  }
    53  
    54  func TestEqualInt64x2(t *testing.T) {
    55  	test_helpers.CheckVectorEqual(t, archsimd.LoadInt64x2,
    56  		func(x, y archsimd.Int64x2) bool { return x == y },
    57  		func(x, y archsimd.Int64x2) bool { return x != y },
    58  		int64s)
    59  }
    60  
    61  func TestEqualMask64x2(t *testing.T) {
    62  	test_helpers.CheckMaskEqual(t, archsimd.LoadInt64x2,
    63  		func(x, y archsimd.Mask64x2) bool { return x == y },
    64  		func(x, y archsimd.Mask64x2) bool { return x != y })
    65  }
    66  
    67  func TestEqualUint8x16(t *testing.T) {
    68  	test_helpers.CheckVectorEqual(t, archsimd.LoadUint8x16,
    69  		func(x, y archsimd.Uint8x16) bool { return x == y },
    70  		func(x, y archsimd.Uint8x16) bool { return x != y },
    71  		uint8s)
    72  }
    73  
    74  func TestEqualUint16x8(t *testing.T) {
    75  	test_helpers.CheckVectorEqual(t, archsimd.LoadUint16x8,
    76  		func(x, y archsimd.Uint16x8) bool { return x == y },
    77  		func(x, y archsimd.Uint16x8) bool { return x != y },
    78  		uint16s)
    79  }
    80  
    81  func TestEqualUint32x4(t *testing.T) {
    82  	test_helpers.CheckVectorEqual(t, archsimd.LoadUint32x4,
    83  		func(x, y archsimd.Uint32x4) bool { return x == y },
    84  		func(x, y archsimd.Uint32x4) bool { return x != y },
    85  		uint32s)
    86  }
    87  
    88  func TestEqualUint64x2(t *testing.T) {
    89  	test_helpers.CheckVectorEqual(t, archsimd.LoadUint64x2,
    90  		func(x, y archsimd.Uint64x2) bool { return x == y },
    91  		func(x, y archsimd.Uint64x2) bool { return x != y },
    92  		uint64s)
    93  }
    94  
    95  func TestEqualFloat32x4(t *testing.T) {
    96  	test_helpers.CheckVectorEqual(t, archsimd.LoadFloat32x4,
    97  		func(x, y archsimd.Float32x4) bool { return x == y },
    98  		func(x, y archsimd.Float32x4) bool { return x != y },
    99  		float32s)
   100  }
   101  
   102  func TestEqualFloat64x2(t *testing.T) {
   103  	test_helpers.CheckVectorEqual(t, archsimd.LoadFloat64x2,
   104  		func(x, y archsimd.Float64x2) bool { return x == y },
   105  		func(x, y archsimd.Float64x2) bool { return x != y },
   106  		float64s)
   107  }
   108  

View as plain text