simd

Standard library module View source
class Vec
@tuple
class Vec[T, N]
Fields 2
T type
N Literal[int]
Constructors 4
__new__
__new__(x)
__new__
__new__(x: str, offset: int = 0)
__new__
__new__(x: bytes, offset: int = 0)
__new__
__new__(x: List[T], offset: int = 0)
Methods 16
cast
cast(self, T2: type)
cast_ptr
@pure @llvm
cast_ptr(ptr: Ptr[T], T: type, T2: type)
ret ptr %ptr
lsh
lsh(self, other: Literal[int])
rsh
rsh(self, other: Literal[int])
sqrt
sqrt(self)
log
log(self)
sin
sin(self)
cos
cos(self)
min
min(self, other: Vec[T, N])
max
max(self, other: Vec[T, N])
mask
mask(self, other: Vec[T, N], mask)
add
add(self, other: Vec[T, N], overflow: Literal[bool] = False)
sub
sub(self, other: Vec[T, N], overflow: Literal[bool] = False)
sum
sum(self)
scatter
scatter(self: Vec[T, N])
bitflip
bitflip(self)
Special methods 22
__copy__
__copy__(self)
__neg__
__neg__(self)
__getitem__
@pure @llvm
__getitem__(self, n: Literal[int])
%0 = extractelement <{=N} x {=T}> %self, i32 {=n}
ret {=T} %0
__repr__
__repr__(self)
__eq__
__eq__(self, other: Vec[T, N])
__eq__(self, other: T)
__ne__
__ne__(self: Vec[T, N], other: Vec[T, N])
__ne__(self, other: T)
__and__
__and__(self, other: Vec[T, N])
__or__
__or__(self, other: Vec[T, N])
__xor__
__xor__(self, other: Vec[T, N])
__lshift__
__lshift__(self, other: Vec[T, N])
__rshift__
__rshift__(self, other: Vec[T, N])
__add__
__add__(self, other: Vec[T, N])
__add__(self, other: T)
__sub__
__sub__(self, other: Vec[T, N])
__sub__(self, other: T)
__mul__
__mul__(self, other: Vec[T, N])
__mul__(self, other: T)
__truediv__
__truediv__(self, other: Vec[T, N])
__truediv__(self, other: T)
__floordiv__
__floordiv__(self, other: Vec[T, N])
__floordiv__(self, other: T)
__mod__
__mod__(self, other: Vec[T, N])
__mod__(self, other: T)
__lt__
__lt__(self, other: Vec[T, N])
__lt__(self, other: T)
__le__
__le__(self, other: Vec[T, N])
__le__(self, other: T)
__gt__
__gt__(self, other: Vec[T, N])
__gt__(self, other: T)
__ge__
__ge__(self, other: Vec[T, N])
__ge__(self, other: T)
__abs__
__abs__(self)