utils

package
v8.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 }
)

Functions

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 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 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 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 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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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