halide_buffer_t#

struct halide_buffer_t#

The raw representation of an image passed around by generated Halide code.

It includes some stuff to track whether the image is not actually in main memory, but instead on a device (like a GPU). For a more convenient C++ wrapper, use Halide::Buffer<T>.

Public Members

uint64_t device#

A device-handle for e.g.

GPU memory used to back this buffer.

const struct halide_device_interface_t *device_interface#

The interface used to interpret the above handle.

uint8_t *host#

A pointer to the start of the data in main memory.

In terms of the Halide coordinate system, this is the address of the min coordinates (defined below).

uint64_t flags#

flags with various meanings.

struct halide_type_t type#

The type of each buffer element.

int32_t dimensions#

The dimensionality of the buffer.

halide_dimension_t *dim#

The shape of the buffer.

Halide does not own this array - you must manage the memory for it yourself.

void *padding#

Pads the buffer up to a multiple of 8 bytes.