MemoryType#

enum class Halide::MemoryType#

An enum describing different address spaces to be used with Func::store_in.

Values:

enumerator Auto#

Let Halide select a storage type automatically.

enumerator Heap#

Heap/global memory.

Allocated using halide_malloc, or halide_device_malloc

enumerator Stack#

Stack memory.

Allocated using alloca. Requires a constant size. Corresponds to per-thread local memory on the GPU. If all accesses are at constant coordinates, may be promoted into the register file at the discretion of the register allocator.

enumerator Register#

Register memory.

The allocation should be promoted into the register file. All stores must be at constant coordinates. May be spilled to the stack at the discretion of the register allocator.

enumerator GPUShared#

Allocation is stored in GPU shared memory.

Also known as “local” in OpenCL, and “threadgroup” in metal. Can be shared across GPU threads within the same block.

enumerator GPUTexture#

Allocation is stored in GPU texture memory and accessed through hardware sampler.

enumerator LockedCache#

Allocate Locked Cache Memory to act as local memory.

enumerator VTCM#

Vector Tightly Coupled Memory.

HVX (Hexagon) local memory available on v65+. This memory has higher performance and lower power. Ideal for intermediate buffers. Necessary for vgather-vscatter instructions on Hexagon

enumerator AMXTile#

AMX Tile register for X86.

Any data that would be used in an AMX matrix multiplication must first be loaded into an AMX tile register.

enumerator GPUSharedAsync#

GPU shared memory, written by an asynchronous copy instruction that moves data straight from global memory without routing it through registers.

The only stores allowed to such an allocation are unpredicated copies of a whole number of 4, 8 or 16 byte chunks from a densely indexed global buffer, because that is all the hardware can do. On GPU APIs with no such instruction this is ordinary shared memory.