2016-03-28 00:52:38 -04:00
|
|
|
//+build !amd64 noasm appengine
|
2017-08-30 12:49:00 -04:00
|
|
|
//+build !arm64 noasm appengine
|
2016-03-28 00:52:38 -04:00
|
|
|
|
|
|
|
// Copyright 2015, Klaus Post, see LICENSE for details.
|
|
|
|
|
|
|
|
package reedsolomon
|
|
|
|
|
2017-08-11 21:24:48 -04:00
|
|
|
func galMulSlice(c byte, in, out []byte, ssse3, avx2 bool) {
|
2016-03-28 00:52:38 -04:00
|
|
|
mt := mulTable[c]
|
|
|
|
for n, input := range in {
|
|
|
|
out[n] = mt[input]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 21:24:48 -04:00
|
|
|
func galMulSliceXor(c byte, in, out []byte, ssse3, avx2 bool) {
|
2016-03-28 00:52:38 -04:00
|
|
|
mt := mulTable[c]
|
|
|
|
for n, input := range in {
|
|
|
|
out[n] ^= mt[input]
|
|
|
|
}
|
|
|
|
}
|
2017-08-30 12:49:00 -04:00
|
|
|
|
|
|
|
// slice galois add
|
|
|
|
func sliceXor(in, out []byte, sse2 bool) {
|
|
|
|
for n, input := range in {
|
|
|
|
out[n] ^= input
|
|
|
|
}
|
|
|
|
}
|