Documentation ¶
Index ¶
- func Abs[E constraintsExt.OrderedNumber](z, x Vector[E], m *Mask)
- func Add[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
- func All[X Bool](x X) bool
- func And[E constraints.Integer](z, x, y Vector[E], m *Mask)
- func AndNot[E constraints.Integer](z, x, y Vector[E], m *Mask)
- func Any[X Bool](x X) bool
- func Broadcast[E any](x E) *broadcast[E]
- func Convert[To, From constraintsExt.ConvertableNumber, Z Vector[To], X Vector[From]](z Z, x X)
- func ConvertComplex[To, From constraints.Complex, Z Vector[To], X Vector[From]](z Z, x X)
- func Copy[E any, Z, X Vector[E]](z Z, x X, m *Mask)
- func Count[X Bool](x X) int
- func Div[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
- func Equal[E comparable, Z Bool, XY Vector[E]](z Z, x, y XY)
- func Greater[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
- func GreaterOrEqual[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
- func IsInf[E constraints.Float, Z Bool, X Vector[E]](z Z, x X, sign int)
- func IsNaN[E constraints.Float, Z Bool, X Vector[E]](z Z, x X)
- func IsSet[X Bool](x X, lane int) bool
- func LeadingZeros[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
- func Less[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
- func LessOrEqual[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
- func Max[E constraints.Ordered, XYZ Vector[E]](z, x, y XYZ, m *Mask)
- func Min[E constraints.Ordered, XYZ Vector[E]](z, x, y XYZ, m *Mask)
- func Mul[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
- func Neg[E constraintsExt.Number](z, x Vector[E], m *Mask)
- func None[X Bool](x X) bool
- func Not[E constraints.Integer](z, x Vector[E], m *Mask)
- func NotEqual[E comparable, Z Bool, XY Vector[E]](z Z, x, y XY)
- func OnesCount[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
- func Or[E constraints.Integer](z, x, y Vector[E], m *Mask)
- func Round[E constraints.Float, XZ Vector[E]](z, x XZ, m *Mask)
- func RoundToEven[E constraints.Float, XZ Vector[E]](z, x XZ, m *Mask)
- func ScalableVectorLen[E any]() int
- func Set[Z Bool](z Z, lane int, value bool)
- func SetAll[Z Bool](z Z)
- func SetFirst[Z Bool](z Z)
- func SetLast[Z Bool](z Z)
- func SetNone[Z Bool](z Z)
- func Sub[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
- func TrailingZeros[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
- func Xor[E constraints.Integer](z, x, y Vector[E], m *Mask)
- type Bool
- type Bool1
- type Bool16
- type Bool2
- type Bool32
- type Bool4
- type Bool64
- type Bool8
- type FixedBool
- type FixedVector
- type Mask
- type ScalableBool
- type ScalableVector
- type Vec1
- type Vec16
- type Vec2
- type Vec32
- type Vec4
- type Vec64
- type Vec8
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Abs ¶
func Abs[E constraintsExt.OrderedNumber](z, x Vector[E], m *Mask)
func Add ¶
func Add[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
func And ¶
func And[E constraints.Integer](z, x, y Vector[E], m *Mask)
func AndNot ¶
func AndNot[E constraints.Integer](z, x, y Vector[E], m *Mask)
func Broadcast ¶
func Broadcast[E any](x E) *broadcast[E]
Broadcast returns a value that repeats for all lanes of any vector it is combined with.
func Convert ¶
func Convert[To, From constraintsExt.ConvertableNumber, Z Vector[To], X 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 Vector[To], X 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](z, x, y Vector[E], m *Mask)
func Equal ¶
func Equal[E comparable, Z Bool, XY Vector[E]](z Z, x, y XY)
func Greater ¶
func Greater[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
func GreaterOrEqual ¶
func GreaterOrEqual[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
func IsNaN ¶
func IsNaN[E constraints.Float, Z Bool, X Vector[E]](z Z, x X)
func LeadingZeros ¶
func LeadingZeros[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
func Less ¶
func Less[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
func LessOrEqual ¶
func LessOrEqual[E constraints.Ordered, Z Bool, XY Vector[E]](z Z, x, y XY)
func Max ¶
func Max[E constraints.Ordered, XYZ Vector[E]](z, x, y XYZ, m *Mask)
func Min ¶
func Min[E constraints.Ordered, XYZ Vector[E]](z, x, y XYZ, m *Mask)
func Mul ¶
func Mul[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
func Neg ¶
func Neg[E constraintsExt.Number](z, x Vector[E], m *Mask)
func Not ¶
func Not[E constraints.Integer](z, x Vector[E], m *Mask)
func NotEqual ¶
func NotEqual[E comparable, Z Bool, XY Vector[E]](z Z, x, y XY)
func OnesCount ¶
func OnesCount[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
func Or ¶
func Or[E constraints.Integer](z, x, y Vector[E], m *Mask)
func Round ¶
func Round[E constraints.Float, XZ Vector[E]](z, x XZ, m *Mask)
func RoundToEven ¶
func RoundToEven[E constraints.Float, XZ Vector[E]](z, x XZ, m *Mask)
func ScalableVectorLen ¶
ScalableVectorLen returns the vector length that NewVector will use to create a vector of elements of type E.
func Sub ¶
func Sub[E constraintsExt.Number](z, x, y Vector[E], m *Mask)
func TrailingZeros ¶
func TrailingZeros[E constraints.Unsigned, Z Vector[int], X Vector[E]](z Z, x X, m *Mask)
func Xor ¶
func Xor[E constraints.Integer](z, x, y Vector[E], m *Mask)
Types ¶
type Bool ¶
type Bool interface { FixedBool | ScalableBool // contains filtered or unexported methods }
type FixedVector ¶
type FixedVector[E any] interface { *Vec1[E] | *Vec2[E] | *Vec4[E] | *Vec8[E] | *Vec16[E] | *Vec32[E] | *Vec64[E] | *broadcast[E] }
FixedVector is a type constraint that matches any fixed-length vector or scalar.
type ScalableBool ¶
type ScalableBool interface { }
func NewBoolFor ¶
func NewBoolFor[SizeFor any]() ScalableBool
NewBoolFor returns a ScalableBool sized to the number of elements in a ScalableVector of type SizeFor.
type ScalableVector ¶
type ScalableVector[E any] interface{}
func NewVector ¶
func NewVector[E any]() ScalableVector[E]
NewVector returns a vector of the best length for the element type. The length is chosen to make best use of the CPU's vector instructions.
func NewVectorFor ¶
NewVectorFor returns a ScalableVector sized to match the length of another vector with elements of type SizeFor. NewVectorFor should be used when you require vectors with the same number of elements but different types.
type Vector ¶
type Vector[E any] interface { FixedVector[E] | ScalableVector[E] // contains filtered or unexported methods }