diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 01:46:27 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 18:14:16 +0100 |
commit | 18f52af5be3a9a0c73811706108f790d65ee9c67 (patch) | |
tree | e13cbacb47d56919caa9c44a2b45dec1497a7860 /vendor/github.com/klauspost/reedsolomon/galois_noasm.go | |
parent | ebcef0d57b6ecb5a40c6579f6be07182dd3033ba (diff) |
[pkg] update vendor
Diffstat (limited to 'vendor/github.com/klauspost/reedsolomon/galois_noasm.go')
-rw-r--r-- | vendor/github.com/klauspost/reedsolomon/galois_noasm.go | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/vendor/github.com/klauspost/reedsolomon/galois_noasm.go b/vendor/github.com/klauspost/reedsolomon/galois_noasm.go new file mode 100644 index 0000000..1d00e06 --- /dev/null +++ b/vendor/github.com/klauspost/reedsolomon/galois_noasm.go @@ -0,0 +1,44 @@ +//+build !amd64 noasm appengine gccgo +//+build !arm64 noasm appengine gccgo +//+build !ppc64le noasm appengine gccgo + +// Copyright 2015, Klaus Post, see LICENSE for details. + +package reedsolomon + +func galMulSlice(c byte, in, out []byte, o *options) { + out = out[:len(in)] + if c == 1 { + copy(out, in) + return + } + mt := mulTable[c][:256] + for n, input := range in { + out[n] = mt[input] + } +} + +func galMulSliceXor(c byte, in, out []byte, o *options) { + out = out[:len(in)] + if c == 1 { + for n, input := range in { + out[n] ^= input + } + return + } + mt := mulTable[c][:256] + for n, input := range in { + out[n] ^= mt[input] + } +} + +// slice galois add +func sliceXor(in, out []byte, o *options) { + for n, input := range in { + out[n] ^= input + } +} + +func init() { + defaultOptions.useAVX512 = false +} |