functions

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UseAVX2 bool = cpu.X86.HasAVX2 && cpu.X86.HasFMA && runtime.GOOS != "darwin"

Functions

func Abs_AVX2_F32

func Abs_AVX2_F32(x []float32)

func Abs_AVX2_F64

func Abs_AVX2_F64(x []float64)

func Abs_Go_F32

func Abs_Go_F32(x []float32)

func Abs_Go_F64

func Abs_Go_F64(x []float64)

func AddNumber_AVX2_F32

func AddNumber_AVX2_F32(x []float32, a float32)

func AddNumber_AVX2_F64

func AddNumber_AVX2_F64(x []float64, a float64)

func AddNumber_Go

func AddNumber_Go[T constraints.Float](x []T, y T)

func Add_AVX2_F32

func Add_AVX2_F32(x []float32, y []float32)

func Add_AVX2_F64

func Add_AVX2_F64(x []float64, y []float64)

func Add_Go

func Add_Go[T constraints.Float](x, y []T)

func All_AVX2

func All_AVX2(x []bool) int

func All_Go

func All_Go(x []bool) bool

func And_AVX2

func And_AVX2(x []bool, y []bool)

func And_Go

func And_Go(x, y []bool)

func Any_AVX2

func Any_AVX2(x []bool) int

func Any_Go

func Any_Go(x []bool) bool

func ArgMax_AVX2_F32

func ArgMax_AVX2_F32(x []float32) int

func ArgMax_AVX2_F64

func ArgMax_AVX2_F64(x []float64) int

func ArgMax_Go

func ArgMax_Go[T constraints.Float](x []T) int

func ArgMin_AVX2_F32

func ArgMin_AVX2_F32(x []float32) int

func ArgMin_AVX2_F64

func ArgMin_AVX2_F64(x []float64) int

func ArgMin_Go

func ArgMin_Go[T constraints.Float](x []T) int

func Ceil_AVX2_F32

func Ceil_AVX2_F32(x []float32) float32

func Ceil_AVX2_F64

func Ceil_AVX2_F64(x []float64) float64

func Ceil_Go_F32

func Ceil_Go_F32(x []float32)

func Ceil_Go_F64

func Ceil_Go_F64(x []float64)

func Clone_Go

func Clone_Go[T constraints.Float](x, y []T)

func Clone_Go_Loop

func Clone_Go_Loop[T constraints.Float](x, y []T)

func Cos_AVX2_F32

func Cos_AVX2_F32(x []float32)

func Cos_Go_F32

func Cos_Go_F32(x []float32)

func Cos_Go_F64

func Cos_Go_F64(x []float64)

func CosineSimilarity_AVX2_F32

func CosineSimilarity_AVX2_F32(x []float32, y []float32) float32

func CosineSimilarity_AVX2_F64

func CosineSimilarity_AVX2_F64(x []float64, y []float64) float64

func CosineSimilarity_Go_F32

func CosineSimilarity_Go_F32(x, y []float32) float32

func CosineSimilarity_Go_F64

func CosineSimilarity_Go_F64(x, y []float64) float64

func Count_AVX2

func Count_AVX2(x []bool) int

func Count_Go

func Count_Go(x []bool) int

func CumProd_AVX2_F32

func CumProd_AVX2_F32(x []float32)

func CumProd_AVX2_F64

func CumProd_AVX2_F64(x []float64)

func CumProd_Go

func CumProd_Go[T constraints.Float](x []T)

func CumSum_AVX2_F32

func CumSum_AVX2_F32(x []float32)

func CumSum_AVX2_F64

func CumSum_AVX2_F64(x []float64)

func CumSum_Go

func CumSum_Go[T constraints.Float](x []T)

func Distance_AVX2_F32

func Distance_AVX2_F32(x []float32, y []float32) float32

func Distance_AVX2_F64

func Distance_AVX2_F64(x []float64, y []float64) float64

func Distance_Go_F32

func Distance_Go_F32(x, y []float32) float32

func Distance_Go_F64

func Distance_Go_F64(x, y []float64) float64

func DivNumber_AVX2_F32

func DivNumber_AVX2_F32(x []float32, a float32)

func DivNumber_AVX2_F64

func DivNumber_AVX2_F64(x []float64, a float64)

func DivNumber_Go

func DivNumber_Go[T constraints.Float](x []T, y T)

func Div_AVX2_F32

func Div_AVX2_F32(x []float32, y []float32)

func Div_AVX2_F64

func Div_AVX2_F64(x []float64, y []float64)

func Div_Go

func Div_Go[T constraints.Float](x, y []T)

func Dot_AVX2_F32

func Dot_AVX2_F32(x []float32, y []float32) float32

func Dot_AVX2_F64

func Dot_AVX2_F64(x []float64, y []float64) float64

func Dot_Go

func Dot_Go[T constraints.Float](x, y []T) T

func EqNumber_AVX2_F32

func EqNumber_AVX2_F32(x []bool, y []float32, a float32)

func EqNumber_AVX2_F64

func EqNumber_AVX2_F64(x []bool, y []float64, a float64)

func EqNumber_Go

func EqNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Eq_AVX2_F32

func Eq_AVX2_F32(x []bool, y []float32, z []float32)

func Eq_AVX2_F64

func Eq_AVX2_F64(x []bool, y []float64, z []float64)

func Eq_Go

func Eq_Go[T constraints.Float](dst []bool, x, y []T)

func Exp_AVX2_F32

func Exp_AVX2_F32(x []float32)

func Exp_Go_F32

func Exp_Go_F32(x []float32)

func Exp_Go_F64

func Exp_Go_F64(x []float64)

func Exp_Len8x_AVX2_F32

func Exp_Len8x_AVX2_F32(x []float32)

func Find_AVX2_F32

func Find_AVX2_F32(x []float32, a float32) int

func Find_AVX2_F64

func Find_AVX2_F64(x []float64, a float64) int

func Find_Go

func Find_Go[T constraints.Float](x []T, a T) int

func Floor_AVX2_F32

func Floor_AVX2_F32(x []float32) float32

func Floor_AVX2_F64

func Floor_AVX2_F64(x []float64) float64

func Floor_Go_F32

func Floor_Go_F32(x []float32)

func Floor_Go_F64

func Floor_Go_F64(x []float64)

func FromBool_AVX2_F32

func FromBool_AVX2_F32(x []float32, y []bool)

func FromBool_AVX2_F64

func FromBool_AVX2_F64(x []float64, y []bool)

func FromBool_Go

func FromBool_Go[T constraints.Float](x []T, y []bool)

func FromFloat32_AVX2_F64

func FromFloat32_AVX2_F64(x []float64, y []float32)

func FromFloat64_AVX2_F32

func FromFloat64_AVX2_F32(x []float32, y []float64)

func FromInt32_AVX2_F32

func FromInt32_AVX2_F32(x []float32, y []int32)

func FromInt32_AVX2_F64

func FromInt32_AVX2_F64(x []float64, y []int32)

func FromInt64_AVX2_F32

func FromInt64_AVX2_F32(x []float32, y []int64)

func FromInt64_AVX2_F64

func FromInt64_AVX2_F64(x []float64, y []int64)

func FromNumber_Go

func FromNumber_Go[T constraints.Float, F Number](x []T, y []F)

func Gather_Go

func Gather_Go[T constraints.Float](dst, x []T, idx []int)

func GtNumber_AVX2_F32

func GtNumber_AVX2_F32(x []bool, y []float32, a float32)

func GtNumber_AVX2_F64

func GtNumber_AVX2_F64(x []bool, y []float64, a float64)

func GtNumber_Go

func GtNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Gt_AVX2_F32

func Gt_AVX2_F32(x []bool, y []float32, z []float32)

func Gt_AVX2_F64

func Gt_AVX2_F64(x []bool, y []float64, z []float64)

func Gt_Go

func Gt_Go[T constraints.Float](dst []bool, x, y []T)

func GteNumber_AVX2_F32

func GteNumber_AVX2_F32(x []bool, y []float32, a float32)

func GteNumber_AVX2_F64

func GteNumber_AVX2_F64(x []bool, y []float64, a float64)

func GteNumber_Go

func GteNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Gte_AVX2_F32

func Gte_AVX2_F32(x []bool, y []float32, z []float32)

func Gte_AVX2_F64

func Gte_AVX2_F64(x []bool, y []float64, z []float64)

func Gte_Go

func Gte_Go[T constraints.Float](dst []bool, x, y []T)

func Inv_AVX2_F32

func Inv_AVX2_F32(x []float32)

func Inv_AVX2_F64

func Inv_AVX2_F64(x []float64)

func Inv_Go

func Inv_Go[T constraints.Float](x []T)

func Log10_AVX2_F32

func Log10_AVX2_F32(x []float32)

func Log10_Go_F32

func Log10_Go_F32(x []float32)

func Log10_Go_F64

func Log10_Go_F64(x []float64)

func Log10_Len8x_AVX2_F32

func Log10_Len8x_AVX2_F32(x []float32)

func Log2_AVX2_F32

func Log2_AVX2_F32(x []float32)

func Log2_Go_F32

func Log2_Go_F32(x []float32)

func Log2_Go_F64

func Log2_Go_F64(x []float64)

func Log2_Len8x_AVX2_F32

func Log2_Len8x_AVX2_F32(x []float32)

func Log_AVX2_F32

func Log_AVX2_F32(x []float32)

func Log_Go_F32

func Log_Go_F32(x []float32)

func Log_Go_F64

func Log_Go_F64(x []float64)

func Log_Len8x_AVX2_F32

func Log_Len8x_AVX2_F32(x []float32)

func LtNumber_AVX2_F32

func LtNumber_AVX2_F32(x []bool, y []float32, a float32)

func LtNumber_AVX2_F64

func LtNumber_AVX2_F64(x []bool, y []float64, a float64)

func LtNumber_Go

func LtNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Lt_AVX2_F32

func Lt_AVX2_F32(x []bool, y []float32, z []float32)

func Lt_AVX2_F64

func Lt_AVX2_F64(x []bool, y []float64, z []float64)

func Lt_Go

func Lt_Go[T constraints.Float](dst []bool, x, y []T)

func LteNumber_AVX2_F32

func LteNumber_AVX2_F32(x []bool, y []float32, a float32)

func LteNumber_AVX2_F64

func LteNumber_AVX2_F64(x []bool, y []float64, a float64)

func LteNumber_Go

func LteNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Lte_AVX2_F32

func Lte_AVX2_F32(x []bool, y []float32, z []float32)

func Lte_AVX2_F64

func Lte_AVX2_F64(x []bool, y []float64, z []float64)

func Lte_Go

func Lte_Go[T constraints.Float](dst []bool, x, y []T)

func ManhattanDistance_AVX2_F32

func ManhattanDistance_AVX2_F32(x []float32, y []float32) float32

func ManhattanDistance_AVX2_F64

func ManhattanDistance_AVX2_F64(x []float64, y []float64) float64

func ManhattanDistance_Go_F32

func ManhattanDistance_Go_F32(x, y []float32) float32

func ManhattanDistance_Go_F64

func ManhattanDistance_Go_F64(x, y []float64) float64

func ManhattanNorm_AVX2_F32

func ManhattanNorm_AVX2_F32(x []float32) float32

func ManhattanNorm_AVX2_F64

func ManhattanNorm_AVX2_F64(x []float64) float64

func ManhattanNorm_Go_F32

func ManhattanNorm_Go_F32(x []float32) float32

func ManhattanNorm_Go_F64

func ManhattanNorm_Go_F64(x []float64) float64

func Mat4Mul_AVX2_F32

func Mat4Mul_AVX2_F32(x []float32, y []float32, z []float32)

func Mat4Mul_AVX2_F64

func Mat4Mul_AVX2_F64(x []float64, y []float64, z []float64)

func Mat4Mul_Go

func Mat4Mul_Go[T constraints.Float](dst, x, y []T)

func MatMulTiled_AVX2_F32

func MatMulTiled_AVX2_F32(x []float32, y []float32, z []float32, a int, b int, c int)

func MatMulTiled_AVX2_F64

func MatMulTiled_AVX2_F64(x []float64, y []float64, z []float64, a int, b int, c int)

func MatMulVec_AVX2_F32

func MatMulVec_AVX2_F32(x []float32, y []float32, z []float32, a int, b int)

func MatMulVec_AVX2_F64

func MatMulVec_AVX2_F64(x []float64, y []float64, z []float64, a int, b int)

func MatMulVec_Go

func MatMulVec_Go[T constraints.Float](dst, x, y []T, m, n int)

func MatMul_AVX2_F32

func MatMul_AVX2_F32(x []float32, y []float32, z []float32, a int, b int, c int)

func MatMul_AVX2_F64

func MatMul_AVX2_F64(x []float64, y []float64, z []float64, a int, b int, c int)

func MatMul_Go

func MatMul_Go[T constraints.Float](dst, x, y []T, m, n, p int)

func MatMul_Parallel_AVX2_F32

func MatMul_Parallel_AVX2_F32(dst, x, y []float32, m, n, p int)

func MatMul_Parallel_AVX2_F64

func MatMul_Parallel_AVX2_F64(dst, x, y []float64, m, n, p int)

func MatMul_Parallel_Go

func MatMul_Parallel_Go[T constraints.Float](dst, x, y []T, m, n, p int)

func Max_AVX2_F32

func Max_AVX2_F32(x []float32) float32

func Max_AVX2_F64

func Max_AVX2_F64(x []float64) float64

func Max_Go

func Max_Go[T constraints.Float](x []T) T

func MaximumNumber_AVX2_F32

func MaximumNumber_AVX2_F32(x []float32, a float32)

func MaximumNumber_AVX2_F64

func MaximumNumber_AVX2_F64(x []float64, a float64)

func MaximumNumber_Go

func MaximumNumber_Go[T constraints.Float](x []T, a T)

func Maximum_AVX2_F32

func Maximum_AVX2_F32(x []float32, y []float32)

func Maximum_AVX2_F64

func Maximum_AVX2_F64(x []float64, y []float64)

func Maximum_Go

func Maximum_Go[T constraints.Float](x, y []T)

func Mean_AVX2_F32

func Mean_AVX2_F32(x []float32) float32

func Mean_AVX2_F64

func Mean_AVX2_F64(x []float64) float64

func Mean_Go

func Mean_Go[T constraints.Float](x []T) T

func Median_AVX2_F32

func Median_AVX2_F32(x []float32) float32

func Median_AVX2_F64

func Median_AVX2_F64(x []float64) float64

func Median_Go

func Median_Go[T constraints.Float](x []T) T

func Min_AVX2_F32

func Min_AVX2_F32(x []float32) float32

func Min_AVX2_F64

func Min_AVX2_F64(x []float64) float64

func Min_Go

func Min_Go[T constraints.Float](x []T) T

func MinimumNumber_AVX2_F32

func MinimumNumber_AVX2_F32(x []float32, a float32)

func MinimumNumber_AVX2_F64

func MinimumNumber_AVX2_F64(x []float64, a float64)

func MinimumNumber_Go

func MinimumNumber_Go[T constraints.Float](x []T, a T)

func Minimum_AVX2_F32

func Minimum_AVX2_F32(x []float32, y []float32)

func Minimum_AVX2_F64

func Minimum_AVX2_F64(x []float64, y []float64)

func Minimum_Go

func Minimum_Go[T constraints.Float](x, y []T)

func MulNumber_AVX2_F32

func MulNumber_AVX2_F32(x []float32, a float32)

func MulNumber_AVX2_F64

func MulNumber_AVX2_F64(x []float64, a float64)

func MulNumber_Go

func MulNumber_Go[T constraints.Float](x []T, y T)

func Mul_AVX2_F32

func Mul_AVX2_F32(x []float32, y []float32)

func Mul_AVX2_F64

func Mul_AVX2_F64(x []float64, y []float64)

func Mul_Go

func Mul_Go[T constraints.Float](x, y []T)

func Neg_AVX2_F32

func Neg_AVX2_F32(x []float32)

func Neg_AVX2_F64

func Neg_AVX2_F64(x []float64)

func Neg_Go

func Neg_Go[T constraints.Float](x []T)

func NeqNumber_AVX2_F32

func NeqNumber_AVX2_F32(x []bool, y []float32, a float32)

func NeqNumber_AVX2_F64

func NeqNumber_AVX2_F64(x []bool, y []float64, a float64)

func NeqNumber_Go

func NeqNumber_Go[T constraints.Float](dst []bool, x []T, a T)

func Neq_AVX2_F32

func Neq_AVX2_F32(x []bool, y []float32, z []float32)

func Neq_AVX2_F64

func Neq_AVX2_F64(x []bool, y []float64, z []float64)

func Neq_Go

func Neq_Go[T constraints.Float](dst []bool, x, y []T)

func None_AVX2

func None_AVX2(x []bool) int

func None_Go

func None_Go(x []bool) bool

func Norm_AVX2_F32

func Norm_AVX2_F32(x []float32) float32

func Norm_AVX2_F64

func Norm_AVX2_F64(x []float64) float64

func Norm_Go_F32

func Norm_Go_F32(x []float32) float32

func Norm_Go_F64

func Norm_Go_F64(x []float64) float64

func Not_AVX2

func Not_AVX2(x []bool)

func Not_Go

func Not_Go(x []bool)

func Ones_Go

func Ones_Go[T constraints.Float](x []T, n int)

func Or_AVX2

func Or_AVX2(x []bool, y []bool)

func Or_Go

func Or_Go(x, y []bool)

func Pow_4x_AVX2_F64

func Pow_4x_AVX2_F64(x []float64, y []float64)

func Pow_8x_AVX2_F32

func Pow_8x_AVX2_F32(x []float32, y []float32)

func Pow_AVX2_F32

func Pow_AVX2_F32(x, y []float32)

func Pow_AVX2_F64

func Pow_AVX2_F64(x, y []float64)

func Pow_Go_F32

func Pow_Go_F32(x, y []float32)

func Pow_Go_F64

func Pow_Go_F64(x, y []float64)

func Prod_AVX2_F32

func Prod_AVX2_F32(x []float32) float32

func Prod_AVX2_F64

func Prod_AVX2_F64(x []float64) float64

func Prod_Go

func Prod_Go[T constraints.Float](x []T) T

func Quantile_AVX2_F32

func Quantile_AVX2_F32(x []float32, q float32) float32

func Quantile_AVX2_F64

func Quantile_AVX2_F64(x []float64, q float64) float64

func Quantile_Go

func Quantile_Go[T constraints.Float](x []T, q T) T

func Random

func Random[T constraints.Integer | constraints.Float](size int) []T

func RandomBool

func RandomBool(size int, pctTrue float64) []bool

func RandomRange

func RandomRange[T constraints.Integer | constraints.Float](a, b T, size int) []T

func Range_AVX2_F32

func Range_AVX2_F32(x []float32, a float32, n int)

func Range_AVX2_F64

func Range_AVX2_F64(x []float64, a float64, n int)

func Range_Go

func Range_Go[T constraints.Float](x []T, a T, n int)

func Repeat_AVX2_F32

func Repeat_AVX2_F32(x []float32, a float32, n int)

func Repeat_AVX2_F64

func Repeat_AVX2_F64(x []float64, a float64, n int)

func Repeat_Go

func Repeat_Go[T constraints.Float](x []T, a T, n int)

func Round_AVX2_F32

func Round_AVX2_F32(x []float32) float32

func Round_AVX2_F64

func Round_AVX2_F64(x []float64) float64

func Round_Go_F32

func Round_Go_F32(x []float32)

func Round_Go_F64

func Round_Go_F64(x []float64)

func Scatter_Go

func Scatter_Go[T constraints.Float](dst, x []T, idx []int)

func Select_Go

func Select_Go[T constraints.Float](dst, x []T, y []bool) []T

func SetAcceleration

func SetAcceleration(enabled bool)

SetAcceleration toggles simd acceleration. Not thread safe.

func SinCos_AVX2_F32

func SinCos_AVX2_F32(x []float32, y []float32, z []float32)

func SinCos_Go_F32

func SinCos_Go_F32(dstSin, dstCos, x []float32)

func SinCos_Go_F64

func SinCos_Go_F64(dstSin, dstCos, x []float64)

func Sin_AVX2_F32

func Sin_AVX2_F32(x []float32)

func Sin_Go_F32

func Sin_Go_F32(x []float32)

func Sin_Go_F64

func Sin_Go_F64(x []float64)

func Sqrt_AVX2_F32

func Sqrt_AVX2_F32(x []float32) float32

func Sqrt_AVX2_F64

func Sqrt_AVX2_F64(x []float64) float64

func Sqrt_Go_F32

func Sqrt_Go_F32(x []float32)

func Sqrt_Go_F64

func Sqrt_Go_F64(x []float64)

func SubNumber_AVX2_F32

func SubNumber_AVX2_F32(x []float32, a float32)

func SubNumber_AVX2_F64

func SubNumber_AVX2_F64(x []float64, a float64)

func SubNumber_Go

func SubNumber_Go[T constraints.Float](x []T, y T)

func Sub_AVX2_F32

func Sub_AVX2_F32(x []float32, y []float32)

func Sub_AVX2_F64

func Sub_AVX2_F64(x []float64, y []float64)

func Sub_Go

func Sub_Go[T constraints.Float](x, y []T)

func Sum_AVX2_F32

func Sum_AVX2_F32(x []float32) float32

func Sum_AVX2_F64

func Sum_AVX2_F64(x []float64) float64

func Sum_Go

func Sum_Go[T constraints.Float](x []T) T

func ToBool_AVX2_F32

func ToBool_AVX2_F32(x []bool, y []float32)

func ToBool_AVX2_F64

func ToBool_AVX2_F64(x []bool, y []float64)

func ToBool_Go

func ToBool_Go[F constraints.Float](x []bool, y []F)

func ToInt32_AVX2_F32

func ToInt32_AVX2_F32(x []int32, y []float32)

func ToInt32_AVX2_F64

func ToInt32_AVX2_F64(x []int32, y []float64)

func ToInt64_AVX2_F32

func ToInt64_AVX2_F32(x []int64, y []float32)

func ToInt64_AVX2_F64

func ToInt64_AVX2_F64(x []int64, y []float64)

func ToNumber_Go

func ToNumber_Go[T Number, F constraints.Float](x []T, y []F)

func Xor_AVX2

func Xor_AVX2(x []bool, y []bool)

func Xor_Go

func Xor_Go(x, y []bool)

func Zeros_Go

func Zeros_Go[T constraints.Float](x []T, n int)

Types

type Number

type Number interface {
	constraints.Float | constraints.Integer
}

type SystemInfo

type SystemInfo struct {
	CPUArchitecture string
	CPUFeatures     []string
	Acceleration    bool
}

SystemInfo contains information about the current operating environment.

func Info

func Info() SystemInfo

Info returns information about the current operating environment.

Jump to

Keyboard shortcuts

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