Mojo struct
Element
struct Element[dtype: DType, layout: Layout, /, *, bitwidth: Int = Int(bitwidthof[AnyTrivialRegType,__mlir_type.!kgen.target]())]
Aliases
element_data_type = SIMD[dtype, layout.size()]
:
Fields
- element_data (
SIMD[dtype, layout.size()]
): - runtime_layout (
RuntimeLayout[layout, bitwidth=bitwidth]
):
Implemented traits
AnyType
,
Stringable
,
UnknownDestructibility
,
Writable
Methods
__init__
@implicit
__init__(out self, element_data: SIMD[dtype, layout.size()])
__init__(out self, element_data: SIMD[dtype, layout.size()], runtime_layout: RuntimeLayout[layout, bitwidth=bitwidth])
load
static load(ptr: UnsafePointer[SIMD[dtype, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin], runtime_layout: RuntimeLayout[layout, bitwidth=bitwidth] = RuntimeLayout()) -> Self
masked_load
static masked_load(ptr: UnsafePointer[SIMD[dtype, 1], address_space=address_space, alignment=alignment, mut=mut, origin=origin], runtime_layout: RuntimeLayout[layout, bitwidth=bitwidth] = RuntimeLayout()) -> Self
store
store(self, ptr: UnsafePointer[SIMD[dtype, 1], address_space=address_space, alignment=alignment, origin=origin])
masked_store
masked_store(self, ptr: UnsafePointer[SIMD[dtype, 1], address_space=address_space, alignment=alignment, origin=origin])
__str__
__str__(self) -> String
write_to
write_to[W: Writer](self, mut writer: W)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!