utils

package
v11.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ToLEInt16   = func(x int16) int16 { return x }
	ToLEUint16  = func(x uint16) uint16 { return x }
	ToLEUint32  = func(x uint32) uint32 { return x }
	ToLEUint64  = func(x uint64) uint64 { return x }
	ToLEInt32   = func(x int32) int32 { return x }
	ToLEInt64   = func(x int64) int64 { return x }
	ToLEFloat32 = func(x float32) float32 { return x }
	ToLEFloat64 = func(x float64) float64 { return x }
)
View Source
var (
	TransposeInt8Int8   func([]int8, []int8, []int32)
	TransposeInt8Uint8  func([]int8, []uint8, []int32)
	TransposeInt8Int16  func([]int8, []int16, []int32)
	TransposeInt8Uint16 func([]int8, []uint16, []int32)
	TransposeInt8Int32  func([]int8, []int32, []int32)
	TransposeInt8Uint32 func([]int8, []uint32, []int32)
	TransposeInt8Int64  func([]int8, []int64, []int32)
	TransposeInt8Uint64 func([]int8, []uint64, []int32)

	TransposeUint8Int8   func([]uint8, []int8, []int32)
	TransposeUint8Uint8  func([]uint8, []uint8, []int32)
	TransposeUint8Int16  func([]uint8, []int16, []int32)
	TransposeUint8Uint16 func([]uint8, []uint16, []int32)
	TransposeUint8Int32  func([]uint8, []int32, []int32)
	TransposeUint8Uint32 func([]uint8, []uint32, []int32)
	TransposeUint8Int64  func([]uint8, []int64, []int32)
	TransposeUint8Uint64 func([]uint8, []uint64, []int32)

	TransposeInt16Int8   func([]int16, []int8, []int32)
	TransposeInt16Uint8  func([]int16, []uint8, []int32)
	TransposeInt16Int16  func([]int16, []int16, []int32)
	TransposeInt16Uint16 func([]int16, []uint16, []int32)
	TransposeInt16Int32  func([]int16, []int32, []int32)
	TransposeInt16Uint32 func([]int16, []uint32, []int32)
	TransposeInt16Int64  func([]int16, []int64, []int32)
	TransposeInt16Uint64 func([]int16, []uint64, []int32)

	TransposeUint16Int8   func([]uint16, []int8, []int32)
	TransposeUint16Uint8  func([]uint16, []uint8, []int32)
	TransposeUint16Int16  func([]uint16, []int16, []int32)
	TransposeUint16Uint16 func([]uint16, []uint16, []int32)
	TransposeUint16Int32  func([]uint16, []int32, []int32)
	TransposeUint16Uint32 func([]uint16, []uint32, []int32)
	TransposeUint16Int64  func([]uint16, []int64, []int32)
	TransposeUint16Uint64 func([]uint16, []uint64, []int32)

	TransposeInt32Int8   func([]int32, []int8, []int32)
	TransposeInt32Uint8  func([]int32, []uint8, []int32)
	TransposeInt32Int16  func([]int32, []int16, []int32)
	TransposeInt32Uint16 func([]int32, []uint16, []int32)
	TransposeInt32Int32  func([]int32, []int32, []int32)
	TransposeInt32Uint32 func([]int32, []uint32, []int32)
	TransposeInt32Int64  func([]int32, []int64, []int32)
	TransposeInt32Uint64 func([]int32, []uint64, []int32)

	TransposeUint32Int8   func([]uint32, []int8, []int32)
	TransposeUint32Uint8  func([]uint32, []uint8, []int32)
	TransposeUint32Int16  func([]uint32, []int16, []int32)
	TransposeUint32Uint16 func([]uint32, []uint16, []int32)
	TransposeUint32Int32  func([]uint32, []int32, []int32)
	TransposeUint32Uint32 func([]uint32, []uint32, []int32)
	TransposeUint32Int64  func([]uint32, []int64, []int32)
	TransposeUint32Uint64 func([]uint32, []uint64, []int32)

	TransposeInt64Int8   func([]int64, []int8, []int32)
	TransposeInt64Uint8  func([]int64, []uint8, []int32)
	TransposeInt64Int16  func([]int64, []int16, []int32)
	TransposeInt64Uint16 func([]int64, []uint16, []int32)
	TransposeInt64Int32  func([]int64, []int32, []int32)
	TransposeInt64Uint32 func([]int64, []uint32, []int32)
	TransposeInt64Int64  func([]int64, []int64, []int32)
	TransposeInt64Uint64 func([]int64, []uint64, []int32)

	TransposeUint64Int8   func([]uint64, []int8, []int32)
	TransposeUint64Uint8  func([]uint64, []uint8, []int32)
	TransposeUint64Int16  func([]uint64, []int16, []int32)
	TransposeUint64Uint16 func([]uint64, []uint16, []int32)
	TransposeUint64Int32  func([]uint64, []int32, []int32)
	TransposeUint64Uint32 func([]uint64, []uint32, []int32)
	TransposeUint64Int64  func([]uint64, []int64, []int32)
	TransposeUint64Uint64 func([]uint64, []uint64, []int32)
)

Functions

func GetMinMaxInt16

func GetMinMaxInt16(v []int16) (min, max int16)

GetMinMaxInt16 returns the min and max for a int16 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxInt32

func GetMinMaxInt32(v []int32) (min, max int32)

GetMinMaxInt32 returns the min and max for a int32 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxInt64

func GetMinMaxInt64(v []int64) (min, max int64)

GetMinMaxInt64 returns the min and max for a int64 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxInt8

func GetMinMaxInt8(v []int8) (min, max int8)

GetMinMaxInt8 returns the min and max for a int8 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxUint16

func GetMinMaxUint16(v []uint16) (min, max uint16)

GetMinMaxUint16 returns the min and max for a uint16 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxUint32

func GetMinMaxUint32(v []uint32) (min, max uint32)

GetMinMaxUint32 returns the min and max for a uint32 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxUint64

func GetMinMaxUint64(v []uint64) (min, max uint64)

GetMinMaxUint64 returns the min and max for a uint64 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func GetMinMaxUint8

func GetMinMaxUint8(v []uint8) (min, max uint8)

GetMinMaxUint8 returns the min and max for a uint8 slice, using AVX2 or SSE4 cpu extensions if available, falling back to a pure go implementation if they are unavailable or built with the noasm tag.

func Max

func Max(a, b int64) int64

Max is a convenience Max function for int64

func MaxInt

func MaxInt(a, b int) int

MaxInt is a convenience Max function for int

func Min

func Min(a, b int64) int64

Min is a convenience Min function for int64

func MinInt

func MinInt(a, b int) int

MinInt is a convenience Min function for int

func NewBufferedReader

func NewBufferedReader(rd io.Reader, sz int) *bufferedReader

NewBufferedReader returns a buffered reader with similar semantics to bufio.Reader except Peek will expand the internal buffer if needed rather than return an error.

func TransposeInts

func TransposeInts(src, dest interface{}, mapping []int32) error

TransposeInts expects two integral slices and the values they map to. Returning an error if either src or dest are not an integral type.

func TransposeIntsBuffers

func TransposeIntsBuffers(inType, outType arrow.DataType, indata, outdata []byte, inOffset, outOffset int, length int, transposeMap []int32) error

TransposeIntsBuffers takes the data-types, byte buffers, and offsets of a source and destination buffer to perform TransposeInts on with the provided mapping data.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL