Skip to content

Commit

Permalink
Run tests for AVX(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jille committed Oct 15, 2024
1 parent bb0cc00 commit 88cae30
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,17 @@ jobs:
- name: Build
run: go build -v ./...

- name: Test
- name: Test platform default
run: go test -count=500 ./...

- name: Test GOAMD64=v3
- name: Test AVX2
run: go test -count=500 ./...
env:
GOAMD64: v3

- name: Test AVX1
run: go test -count=500 -tags vectorcmp_testing_avx ./...

- name: Test purego
run: go test -count=500 -tags purego ./...

Expand Down
2 changes: 1 addition & 1 deletion detect_avx2_always.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build amd64.v3 && !purego
//go:build amd64.v3 && !purego && !vectorcmp_testing_avx

package vectorcmp

Expand Down
2 changes: 1 addition & 1 deletion detect_avx2_never.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !amd64 || purego
//go:build (!amd64 || purego) && !vectorcmp_testing_avx

package vectorcmp

Expand Down
2 changes: 1 addition & 1 deletion detect_avx2_runtime.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build amd64 && !amd64.v3 && !purego
//go:build amd64 && !amd64.v3 && !purego && !vectorcmp_testing_avx

package vectorcmp

Expand Down
11 changes: 11 additions & 0 deletions detect_avx2_testing.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//go:build vectorcmp_testing_avx

package vectorcmp

func hasAVX() bool {
return true
}

func hasAVX2() bool {
return false
}

0 comments on commit 88cae30

Please sign in to comment.