Clean up build tags (#126)

Move non-amd64 code to a separate file and remove references in other files.

Fixes #125
master
Klaus Post 2020-05-04 20:06:47 +02:00 committed by GitHub
parent a0556fddfa
commit f525ef0450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 14 deletions

View File

@ -47,6 +47,3 @@ func sliceXor(in, out []byte, sse2 bool) {
out[n] ^= input
}
}
func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
}

View File

@ -32,11 +32,3 @@ func sliceXor(in, out []byte, sse2 bool) {
func init() {
defaultOptions.useAVX512 = false
}
func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
panic("codeSomeShardsAvx512 should not be called if built without asm")
}
func (r reedSolomon) codeSomeShardsAvx512P(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
panic("codeSomeShardsAvx512P should not be called if built without asm")
}

13
galois_notamd64.go Normal file
View File

@ -0,0 +1,13 @@
//+build !amd64 noasm appengine gccgo
// Copyright 2020, Klaus Post, see LICENSE for details.
package reedsolomon
func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
panic("codeSomeShardsAvx512 should not be called if built without asm")
}
func (r reedSolomon) codeSomeShardsAvx512P(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
panic("codeSomeShardsAvx512P should not be called if built without asm")
}

View File

@ -65,6 +65,3 @@ func sliceXor(in, out []byte, sse2 bool) {
out[n] ^= input
}
}
func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
}