VMEM#
Defined in src/device/vpu_runtime/include/cupva_device/device_core.h
-
VMEM(bank, type, name, ...)#
Declare exported VMEM data buffer.
Variadic macro used to declare a buffer in VMEM. If w/h are specified, the buffer will be a 1D/2D array with 64 byte alignment. Otherwise, it will be a single element variable. In the single element case, if sizeof(type) >= 64, then the buffer will have 64 byte alignment. Otherwise, it will have 4 byte alignment.
The contents of this buffer is initialized to 0 by default. This buffer will be added to the export table as a standard data buffer.
- Parameters:
bank – Should be A, B or C (refers to VMEM bank)
type – Type of buffer (or type of elements in the case of an array)
name – Name of buffer
... – Optional arguments, specified in the following order:
h gives array dim. Defaults to scalar type if not present.
w gives array dim. Defaults to 1D array if only h is present, 2D array otherwise.