Skip to main content

Vec

Standard library class simd.Vec View source
class Vec
@tuple
class Vec[T, N]
Fields 2
T type
N Literal[int]
Constructors 4
__new__
__new__[check: Literal[bool] = True](x) -> Vec[(T, N)]
Defined in simd
__new__
__new__[check: Literal[bool] = True](x: str, offset: int = 0) -> Vec[(T, N)]
Defined in simd
__new__
__new__[check: Literal[bool] = True](x: bytes, offset: int = 0) -> Vec[(T, N)]
Defined in simd
__new__
__new__[check: Literal[bool] = True](x: List[T], offset: int = 0) -> Vec[(T, N)]
Defined in simd
Methods 46
load
load[alignment: Literal[int] = 1](data: Ptr[T], offset: int = 0, mask = NoneType(), passthrough = NoneType()) -> Vec[(T, N)]
Defined in simd
store
store[alignment: Literal[int] = 1](self: Self, data: Ptr[T], offset: int = 0, mask = NoneType())
Defined in simd
gather
gather[alignment: Literal[int] = 1](data: Ptr[T], indices: Vec[(int, N)], mask = NoneType(), passthrough = NoneType()) -> Vec[(T, N)]
Defined in simd
scatter
scatter[alignment: Literal[int] = 1](self: Self, data: Ptr[T], indices: Vec[(int, N)], mask = NoneType())
Defined in simd
scatter(self: Vec[(T, N)]) -> List[T]
Defined in simd
cast
cast[T2: type](self: Self) -> Vec[(T2, N)]
Defined in simd
cast_ptr
@pure @llvm
cast_ptr[T: type, T2: type](ptr: Ptr[T]) -> Ptr[T2]
Defined in simd
ret ptr %ptr
extract
extract[check: Literal[bool] = True](self: Self, index: int) -> T
Defined in simd
insert
insert[check: Literal[bool] = True](self: Self, index: int, value: T) -> Vec[(T, N)]
Defined in simd
shuffle
shuffle[check: Literal[bool] = True](self: Self, indices, other = NoneType())
Defined in simd
interleave
interleave(self: Self, other: Vec[(T, N)]) -> Vec[(T, (2 * N))]
Defined in simd
lshift
lshift[check: Literal[bool] = True](self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
lshift[check: Literal[bool] = True](self: Self, other: T) -> Vec[(T, N)]
Defined in simd
lshift[check: Literal[bool] = True](self: Self, other: int) -> Vec[(T, N)]
Defined in simd
lsh
lsh[other: Literal[int]](self: Self) -> Vec[(T, N)]
Defined in simd
rshift
rshift[check: Literal[bool] = True](self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
rshift[check: Literal[bool] = True](self: Self, other: T) -> Vec[(T, N)]
Defined in simd
rshift[check: Literal[bool] = True](self: Self, other: int) -> Vec[(T, N)]
Defined in simd
rsh
rsh[other: Literal[int]](self: Self) -> Vec[(T, N)]
Defined in simd
any
any(self: Self) -> bool
Defined in simd
all
all(self: Self) -> bool
Defined in simd
count
count(self: Self) -> int
Defined in simd
to_bits
to_bits(self: Self) -> UInt[N]
Defined in simd
from_bits
from_bits(bits: UInt[N]) -> Vec[(T, N)]
Defined in simd
floordiv
floordiv[check: Literal[bool] = True](self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
floordiv[check: Literal[bool] = True](self: Self, other: T) -> Vec[(T, N)]
Defined in simd
mod
mod[check: Literal[bool] = True](self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
mod[check: Literal[bool] = True](self: Self, other: T) -> Vec[(T, N)]
Defined in simd
sqrt
sqrt(self: Self)
Defined in simd
log
log(self: Self)
Defined in simd
sin
sin(self: Self)
Defined in simd
cos
cos(self: Self)
Defined in simd
min
min(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
min(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
min(self: Self) -> T
Defined in simd
max
max(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
max(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
max(self: Self) -> T
Defined in simd
mask
mask(self: Self, other: Vec[(T, N)], mask) -> Vec[(T, N)]
Defined in simd
add
add[overflow: Literal[bool] = False](self: Self, other: Vec[(T, N)])
Defined in simd
sub
sub[overflow: Literal[bool] = False](self: Self, other: Vec[(T, N)])
Defined in simd
sum
sum(self: Self) -> T
Defined in simd
prod
prod(self: Self) -> T
Defined in simd
fma
fma(self: Self, other, addend) -> Vec[(T, N)]
Defined in simd
exp
exp(self: Self) -> Vec[(T, N)]
Defined in simd
exp2
exp2(self: Self) -> Vec[(T, N)]
Defined in simd
log2
log2(self: Self) -> Vec[(T, N)]
Defined in simd
log10
log10(self: Self) -> Vec[(T, N)]
Defined in simd
floor
floor(self: Self) -> Vec[(T, N)]
Defined in simd
ceil
ceil(self: Self) -> Vec[(T, N)]
Defined in simd
trunc
trunc(self: Self) -> Vec[(T, N)]
Defined in simd
round
round(self: Self) -> Vec[(T, N)]
Defined in simd
isnan
isnan(self: Self) -> Vec[(u1, N)]
Defined in simd
isinf
isinf(self: Self) -> Vec[(u1, N)]
Defined in simd
isfinite
isfinite(self: Self) -> Vec[(u1, N)]
Defined in simd
signbit
signbit(self: Self) -> Vec[(u1, N)]
Defined in simd
bitflip
bitflip(self: Self) -> Vec[(T, N)]
Defined in simd
Special methods 35
__copy__
__copy__(self: Self) -> Vec[(T, N)]
Defined in simd
__len__
__len__(self: Self) -> int
Defined in simd
__neg__
__neg__(self: Self) -> Vec[(T, N)]
Defined in simd
__getitem__
__getitem__(self: Self, index: int) -> T
Defined in simd
__getitem__[n: Literal[int]](self: Self) -> T
Defined in simd
__repr__
__repr__(self: Self)
Defined in simd
__eq__
__eq__(self: Self, other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__eq__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__ne__
__ne__(self: Vec[(T, N)], other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__ne__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__and__
__and__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__and__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__or__
__or__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__or__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__xor__
__xor__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__xor__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rand__
__rand__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__ror__
__ror__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rxor__
__rxor__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__invert__
__invert__(self: Self) -> Vec[(T, N)]
Defined in simd
__lshift__
__lshift__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__lshift__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__lshift__(self: Self, other: int) -> Vec[(T, N)]
Defined in simd
__rlshift__
__rlshift__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rshift__
__rshift__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__rshift__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rshift__(self: Self, other: int) -> Vec[(T, N)]
Defined in simd
__rrshift__
__rrshift__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__add__
__add__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__add__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__radd__
__radd__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__sub__
__sub__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__sub__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rsub__
__rsub__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__mul__
__mul__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__mul__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rmul__
__rmul__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__truediv__
__truediv__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__truediv__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rtruediv__
__rtruediv__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__floordiv__
__floordiv__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__floordiv__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rfloordiv__
__rfloordiv__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__mod__
__mod__(self: Self, other: Vec[(T, N)]) -> Vec[(T, N)]
Defined in simd
__mod__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__rmod__
__rmod__(self: Self, other: T) -> Vec[(T, N)]
Defined in simd
__lt__
__lt__(self: Self, other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__lt__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__le__
__le__(self: Self, other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__le__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__gt__
__gt__(self: Self, other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__gt__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__ge__
__ge__(self: Self, other: Vec[(T, N)]) -> Vec[(u1, N)]
Defined in simd
__ge__(self: Self, other: T) -> Vec[(u1, N)]
Defined in simd
__abs__
__abs__(self: Self)
Defined in simd