Skip to content

Commit

Permalink
Update interfaces & tests (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
klauspost authored Sep 5, 2022
1 parent 6939176 commit c63d6dc
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 218 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ jobs:
run: go test ./...

- name: Test Noasm
run: go test -tags=noasm&&go test -no-avx512&&go test -no-avx512 -no-avx2&&go test -no-avx512 -no-avx2 -no-ssse3
run: go test -tags=noasm -short&&go test -short -no-avx512&&go test -short -no-avx512 -no-avx2&&go test -no-avx512 -no-avx2 -no-ssse3 -short

- name: Test Race
env:
CGO_ENABLED: 1
run: go test -cpu="1,4" -short -race -v .
run: go test -cpu="1,4" -short -race -v -timeout 20m .

build-special:
env:
Expand Down
6 changes: 3 additions & 3 deletions galoisAvx512_amd64_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,14 @@ func testCodeSomeShardsAvx512WithLength(t *testing.T, ds, ps, l int, parallel bo
shards, _ := enc.Split(data)

// Fill shards to encode with garbage
for i := r.DataShards; i < r.DataShards+r.ParityShards; i++ {
for i := r.dataShards; i < r.dataShards+r.parityShards; i++ {
rand.Read(shards[i])
}

if parallel {
r.codeSomeShardsAvx512P(r.parity, shards[:r.DataShards], shards[r.DataShards:], len(shards[0]))
r.codeSomeShardsAvx512P(r.parity, shards[:r.dataShards], shards[r.dataShards:], len(shards[0]))
} else {
r.codeSomeShardsAvx512(r.parity, shards[:r.DataShards], shards[r.DataShards:r.DataShards+r.ParityShards], len(shards[0]))
r.codeSomeShardsAvx512(r.parity, shards[:r.dataShards], shards[r.dataShards:r.dataShards+r.parityShards], len(shards[0]))
}

correct, _ := r.Verify(shards)
Expand Down
Loading

0 comments on commit c63d6dc

Please sign in to comment.