CUPVA_EXPORT#

Defined in src/device/vpu_runtime/include/cupva_device/device_core.h

CUPVA_EXPORT(variable, name, ...)#

Export variable in VMEM to export table.

To access a variable from host code, it must be part of export table. Variables created using VMEM are automatically added to export table. This macro allows adding other variables to export table. The most common use is to export the member of a struct:

struct CircularBufferStruct {
    int iterations;
    CUPVA_ALIGNED(int, circularBuffer[CB_SIZE], 64);
};
VMEM(A, CircularBufferStruct, myStruct);
CUPVA_EXPORT(myStruct.circularBuffer, circularBuffer);

The above code allows accessing myStruct.circularBuffer via the exported name “circularBuffer”.

Parameters:
  • variable – Variable to export

  • name – Name to export the variable as

  • ... – Optional third argument to specify type from VMEM_BUFFER_TYPES enum. Default is VMEM_TYPE_DATA.