mirror of
https://github.com/minio/minio.git
synced 2025-11-11 06:20:14 -05:00
Updated version of klauspost/reedsolomon with NEON support for ARM (#4865)
This commit is contained in:
15
vendor/github.com/klauspost/reedsolomon/options.go
generated
vendored
15
vendor/github.com/klauspost/reedsolomon/options.go
generated
vendored
@@ -10,10 +10,10 @@ import (
|
||||
type Option func(*options)
|
||||
|
||||
type options struct {
|
||||
maxGoroutines int
|
||||
minSplitSize int
|
||||
useAVX2, useSSSE3 bool
|
||||
usePAR1Matrix bool
|
||||
maxGoroutines int
|
||||
minSplitSize int
|
||||
useAVX2, useSSSE3, useSSE2 bool
|
||||
usePAR1Matrix bool
|
||||
}
|
||||
|
||||
var defaultOptions = options{
|
||||
@@ -28,6 +28,7 @@ func init() {
|
||||
// Detect CPU capabilities.
|
||||
defaultOptions.useSSSE3 = cpuid.CPU.SSSE3()
|
||||
defaultOptions.useAVX2 = cpuid.CPU.AVX2()
|
||||
defaultOptions.useSSE2 = cpuid.CPU.SSE2()
|
||||
}
|
||||
|
||||
// WithMaxGoroutines is the maximum number of goroutines number for encoding & decoding.
|
||||
@@ -67,6 +68,12 @@ func withAVX2(enabled bool) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func withSSE2(enabled bool) Option {
|
||||
return func(o *options) {
|
||||
o.useSSE2 = enabled
|
||||
}
|
||||
}
|
||||
|
||||
// WithPAR1Matrix causes the encoder to build the matrix how PARv1
|
||||
// does. Note that the method they use is buggy, and may lead to cases
|
||||
// where recovery is impossible, even if there are enough parity
|
||||
|
||||
Reference in New Issue
Block a user