CUPVA_ALIGNED#
Defined in src/device/vpu_runtime/include/cupva_device/device_core.h
-
CUPVA_ALIGNED(type, name, alignment)#
Helper to declare aligned member variable.
When declaring struct members, this helper allows specifying alignment of that member. This is useful in the case that one of the members of the struct is a buffer with special alignment constraints. Using this macro takes care of differences between supported compilers.
struct CircularBufferStruct { int iterations; CUPVA_ALIGNED(int, circularBuffer[CB_SIZE], 64); };
Note that this only specifies alignment within the struct, absolute alignment may be less depending on struct alignment (see VMEM macro).
- Parameters:
type – Underlying type (type of elements in case of an array)
name – Name of buffer, including array suffix if the member is an array
alignment – Desired alignment within the struct