github.com/segmentio/parquet-go@v0.0.0-20230712180008-5d42db8f0d47/sparse/sparse.go (about) 1 // Package sparse contains abstractions to help work on arrays of values in 2 // sparse memory locations. 3 // 4 // Conversion between array types is supported when converting integers to a 5 // lower size (e.g. int32 to int16, or uint64 to uint8), or converting from 6 // signed integers to unsigned. Float types can also be converted to unsigned 7 // integers of the same size, in which case the conversion is similar to using 8 // the standard library's math.Float32bits and math.Float64bits functions. 9 // 10 // All array types can be converted to a generic Array type that can be used to erase 11 // type information and bypass type conversion rules. This conversion is similar 12 // to using Go's unsafe package to bypass Go's type system and should usually be 13 // avoided and a sign that the application is attempting to break type safety 14 // boundaries. 15 // 16 // The package provides Gather* functions which retrieve values from sparse 17 // arrays into contiguous memory buffers. On platforms that support it, these 18 // operations are implemented using SIMD gather instructions (e.g. VPGATHER on 19 // Intel CPUs). 20 package sparse