IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

LaunchAttributeValue

struct LaunchAttributeValue

Represents a value for a CUDA launch attribute.

This struct emulates a C union to store different types of launch attribute values. It provides a fixed-size storage that can be initialized with different attribute types such as AccessPolicyWindow or dimension specifications.

Note: This implementation uses a fixed-size byte array to emulate the union behavior defined in the CUDA Driver API's CUlaunchAttributeValue.

Implemented traits​

AnyType, Copyable, Defaultable, Deinitable, ImplicitlyCopyable, Movable, RegisterPassable, TrivialRegisterPassable

Methods​

__init__​

def __init__() -> Self

Initializes a new LaunchAttributeValue with zeroed storage.

def __init__(policy: AccessPolicyWindow) -> Self

Initializes a LaunchAttributeValue from an AccessPolicyWindow.

Args:

  • ​policy (AccessPolicyWindow): The AccessPolicyWindow to store in this attribute value.

def __init__(dim: Dim) -> Self

Initializes a LaunchAttributeValue from a Dim (dimension) object.

Args:

  • ​dim (Dim): The dimension specification to store in this attribute value.

def __init__(value: Bool) -> Self

Initializes a LaunchAttributeValue from a boolean object..

Args:

  • ​value (Bool): The boolean value to store in this attribute value.