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 module
bit_layout
Defines BitLayout, a layout that is linear over F2.
A layout whose extents are powers of two is linear over F2: each domain bit
goes to a fixed set of codomain bits, and a point goes to the XOR of the
images of its set bits. Strided modes and swizzles are both linear in this
sense, so one BitLayout describes either. Points are UInt64s in whatever
encoding the domain and codomain spaces define.
You can import these APIs from the layout.bit_layout module:
from layout.bit_layout import BitLayout, placement
comptime pairs = BitLayout().run(0, 1, 0).run(16, 5, 1)comptime values
BIT_LAYOUT_BITS
comptime BIT_LAYOUT_BITS = 64
The number of domain bits a BitLayout can map.
Structs
-
BitLayout: A linear map over F2: domain bitigoes toimg[i].
Functions
-
bit: Returns the point with only bitiset. -
bits: Returns the mask of bitslothroughlo + n - 1. -
is_bit_linear: Returns whether a static layout is linear over F2. -
placement: Returns a static layout as aBitLayoutfrom coordinate bits to offset bits.