Documentation ¶
Index ¶
- func Abs(x []float32) []float32
- func Abs_Inplace(x []float32)
- func Abs_Into(dst, x []float32) []float32
- func Add(x, y []float32) []float32
- func AddNumber(x []float32, a float32) []float32
- func AddNumber_Inplace(x []float32, a float32)
- func AddNumber_Into(dst, x []float32, a float32) []float32
- func Add_Inplace(x, y []float32)
- func Add_Into(dst, x, y []float32) []float32
- func All(x []bool) bool
- func And(x, y []bool) []bool
- func And_Inplace(x, y []bool)
- func And_Into(dst, x, y []bool) []bool
- func Any(x []bool) bool
- func ArgMax(x []float32) int
- func ArgMin(x []float32) int
- func Ceil(x []float32) []float32
- func Ceil_Inplace(x []float32)
- func Ceil_Into(dst, x []float32) []float32
- func Cos(x []float32) []float32
- func Cos_Inplace(x []float32)
- func Cos_Into(dst, x []float32) []float32
- func CosineSimilarity(x, y []float32) float32
- func Count(x []bool) int
- func CumProd(x []float32) []float32
- func CumProd_Inplace(x []float32)
- func CumProd_Into(dst, x []float32) []float32
- func CumSum(x []float32) []float32
- func CumSum_Inplace(x []float32)
- func CumSum_Into(dst, x []float32) []float32
- func Distance(x, y []float32) float32
- func Div(x, y []float32) []float32
- func DivNumber(x []float32, a float32) []float32
- func DivNumber_Inplace(x []float32, a float32)
- func DivNumber_Into(dst, x []float32, a float32) []float32
- func Div_Inplace(x, y []float32)
- func Div_Into(dst, x, y []float32) []float32
- func Dot(x, y []float32) float32
- func Eq(x, y []float32) []bool
- func EqNumber(x []float32, a float32) []bool
- func EqNumber_Into(dst []bool, x []float32, a float32) []bool
- func Eq_Into(dst []bool, x, y []float32) []bool
- func Exp(x []float32) []float32
- func Exp_Inplace(x []float32)
- func Exp_Into(dst, x []float32) []float32
- func Find(x []float32, a float32) int
- func Floor(x []float32) []float32
- func Floor_Inplace(x []float32)
- func Floor_Into(dst, x []float32) []float32
- func FromBool(x []bool) []float32
- func FromBool_Into(dst []float32, x []bool) []float32
- func FromFloat64(x []float64) []float32
- func FromFloat64_Into(dst []float32, x []float64) []float32
- func FromInt32(x []int32) []float32
- func FromInt32_Into(dst []float32, x []int32) []float32
- func FromInt64(x []int64) []float32
- func FromInt64_Into(dst []float32, x []int64) []float32
- func Gather(x []float32, idx []int) []float32
- func Gather_Into(dst, x []float32, idx []int) []float32
- func Gt(x, y []float32) []bool
- func GtNumber(x []float32, a float32) []bool
- func GtNumber_Into(dst []bool, x []float32, a float32) []bool
- func Gt_Into(dst []bool, x, y []float32) []bool
- func Gte(x, y []float32) []bool
- func GteNumber(x []float32, a float32) []bool
- func GteNumber_Into(dst []bool, x []float32, a float32) []bool
- func Gte_Into(dst []bool, x, y []float32) []bool
- func Info() vek.SystemInfo
- func Inv(x []float32) []float32
- func Inv_Inplace(x []float32)
- func Inv_Into(dst, x []float32) []float32
- func Log(x []float32) []float32
- func Log10(x []float32) []float32
- func Log10_Inplace(x []float32)
- func Log10_Into(dst, x []float32) []float32
- func Log2(x []float32) []float32
- func Log2_Inplace(x []float32)
- func Log2_Into(dst, x []float32) []float32
- func Log_Inplace(x []float32)
- func Log_Into(dst, x []float32) []float32
- func Lt(x, y []float32) []bool
- func LtNumber(x []float32, a float32) []bool
- func LtNumber_Into(dst []bool, x []float32, a float32) []bool
- func Lt_Into(dst []bool, x, y []float32) []bool
- func Lte(x, y []float32) []bool
- func LteNumber(x []float32, a float32) []bool
- func LteNumber_Into(dst []bool, x []float32, a float32) []bool
- func Lte_Into(dst []bool, x, y []float32) []bool
- func ManhattanDistance(x, y []float32) float32
- func ManhattanNorm(x []float32) float32
- func Mat4Mul(x, y []float32) []float32
- func Mat4Mul_Into(dst, x, y []float32) []float32
- func MatMul(x, y []float32, n int) []float32
- func MatMul_Into(dst, x, y []float32, n int) []float32
- func Max(x []float32) float32
- func Maximum(x, y []float32) []float32
- func MaximumNumber(x []float32, a float32) []float32
- func MaximumNumber_Inplace(x []float32, a float32)
- func MaximumNumber_Into(dst, x []float32, a float32) []float32
- func Maximum_Inplace(x, y []float32)
- func Maximum_Into(dst, x, y []float32) []float32
- func Mean(x []float32) float32
- func Median(x []float32) float32
- func Min(x []float32) float32
- func Minimum(x, y []float32) []float32
- func MinimumNumber(x []float32, a float32) []float32
- func MinimumNumber_Inplace(x []float32, a float32)
- func MinimumNumber_Into(dst, x []float32, a float32) []float32
- func Minimum_Inplace(x, y []float32)
- func Minimum_Into(dst, x, y []float32) []float32
- func Mul(x, y []float32) []float32
- func MulNumber(x []float32, a float32) []float32
- func MulNumber_Inplace(x []float32, a float32)
- func MulNumber_Into(dst, x []float32, a float32) []float32
- func Mul_Inplace(x, y []float32)
- func Mul_Into(dst, x, y []float32) []float32
- func Neg(x []float32) []float32
- func Neg_Inplace(x []float32)
- func Neg_Into(dst, x []float32) []float32
- func Neq(x, y []float32) []bool
- func NeqNumber(x []float32, a float32) []bool
- func NeqNumber_Into(dst []bool, x []float32, a float32) []bool
- func Neq_Into(dst []bool, x, y []float32) []bool
- func None(x []bool) bool
- func Norm(x []float32) float32
- func Not(x []bool) []bool
- func Not_Inplace(x []bool)
- func Not_Into(dst, x []bool) []bool
- func Ones(n int) []float32
- func Ones_Into(dst []float32, n int) []float32
- func Or(x, y []bool) []bool
- func Or_Inplace(x, y []bool)
- func Or_Into(dst, x, y []bool) []bool
- func Pow(x, y []float32) []float32
- func Pow_Inplace(x, y []float32)
- func Pow_Into(dst, x, y []float32) []float32
- func Prod(x []float32) float32
- func Quantile(x []float32, q float32) float32
- func Range(a, b float32) []float32
- func Range_Into(dst []float32, a, b float32) []float32
- func Repeat(a float32, n int) []float32
- func Repeat_Into(dst []float32, a float32, n int) []float32
- func Round(x []float32) []float32
- func Round_Inplace(x []float32)
- func Round_Into(dst, x []float32) []float32
- func Scatter(x []float32, idx []int, size int) []float32
- func Scatter_Into(dst, x []float32, idx []int) []float32
- func Select(x []float32, y []bool) []float32
- func Select_Into(dst, x []float32, y []bool) []float32
- func SetAcceleration(enabled bool)
- func Sin(x []float32) []float32
- func SinCos_Into(dstSin, dstCos, x []float32)
- func Sin_Inplace(x []float32)
- func Sin_Into(dst, x []float32) []float32
- func Sqrt(x []float32) []float32
- func Sqrt_Inplace(x []float32)
- func Sqrt_Into(dst, x []float32) []float32
- func Sub(x, y []float32) []float32
- func SubNumber(x []float32, a float32) []float32
- func SubNumber_Inplace(x []float32, a float32)
- func SubNumber_Into(dst, x []float32, a float32) []float32
- func Sub_Inplace(x, y []float32)
- func Sub_Into(dst, x, y []float32) []float32
- func Sum(x []float32) float32
- func ToBool(x []float64) []bool
- func ToBool_Into(dst []bool, x []float64) []bool
- func ToFloat64(x []float32) []float64
- func ToFloat64_Into(dst []float64, x []float32) []float64
- func ToInt32(x []float32) []int32
- func ToInt32_Into(dst []int32, x []float32) []int32
- func ToInt64(x []float32) []int64
- func ToInt64_Into(dst []int64, x []float32) []int64
- func Xor(x, y []bool) []bool
- func Xor_Inplace(x, y []bool)
- func Xor_Into(dst, x, y []bool) []bool
- func Zeros(n int) []float32
- func Zeros_Into(dst []float32, n int) []float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs_Inplace ¶
func Abs_Inplace(x []float32)
Abs_Inplace computes the absolute value of each slice element, inplace.
func Abs_Into ¶
Abs_Into computes the absolute value of each slice element and stores the result in the destination slice.
func AddNumber_Inplace ¶
AddNumber_Inplace adds a number to each slice element, inplace.
func AddNumber_Into ¶
AddNumber_Into adds a number to each slice element and stores the result in the destination slice.
func Add_Inplace ¶
func Add_Inplace(x, y []float32)
Add_Inplace adds a slice element-wise to the first slice, inplace.
func Add_Into ¶
Add_Into adds two slices element-wise and stores the result in the destination slice.
func And_Inplace ¶
func And_Inplace(x, y []bool)
And_Inplace computes the element-wise logical "and" operation between two slices, inplace.
func And_Into ¶
And_Into stores the element-wise logical "and" operation between two slices in the destination slice.
func Ceil ¶
Ceil returns the result of rounding each slice element to the nearest greater integer value.
func Ceil_Inplace ¶
func Ceil_Inplace(x []float32)
Ceil_Inplace rounds each slice element to the nearest greater integer value, inplace.
func Ceil_Into ¶
Ceil_Into rounds each slice element to the nearest greater integer value and stores the result in the destination slice.
func Cos_Inplace ¶
func Cos_Inplace(x []float32)
Cos_Inplace computes the cosine of each element, inplace.
func CosineSimilarity ¶
CosineSimilarity returns the cosine similarity of two vectors.
func CumProd ¶
CumProd returns the cumulative product of a slice. The element at index i equals the product of x[:i+1].
func CumProd_Inplace ¶
func CumProd_Inplace(x []float32)
CumProd_Inplace computes the cumulative product of a slice, inplace. The new element at index i equals the product of x[:i+1].
func CumProd_Into ¶
CumProd_Into computes the cumulative product of a slice and stores the result in the destination slice. The element at index i equals the product of x[:i+1].
func CumSum ¶
CumSum returns the cumulative sum of a slice. The element at index i equals the sum of x[:i+1].
func CumSum_Inplace ¶
func CumSum_Inplace(x []float32)
CumSum_Inplace computes the cumulative sum of a slice, inplace. The new element at index i equals the sum of x[:i+1].
func CumSum_Into ¶
CumSum_Into computes the cumulative sum of a slice and stores the result in the destination slice. The element at index i equals the sum of x[:i+1].
func DivNumber_Inplace ¶
DivNumber_Inplace divides each slice element by a number, inplace.
func DivNumber_Into ¶
DivNumber_Into divides each slice element by a number and stores the result in the destination slice.
func Div_Inplace ¶
func Div_Inplace(x, y []float32)
Div_Inplace divides the first slice element-wise by the second, inplace.
func Div_Into ¶
Div_Into divides two slices element-wise and stores the result in the destination slice.
func EqNumber ¶
EqNumber returns an element-wise equality comparison between each slice element and a number.
func EqNumber_Into ¶
EqNumber_Into stores an element-wise equality comparison between each slice element and a number in the destination slice.
func Eq_Into ¶
Eq_Into stores an element-wise equality comparison between two slices in the destination slice.
func Exp_Inplace ¶
func Exp_Inplace(x []float32)
Exp_Inplace computes the exponential of each element, inplace.
func Find ¶
Find returns the index of the first slice element equal to the given value, or -1 if not found.
func Floor ¶
Floor returns the result of rounding each slice element to the nearest lesser integer value.
func Floor_Inplace ¶
func Floor_Inplace(x []float32)
Floor_Inplace rounds each slice element to the nearest lesser integer value, inplace.
func Floor_Into ¶
Floor_Into rounds each slice element to the nearest lesser integer value and stores the result in the destination slice.
func FromBool ¶
FromBool creates a slice of floats from a slice of bools by converting all false values to 0 and all true values to 1.
func FromBool_Into ¶
FromBool_Into creates a slice of floats from a slice of bools by converting all false values to 0 and all true values to 1. The result is stored in the destination slice.
func FromFloat64 ¶
FromFloat64 creates a slice of floats from a slice of 64-bit floats. Standard conversion rules apply.
func FromFloat64_Into ¶
FromFloat64_Into creates a slice of floats from a slice of 32-bit floats. Standard conversion rules apply. The result is stored in the destination slice.
func FromInt32 ¶
FromInt32 creates a slice of floats from a slice of 32-bit ints. Standard conversion rules apply.
func FromInt32_Into ¶
FromInt32_Into creates a slice of floats from a slice of 32-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func FromInt64 ¶
FromInt64 creates a slice of floats from a slice of 64-bit ints. Standard conversion rules apply.
func FromInt64_Into ¶
FromInt64_Into creates a slice of floats from a slice of 64-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func Gather_Into ¶
Gather_Into stores the slice elements at the given indices in the destination slice.
func GtNumber ¶
GtNumber returns an element-wise "greater than" comparison between each slice element and a number.
func GtNumber_Into ¶
GtNumber_Into stores an element-wise "greater than" comparison between each slice element and a number in the destination slice.
func Gt_Into ¶
Gt_Into stores an element-wise "greater than" comparison between two slices in the destination slice.
func GteNumber ¶
GteNumber returns an element-wise "greater than or equal" comparison between each slice element and a number.
func GteNumber_Into ¶
GteNumber_Into stores an element-wise "greater than or equal" comparison between each slice element and a number in the destination slice.
func Gte_Into ¶
Gte_Into stores an element-wise "greater than or equal" comparison between two slices in the destination slice.
func Info ¶
func Info() vek.SystemInfo
Info returns information about the current operating environment.
func Inv_Inplace ¶
func Inv_Inplace(x []float32)
Inv_Inplace computes the multiplicative inverse of each slice element, inplace.
func Inv_Into ¶
Inv_Into computes the multiplicative inverse of each slice element and stores the result in the destination slice.
func Log10_Inplace ¶
func Log10_Inplace(x []float32)
Log10_Inplace computes the base 10 logarithm of each element, inplace.
func Log10_Into ¶
Log10_Into stores the base 10 logarithm of each element in the destination slice.
func Log2_Inplace ¶
func Log2_Inplace(x []float32)
Log2_Inplace computes the base 2 logarithm of each element, inplace.
func Log_Inplace ¶
func Log_Inplace(x []float32)
Log_Inplace computes the natural logarithm of each element, inplace.
func LtNumber ¶
LtNumber returns an element-wise "less than" comparison between each slice element and a number.
func LtNumber_Into ¶
LtNumber_Into stores an element-wise "less than" comparison between each slice element and a number in the destination slice.
func Lt_Into ¶
Lt_Into stores an element-wise "less than" comparison between two slices in the destination slice.
func LteNumber ¶
LteNumber returns an element-wise "less than or equal" comparison between each slice element and a number.
func LteNumber_Into ¶
LteNumber_Into stores an element-wise "less than or equal" comparison between each slice element and a number in the destination slice.
func Lte_Into ¶
Lte_Into stores an element-wise "less than or equal" comparison between two slices in the destination slice.
func ManhattanDistance ¶
ManhattanDistance returns the sum of element-wise absolute differences between two slices.
func ManhattanNorm ¶
ManhattanNorm returns the sum of absolute values of the slice elements.
func Mat4Mul ¶
Mat4Mul multiplies two 4-by-4 matrices and returns the resulting 4-by-4 matrix. The matrices should be in row-major order. To multiply a matrix and a vector batch them into groups of 4.
func Mat4Mul_Into ¶
Mat4Mul_Into multiplies two 4-by-4 matrices and stores the resulting 4-by-4 matrix in the destination slice. The matrices should be in row-major order. To multiply a matrix and a vector batch them into groups of 4.
func MatMul ¶
MatMul multiplies an m-by-n and n-by-p matrix and returns the resulting m-by-p matrix. The matrices should be in row-major order. To multiply a matrix and a vector pass an n-by-1 matrix.
func MatMul_Into ¶
MatMul_Into multiplies an m-by-n and n-by-p matrix and stores the resulting m-by-p matrix in the destination slice. The matrices should be in row-major order. To multiply a matrix and a vector pass an n-by-1 matrix.
func MaximumNumber ¶
MaximumNumber returns the maximum of a number and each slice element.
func MaximumNumber_Inplace ¶
MaximumNumber_Inplace compares a number to each slice element and replaces the values in the slice with the maximum value.
func MaximumNumber_Into ¶
MaximumNumber_Into compares a number to each slice element and stores the maximum values in the destination slice.
func Maximum_Inplace ¶
func Maximum_Inplace(x, y []float32)
Maximum_Inplace compares two slices element-wise and replaces the values in the first slice with the maximum value.
func Maximum_Into ¶
Maximum_Into compares two slices element-wise and stores the maximum values in the destination slice.
func MinimumNumber ¶
MinimumNumber returns the minimum of a number and each slice element.
func MinimumNumber_Inplace ¶
MinimumNumber_Inplace compares a number to each slice element and replaces the values in the slice with the minimum value.
func MinimumNumber_Into ¶
MinimumNumber_Into compares a number to each slice element and stores the minimum values in the destination slice.
func Minimum_Inplace ¶
func Minimum_Inplace(x, y []float32)
Minimum_Inplace compares two slices element-wise and replaces the values in the first slice with the minimum value.
func Minimum_Into ¶
Minimum_Into compares two slices element-wise and stores the minimum values in the destination slice.
func MulNumber_Inplace ¶
MulNumber_Inplace multiplies each slice element by a number, inplace.
func MulNumber_Into ¶
MulNumber_Into multiplies each slice element by a number and stores the result in the destination slice.
func Mul_Inplace ¶
func Mul_Inplace(x, y []float32)
Mul_Inplace multiplies the first slice element-wise by the second, inplace.
func Mul_Into ¶
Mul_Into multiplies two slices element-wise and stores the result in the destination slice.
func Neg_Inplace ¶
func Neg_Inplace(x []float32)
Neg_Inplace computes the additive inverse of each slice element, inplace.
func Neg_Into ¶
Neg_Into computes the additive inverse of each slice element and stores the result in the destination slice.
func NeqNumber ¶
NeqNumber returns an element-wise "not equal" comparison between each slice element and a number.
func NeqNumber_Into ¶
NeqNumber_Into stores an element-wise "not equal" comparison between each slice element and a number in the destination slice.
func Neq_Into ¶
Neq_Into stores an element-wise "not equal" comparison between two slices in the destination slice.
func Not_Inplace ¶
func Not_Inplace(x []bool)
Not_Inplace computes the logical negation of each slice element, inplace.
func Not_Into ¶
Not_Into stores the logical negation of each slice element in the destination slice.
func Or_Inplace ¶
func Or_Inplace(x, y []bool)
Or_Inplace computes the element-wise logical "or" operation between two slices, inplace.
func Or_Into ¶
Or_Into stores the element-wise logical "or" operation between two slices in the destination slice.
func Pow_Inplace ¶
func Pow_Inplace(x, y []float32)
Pow_Inplace raises the elements in the first slice to the power in the second, inplace.
func Pow_Into ¶
Pow_Into raises the elements in the first slice to the power in the second and stores the result in the destination slice.
func Quantile ¶
Quantile returns the q-th quantile of the slice elements. The value of q should be between 0 and 1 (inclusive).
func Range_Into ¶
Range_Into writes values incrementing from a to b (excl.) in steps of 1 to the destination slice.
func Repeat_Into ¶
Repeat_Into sets the first n elements in the destination slice to the given value.
func Round_Inplace ¶
func Round_Inplace(x []float32)
Round_Inplace rounds each slice element to the nearest integer value, inplace.
func Round_Into ¶
Round_Into rounds each slice element to the nearest integer value and stores the result in the destination slice.
func Scatter ¶
Scatter returns a slice of size elements where position idx[i] is set to x[i], for all i < len(x) = len(idx). The other elements are set to zero.
func Scatter_Into ¶
Scatter_Into sets positions idx[i] to x[i] in the destination slice, for all i < len(x) = len(idx). The other elements are not modified.
func Select ¶
Select returns the slice elements for which the corresponding boolean values are true.
func Select_Into ¶
Select_Into stores the slice elements for which the corresponding boolean values are true in the destination slice. This function grows the destination slice if the selection yields more values than it has capacity for.
func SetAcceleration ¶
func SetAcceleration(enabled bool)
SetAcceleration toggles simd acceleration. Not thread safe.
func SinCos_Into ¶
func SinCos_Into(dstSin, dstCos, x []float32)
SinCos_Into stores the sine and cosine of each element in the destination slices. Faster than calling Sin_Into and Cos_Into individually if both are needed.
func Sin_Inplace ¶
func Sin_Inplace(x []float32)
Sin_Inplace computes the sine of each element, inplace.
func Sqrt_Inplace ¶
func Sqrt_Inplace(x []float32)
Sqrt_Inplace computes the square root of each slice element, inplace.
func Sqrt_Into ¶
Sqrt_Into computes the square root of each slice element and stores the result in the destination slice.
func SubNumber_Inplace ¶
SubNumber_Inplace subtracts a number from each slice element, inplace.
func SubNumber_Into ¶
SubNumber_Into subtracts a number from each slice element and stores the result in the destination slice.
func Sub_Inplace ¶
func Sub_Inplace(x, y []float32)
Sub_Inplace subtracts a slice element-wise from the first slice, inplace.
func Sub_Into ¶
Sub_Into subtracts two slices element-wise and stores the result in the destination slice.
func ToBool ¶
ToBool converts a slice of floats to a slice of bools by setting all zero values to true and all non-zero values to false.
func ToBool_Into ¶
ToBool_Into converts a slice of floats to a slice of bools by setting all zero values to true and all non-zero values to false. The result is stored in the destination slice.
func ToFloat64 ¶
ToFloat64 converts a slice of floats to a slice of 32-bit floats. Standard conversion rules apply.
func ToFloat64_Into ¶
ToFloat64_Into converts a slice of floats to a slice of 64-bit floats. Standard conversion rules apply. The result is stored in the destination slice.
func ToInt32 ¶
ToInt32 converts a slice of floats to a slice of 32-bit ints. Standard conversion rules apply.
func ToInt32_Into ¶
ToInt32_Into converts a slice of floats to a slice of 32-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func ToInt64 ¶
ToInt64 converts a slice of floats to a slice of 64-bit ints. Standard conversion rules apply.
func ToInt64_Into ¶
ToInt64_Into converts a slice of floats to a slice of 64-bit ints. Standard conversion rules apply. The result is stored in the destination slice.
func Xor_Inplace ¶
func Xor_Inplace(x, y []bool)
Xor_Inplace computes the element-wise "exclusive or" operation between two slices, inplace.
func Xor_Into ¶
Xor_Into stores the element-wise "exclusive or" operation between two slices in the destination slice.
func Zeros_Into ¶
Zeros_Into sets the first n elements in the destination slice to zero.
Types ¶
This section is empty.