warp.tile_empty#
- warp.tile_empty( ) Tile[Any, tuple[int, ...]]#
Kernel
Allocate a tile of uninitialized items.
The tile’s contents are undefined; the caller is responsible for overwriting every element before any read. This matches the semantics of
numpy.empty.Because it skips initialization,
tile_emptycan avoid unnecessary stores when every element will be overwritten, especially for"shared"tiles.For accumulator patterns (
a += ...), usetile_zeros()instead - accumulation reads the prior value and would propagate uninitialized data. Usetile_emptyonly when the first operation after construction is a full overwrite (atile_load, a tile-typed assignment, or a complete element-wise fill).- Parameters:
shape – Shape of the output tile
dtype – Data type of output tile’s elements (default float)
storage – The storage location for the tile:
"register"for registers (default) or"shared"for shared memory.
- Returns:
An uninitialized tile with the requested shape and data type.