For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo struct
StaticInt
struct StaticInt[value: Int]
A compile-time constant integer that satisfies OptionallyStaticInt.
Because the value is fully known at compile time, no runtime storage is
needed and no kernel argument is generated for this type. Use
StaticInt[1]() to represent the decoding mode without passing an
extra argument to GPU kernels.
Parametersβ
- βvalue (
Int): The compile-time integer value.
Implemented traitsβ
AnyType,
Copyable,
Defaultable,
ImplicitlyCopyable,
ImplicitlyDeletable,
Intable,
Movable,
OptionallyStaticInt,
RegisterPassable,
TrivialRegisterPassable
comptime membersβ
static_valueβ
comptime static_value = Optional(value)
Methodsβ
__init__β
def __init__() -> Self
__int__β
as_uint32β
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!