parent
a373324398
commit
0883d2f011
|
@ -852,6 +852,9 @@ func galMultiply(a, b byte) byte {
|
|||
return mulTable[a][b]
|
||||
}
|
||||
|
||||
// amd64 indicates whether we are on an amd64 platform.
|
||||
var amd64 bool
|
||||
|
||||
// Original function:
|
||||
/*
|
||||
// galMultiply multiplies to elements of the field.
|
||||
|
|
|
@ -13,6 +13,10 @@ func _galMulAVX512Parallel82(in, out [][]byte, matrix *[matrixSize82]byte, addTo
|
|||
//go:noescape
|
||||
func _galMulAVX512Parallel84(in, out [][]byte, matrix *[matrixSize84]byte, addTo bool)
|
||||
|
||||
func init() {
|
||||
amd64 = true
|
||||
}
|
||||
|
||||
const (
|
||||
dimIn = 8 // Number of input rows processed simultaneously
|
||||
dimOut82 = 2 // Number of output rows processed simultaneously for x2 routine
|
||||
|
|
|
@ -31,7 +31,7 @@ func init() {
|
|||
defaultOptions.useSSSE3 = cpuid.CPU.SSSE3()
|
||||
defaultOptions.useSSE2 = cpuid.CPU.SSE2()
|
||||
defaultOptions.useAVX2 = cpuid.CPU.AVX2()
|
||||
defaultOptions.useAVX512 = cpuid.CPU.AVX512F() && cpuid.CPU.AVX512BW()
|
||||
defaultOptions.useAVX512 = cpuid.CPU.AVX512F() && cpuid.CPU.AVX512BW() && amd64
|
||||
}
|
||||
|
||||
// WithMaxGoroutines is the maximum number of goroutines number for encoding & decoding.
|
||||
|
|
Loading…
Reference in New Issue