Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EnableAVX512 = true
AVX512 may slow down CPU Clock (maybe not). TODO need more research: https://lemire.me/blog/2018/04/19/by-how-much-does-avx-512-slow-down-your-cpu-a-first-experiment/
Functions ¶
func Encode ¶
Encode encodes elements from source slice into a destination slice. The source and destination may overlap. Encode returns the number of elements encoded, which will be the minimum of len(src[i]) and len(dst).
func Replace ¶
Replace replaces oldData vectors with 0 or replaces 0 with newData vectors. Returns the minimum length of data[i] and parity.
It's used in two situations: 1. We didn't have enough data for filling in a stripe, but still did xor encode, we need replace several zero vectors with new vectors which have data after we get enough data finally. 2. After compact, we may have several useless vectors in a stripe, we need replaces these useless vectors with zero vectors for free space.
Types ¶
This section is empty.