halide_buffer_t结构体 参考

`#include <HalideRuntime.h>`

## Public 属性

uint64_t | device
const struct halide_device_interface_t * | device_interface
uint8_t * | host
uint64_t | flags
struct halide_type_t | type
int32_t | dimensions
halide_dimension_t * | dim
void * | padding

## 详细描述

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>.

## 类成员变量说明

## device

uint64_t halide_buffer_t::device

A device-handle for e.g. GPU memory used to back this buffer.

## device_interface

const struct halide_device_interface_t* halide_buffer_t::device_interface

The interface used to interpret the above handle.

## dim

halide_dimension_t* halide_buffer_t::dim

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

## dimensions

int32_t halide_buffer_t::dimensions

The dimensionality of the buffer.

## flags

uint64_t halide_buffer_t::flags

flags with various meanings.

## host

uint8_t* halide_buffer_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).

## padding

void* halide_buffer_t::padding

Pads the buffer up to a multiple of 8 bytes

## type

struct halide_type_t halide_buffer_t::type

The type of each buffer element.

该结构体的文档由以下文件生成:

- include/HalideRuntime.h