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

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build goexperiment.simd && wasm
     6  
     7  package simd_test
     8  
     9  import (
    10  	"simd/archsimd"
    11  	"testing"
    12  )
    13  
    14  func TestMaxWasm(t *testing.T) {
    15  	testInt64x2Binary(t, archsimd.Int64x2.Max, maxSlice[int64])
    16  	testUint64x2Binary(t, archsimd.Uint64x2.Max, maxSlice[uint64])
    17  }
    18  
    19  func TestMinWasm(t *testing.T) {
    20  	testInt64x2Binary(t, archsimd.Int64x2.Min, minSlice[int64])
    21  	testUint64x2Binary(t, archsimd.Uint64x2.Min, minSlice[uint64])
    22  }
    23  
    24  func TestMulWasm(t *testing.T) {
    25  	testInt64x2Binary(t, archsimd.Int64x2.Mul, mulSlice[int64])
    26  	testUint64x2Binary(t, archsimd.Uint64x2.Mul, mulSlice[uint64])
    27  }
    28  

View as plain text