galois_arm64.go 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //+build !noasm
  2. //+build !appengine
  3. //+build !gccgo
  4. // Copyright 2015, Klaus Post, see LICENSE for details.
  5. // Copyright 2017, Minio, Inc.
  6. package reedsolomon
  7. //go:noescape
  8. func galMulNEON(c uint64, in, out []byte)
  9. //go:noescape
  10. func galMulXorNEON(c uint64, in, out []byte)
  11. func galMulSlice(c byte, in, out []byte, o *options) {
  12. var done int
  13. galMulNEON(uint64(c), in, out)
  14. done = (len(in) >> 5) << 5
  15. remain := len(in) - done
  16. if remain > 0 {
  17. mt := mulTable[c][:256]
  18. for i := done; i < len(in); i++ {
  19. out[i] = mt[in[i]]
  20. }
  21. }
  22. }
  23. func galMulSliceXor(c byte, in, out []byte, o *options) {
  24. var done int
  25. galMulXorNEON(uint64(c), in, out)
  26. done = (len(in) >> 5) << 5
  27. remain := len(in) - done
  28. if remain > 0 {
  29. mt := mulTable[c][:256]
  30. for i := done; i < len(in); i++ {
  31. out[i] ^= mt[in[i]]
  32. }
  33. }
  34. }
  35. // slice galois add
  36. func sliceXor(in, out []byte, sse2 bool) {
  37. for n, input := range in {
  38. out[n] ^= input
  39. }
  40. }
  41. func (r reedSolomon) codeSomeShardsAvx512(matrixRows, inputs, outputs [][]byte, outputCount, byteCount int) {
  42. }