Skip to main content

Mojo struct

ThreadInfo

@register_passable(trivial) struct ThreadInfo

Thread identification within the warp group.

Fields

  • warp_id (UInt):
  • lane_id (UInt):
  • lane_row (UInt32):
  • lane_col (UInt32):

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, Movable, UnknownDestructibility

Aliases

__copyinit__is_trivial

alias __copyinit__is_trivial = True

__del__is_trivial

alias __del__is_trivial = True

__moveinit__is_trivial

alias __moveinit__is_trivial = True

Methods

__init__

__init__(warp_id: UInt, lane_id: UInt, lane_row: UInt32, lane_col: UInt32) -> Self

from_warp_group_idx

static from_warp_group_idx(warp_group_thread_idx: UInt) -> Self

Create ThreadInfo from a warp group thread index.

Args:

  • warp_group_thread_idx (UInt): Thread index within the warp group.

Returns:

Self: ThreadInfo struct with computed warp_id, lane_id, lane_row, and lane_col.

Was this page helpful?