For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
AddressEncoding
struct AddressEncoding
How an operand's address bits encode a location in its storage.
Implemented traits
AnyType,
Copyable,
Deinitable,
Equatable,
ImplicitlyCopyable,
Movable,
RegisterPassable,
TrivialRegisterPassable,
Writable
comptime members
BYTES
comptime BYTES = AddressEncoding(Int(1))
Memory: the byte address, such as a shared or global offset.
REGISTERS
comptime REGISTERS = AddressEncoding(Int(0))
Registers: the register number from bit INDEX_VALUE and the thread from INDEX_LANE, as in the index space.
TMEM
comptime TMEM = AddressEncoding(Int(2))
Tensor Memory: columns from bit TMEM_COLUMN and lanes from bit TMEM_LANE, as a tcgen05 address.
Methods
__eq__
def __eq__(self, other: Self) -> Bool
Returns whether two encodings are the same.
Args:
- other (
Self): The encoding to compare with.
Returns:
Bool: True when they are the same encoding.
write_to
def write_to(self, mut writer: T)
Writes the encoding's name.
Args:
- writer (
T): The writer to write to.