mirror of
https://github.com/golang/go.git
synced 2025-12-28 06:34:04 +00:00
simd/archsimd: skip tests if AVX is not available
The simd operations require AVX. If AVX is not available, skip the tests. Change-Id: I3c384ba07e1e6c2c198dfb27bc84a2e27f825680 Reviewed-on: https://go-review.googlesource.com/c/go/+/729820 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
d30884ba1f
commit
1b291b70df
@ -7,12 +7,22 @@
|
||||
package simd_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"simd/archsimd"
|
||||
"slices"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if !archsimd.X86.AVX() {
|
||||
fmt.Fprintln(os.Stderr, "Skipping tests: AVX is not available")
|
||||
os.Exit(0)
|
||||
}
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
var sink any
|
||||
|
||||
func TestType(t *testing.T) {
|
||||
|
||||
@ -7,11 +7,21 @@
|
||||
package archsimd_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"simd/archsimd"
|
||||
"simd/archsimd/internal/test_helpers"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
if !archsimd.X86.AVX() {
|
||||
fmt.Fprintln(os.Stderr, "Skipping tests: AVX is not available")
|
||||
os.Exit(0)
|
||||
}
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
|
||||
func TestConcatSelectedConstant64(t *testing.T) {
|
||||
a := make([]int64, 2)
|
||||
x := archsimd.LoadInt64x2Slice([]int64{4, 5})
|
||||
|
||||
Loading…
Reference in New Issue
Block a user