warp.tile_stack_pop#
- warp.tile_stack_pop(s: Any) tuple[Any, int]#
Pop a value from a tile stack.
Every thread in the block must reach this call. Popping an empty stack is harmless.
- Parameters:
s – The tile stack, from
tile_stack()- Returns:
A tuple
(value, slot). Each thread receives at most one element.slotis the index of the slot the element was taken from, in[0, capacity - 1], or-1if the stack is empty or has no element left for that thread. Testslotfor>= 0before usingvalue. Which thread receives which element is unspecified; useslotrather than the thread index to place the result.
See
tile_stack()for a usage example.