Source file src/simd/archsimd/internal/simd_test/minmax_128_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 && (arm64 || wasm)
     6  
     7  package simd_test
     8  
     9  import (
    10  	"runtime"
    11  	"simd/archsimd"
    12  )
    13  
    14  func floatMinMaxPlatformConfig() floatMinMaxConfig {
    15  	return floatMinMaxConfig{allowMasked: true, allowAnyNaN: runtime.GOARCH == "wasm"}
    16  }
    17  
    18  func floatMinMaxMask32x4() archsimd.Mask32x4 {
    19  	return archsimd.LoadInt32x4([]int32{1, 0, 1, 0}).Greater(archsimd.LoadInt32x4([]int32{0, 0, 0, 0}))
    20  }
    21  
    22  func floatMinMaxMask64x2() archsimd.Mask64x2 {
    23  	return archsimd.LoadInt64x2([]int64{1, 0}).Greater(archsimd.LoadInt64x2([]int64{0, 0}))
    24  }
    25  

View as plain text