warp.tid#
- warp.tid() int#
Kernel
Query the current thread index or indices.
The return type is determined by the unpacking syntax used:
i = wp.tid()- Returns the first thread index asinti, j = wp.tid()- Returns the first two indices astuple[int, int]i, j, k = wp.tid()- Returns the first three indices astuple[int, int, int]i, j, k, l = wp.tid()- Returns all four indices astuple[int, int, int, int]
The indices correspond to the thread’s position in the kernel launch grid. If fewer indices are requested than the launch dimensionality, only the leading indices are returned.
This function may not be called from user-defined Warp functions.
- warp.tid() tuple[int, int]
Kernel
Query the current thread index or indices.
The return type is determined by the unpacking syntax used:
i = wp.tid()- Returns the first thread index asinti, j = wp.tid()- Returns the first two indices astuple[int, int]i, j, k = wp.tid()- Returns the first three indices astuple[int, int, int]i, j, k, l = wp.tid()- Returns all four indices astuple[int, int, int, int]
The indices correspond to the thread’s position in the kernel launch grid. If fewer indices are requested than the launch dimensionality, only the leading indices are returned.
This function may not be called from user-defined Warp functions.
- warp.tid() tuple[int, int, int]
Kernel
Query the current thread index or indices.
The return type is determined by the unpacking syntax used:
i = wp.tid()- Returns the first thread index asinti, j = wp.tid()- Returns the first two indices astuple[int, int]i, j, k = wp.tid()- Returns the first three indices astuple[int, int, int]i, j, k, l = wp.tid()- Returns all four indices astuple[int, int, int, int]
The indices correspond to the thread’s position in the kernel launch grid. If fewer indices are requested than the launch dimensionality, only the leading indices are returned.
This function may not be called from user-defined Warp functions.
- warp.tid() tuple[int, int, int, int]
Kernel
Query the current thread index or indices.
The return type is determined by the unpacking syntax used:
i = wp.tid()- Returns the first thread index asinti, j = wp.tid()- Returns the first two indices astuple[int, int]i, j, k = wp.tid()- Returns the first three indices astuple[int, int, int]i, j, k, l = wp.tid()- Returns all four indices astuple[int, int, int, int]
The indices correspond to the thread’s position in the kernel launch grid. If fewer indices are requested than the launch dimensionality, only the leading indices are returned.
This function may not be called from user-defined Warp functions.