Documentation ¶
Index ¶
- func Abs[E constraintsExt.OrderedNumber, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
- func Add[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Address[E any, Z constraintsExt.Vector[*E], X constraintsExt.Vector[[]E], ...](z *Z, m *predicate.Bool, x *X, y *Y)
- func And[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func AndNot[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Blend[E any, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Broadcast[E any, Z constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x E)
- func Complex128[Z constraintsExt.Vector[complex128], XY constraintsExt.Vector[float64]](z *Z, x, y *XY)
- func Complex64[Z constraintsExt.Vector[complex64], XY constraintsExt.Vector[float32]](z *Z, x, y *XY)
- func Convert[To, From constraintsExt.ConvertableNumber, Z constraintsExt.Vector[To], ...](z *Z, x *X)
- func ConvertComplex[To, From constraints.Complex, Z constraintsExt.Vector[To], ...](z *Z, x *X)
- func Copy[E any, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
- func Div[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Equal[E comparable, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func Gather[E any, Z constraintsExt.Vector[E], X constraintsExt.Vector[*E]](z *Z, m *predicate.Bool, x *X)
- func Greater[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func GreaterOrEqual[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func Imag32[Z constraintsExt.Vector[float32], X constraintsExt.Vector[complex64]](z *Z, x *X)
- func Imag64[Z constraintsExt.Vector[float64], X constraintsExt.Vector[complex128]](z *Z, x *X)
- func Iota[E constraintsExt.ConvertableNumber, Z constraintsExt.Vector[E]](z *Z, m *predicate.Bool, start, inc E)
- func IsInf[E constraints.Float, X constraintsExt.Vector[E]](z, m *predicate.Bool, x *X, sign int)
- func IsNaN[E constraints.Float, X constraintsExt.Vector[E]](z, m *predicate.Bool, x *X)
- func LeadingZeros[E constraints.Unsigned, Z constraintsExt.Vector[int], ...](z *Z, m *predicate.Bool, x *X)
- func Less[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func LessOrEqual[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func Max[E constraints.Ordered, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Merge[E any, W constraintsExt.Vector[int], XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, w *W, x, y *XYZ)
- func Min[E constraints.Ordered, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Mul[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func MulAdd[E constraintsExt.Number, WXYZ constraintsExt.Vector[E]](z *WXYZ, m *predicate.Bool, w, x, y *WXYZ)
- func Neg[E constraintsExt.Number, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
- func Not[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func NotEqual[E comparable, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
- func OnesCount[E constraints.Unsigned, Z constraintsExt.Vector[int], ...](z *Z, m *predicate.Bool, x *X)
- func Or[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Pairs[E any, Z constraintsExt.Vector[E], X constraintsExt.Vector[E]](z0, z1 *Z, x *X)
- func Permute[E any, I constraints.Integer, XZ constraintsExt.Vector[E], ...](z *XZ, m *predicate.Bool, x *XZ, y *Y)
- func Real32[Z constraintsExt.Vector[float32], X constraintsExt.Vector[complex64]](z *Z, x *X)
- func Real64[Z constraintsExt.Vector[float64], X constraintsExt.Vector[complex128]](z *Z, x *X)
- func Round[E constraints.Float, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
- func RoundToEven[E constraints.Float, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
- func Scatter[E any, Z constraintsExt.Vector[*E], X constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x *X)
- func Shuffle[E any, XZ constraintsExt.Vector[E]](z *XZ, w int, x *XZ)
- func Sub[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func TrailingZeros[E constraints.Unsigned, Z constraintsExt.Vector[int], ...](z *Z, m *predicate.Bool, x *X)
- func Xor[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
- func Zero[E any, Z constraintsExt.Vector[E]](z *Z, m *predicate.Bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[E constraintsExt.OrderedNumber, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
func Add ¶
func Add[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Address ¶
func Address[E any, Z constraintsExt.Vector[*E], X constraintsExt.Vector[[]E], Y constraintsExt.Vector[int]](z *Z, m *predicate.Bool, x *X, y *Y)
Address sets elements of vector z to the addresses of slice elements in x, indexed by y.
func And ¶
func And[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func AndNot ¶
func AndNot[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Blend ¶
func Blend[E any, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
Blend returns a vector with each element drawn from a if the corresponding mask bit in m is set or from b if the bit is not set.
func Complex128 ¶
func Complex128[Z constraintsExt.Vector[complex128], XY constraintsExt.Vector[float64]](z *Z, x, y *XY)
func Complex64 ¶
func Complex64[Z constraintsExt.Vector[complex64], XY constraintsExt.Vector[float32]](z *Z, x, y *XY)
func Convert ¶
func Convert[To, From constraintsExt.ConvertableNumber, Z constraintsExt.Vector[To], X constraintsExt.Vector[From]](z *Z, x *X)
Convert returns a vector with all elements converted to another numeric type. Complex numbers cannot be converted to other types.
func ConvertComplex ¶
func ConvertComplex[To, From constraints.Complex, Z constraintsExt.Vector[To], X constraintsExt.Vector[From]](z *Z, x *X)
ConvertComplex returns a vector with all elements converted to another complex numeric type.
func Div ¶
func Div[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Equal ¶
func Equal[E comparable, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func Gather ¶
func Gather[E any, Z constraintsExt.Vector[E], X constraintsExt.Vector[*E]](z *Z, m *predicate.Bool, x *X)
Gather sets elements of z to the values referenced by pointers in x.
func Greater ¶
func Greater[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func GreaterOrEqual ¶
func GreaterOrEqual[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func Imag32 ¶
func Imag32[Z constraintsExt.Vector[float32], X constraintsExt.Vector[complex64]](z *Z, x *X)
func Imag64 ¶
func Imag64[Z constraintsExt.Vector[float64], X constraintsExt.Vector[complex128]](z *Z, x *X)
func Iota ¶
func Iota[E constraintsExt.ConvertableNumber, Z constraintsExt.Vector[E]](z *Z, m *predicate.Bool, start, inc E)
Iota stores incrementing integer values in elements of z. TODO should it store i, j or allow caller to decide? TODO can only be implemented for complex numbers if we accumulate rather than multiplying (for which type construction complex128(int) does not work)
func IsInf ¶
func IsInf[E constraints.Float, X constraintsExt.Vector[E]](z, m *predicate.Bool, x *X, sign int)
func IsNaN ¶
func IsNaN[E constraints.Float, X constraintsExt.Vector[E]](z, m *predicate.Bool, x *X)
func LeadingZeros ¶
func LeadingZeros[E constraints.Unsigned, Z constraintsExt.Vector[int], X constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x *X)
func Less ¶
func Less[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func LessOrEqual ¶
func LessOrEqual[E constraints.Ordered, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func Max ¶
func Max[E constraints.Ordered, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Merge ¶
func Merge[E any, W constraintsExt.Vector[int], XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, w *W, x, y *XYZ)
Merge generalises Copy, Zero, Blend, Permute, Rotate, Shuffle, Reverse. z[i] = m[i] ? x[w[i]] : y[w[i]] If m == nil, all predicate are active and y has no effect on the result. If x == nil, x[i] takes the value of z[i]. If y == nil, y[i] takes the value of z[i]. If w == nil, w[i] takes the value of i. It is difficult to pass nils from a type-parameterised function because there is no easy way to specify N, the length of the vector.
func Min ¶
func Min[E constraints.Ordered, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Mul ¶
func Mul[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func MulAdd ¶
func MulAdd[E constraintsExt.Number, WXYZ constraintsExt.Vector[E]](z *WXYZ, m *predicate.Bool, w, x, y *WXYZ)
Note this is named FMA in math package.
func Neg ¶
func Neg[E constraintsExt.Number, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
func Not ¶
func Not[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func NotEqual ¶
func NotEqual[E comparable, XY constraintsExt.Vector[E]](z, m *predicate.Bool, x, y *XY)
func OnesCount ¶
func OnesCount[E constraints.Unsigned, Z constraintsExt.Vector[int], X constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x *X)
func Or ¶
func Or[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func Pairs ¶
func Pairs[E any, Z constraintsExt.Vector[E], X constraintsExt.Vector[E]](z0, z1 *Z, x *X)
Pairs splits vector x, placing alternate consecutive elements of x in z0 and z1. Panics if vectors z0 and z1 are not exactly half the length of x.
func Permute ¶
func Permute[E any, I constraints.Integer, XZ constraintsExt.Vector[E], Y constraintsExt.Vector[I]](z *XZ, m *predicate.Bool, x *XZ, y *Y)
Permute sets vector z to elements from x selected using indices in y. An element from x may appear more than once in the result, or may be absent.
func Real32 ¶
func Real32[Z constraintsExt.Vector[float32], X constraintsExt.Vector[complex64]](z *Z, x *X)
func Real64 ¶
func Real64[Z constraintsExt.Vector[float64], X constraintsExt.Vector[complex128]](z *Z, x *X)
func Round ¶
func Round[E constraints.Float, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
func RoundToEven ¶
func RoundToEven[E constraints.Float, XZ constraintsExt.Vector[E]](z *XZ, m *predicate.Bool, x *XZ)
func Scatter ¶
func Scatter[E any, Z constraintsExt.Vector[*E], X constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x *X)
Scatter sets values pointed to by elements of z to corresponding values in x.
func Shuffle ¶
func Shuffle[E any, XZ constraintsExt.Vector[E]](z *XZ, w int, x *XZ)
Shuffle exchanges w consecutive elements from x with the neighbouring w consecutive elements and writes the result to z. When w == 0, Shuffle is equivalent to Copy. When w == 1, each element is exchanged with its neighbour.
func Sub ¶
func Sub[E constraintsExt.Number, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
func TrailingZeros ¶
func TrailingZeros[E constraints.Unsigned, Z constraintsExt.Vector[int], X constraintsExt.Vector[E]](z *Z, m *predicate.Bool, x *X)
func Xor ¶
func Xor[E constraints.Integer, XYZ constraintsExt.Vector[E]](z *XYZ, m *predicate.Bool, x, y *XYZ)
Types ¶
This section is empty.