Source file src/simd/archsimd/internal/simd_test/unary_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 TestOnesCountWasm(t *testing.T) {
    15  	testInt16x8Unary(t, archsimd.Int16x8.OnesCount, map1[int16](onesCount))
    16  	testUint16x8Unary(t, archsimd.Uint16x8.OnesCount, map1[uint16](onesCount))
    17  	testInt32x4Unary(t, archsimd.Int32x4.OnesCount, map1[int32](onesCount))
    18  	testUint32x4Unary(t, archsimd.Uint32x4.OnesCount, map1[uint32](onesCount))
    19  	testInt64x2Unary(t, archsimd.Int64x2.OnesCount, map1[int64](onesCount))
    20  	testUint64x2Unary(t, archsimd.Uint64x2.OnesCount, map1[uint64](onesCount))
    21  }
    22  

View as plain text