Mojo struct
ThreadInfo
struct ThreadInfo
Thread identification within the warp group.
Fieldsβ
- βwarp_id (
Int): - βlane_id (
Int): - βlane_row (
UInt32): - βlane_col (
UInt32):
Implemented traitsβ
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
Methodsβ
__init__β
__init__(warp_id: Int, lane_id: Int, lane_row: UInt32, lane_col: UInt32) -> Self
from_warp_group_idxβ
static from_warp_group_idx(warp_group_thread_idx: Int) -> Self
Create ThreadInfo from a warp group thread index.
Args:
- βwarp_group_thread_idx (
Int): 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?
Thank you! We'll create more content like this.
Thank you for helping us improve!