warp.tile_stack_pop#

warp.tile_stack_pop(s: Any) tuple[Any, int]#
  • Kernel: true
  • Python: false
  • Differentiable: false

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. slot is the index of the slot the element was taken from, in [0, capacity - 1], or -1 if the stack is empty or has no element left for that thread. Test slot for >= 0 before using value. Which thread receives which element is unspecified; use slot rather than the thread index to place the result.

See tile_stack() for a usage example.