Mojo struct
Swizzle
@register_passable(trivial)
struct Swizzle
Fields
- bits (
Int
): - base (
Int
): - shift (
Int
): - yyy_mask (
Int
): - zzz_mask (
Int
):
Implemented traits
AnyType
,
Copyable
,
ExplicitlyCopyable
,
LayoutTrait
,
Movable
,
Stringable
,
UnknownDestructibility
,
Writable
Methods
__init__
__init__(bits: Int, base: Int, shift: Int) -> Self
__call__
__call__(self, index: IntTuple[origin]) -> Int
__call__(self, offset: Int) -> Int
__call__(self, offset: SIMD[type, 1]) -> SIMD[type, 1]
size
size(self) -> Int
cosize
cosize(self) -> Int
has_shape
static has_shape() -> Bool
write_to
write_to[W: Writer](self, mut writer: W)
__str__
__str__(self) -> String
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!