Declaration of functions for CUDA interoperability. More...
Functions | |
VPIStatus | vpiArrayWrapCudaDeviceMem (const VPIArrayData *arrayData, uint32_t flags, VPIArray *array) |
Create an array object by wrapping around an existing device-memory (CUDA) block. More... | |
VPIStatus | vpiImageWrapCudaDeviceMem (const VPIImageData *cudaData, uint32_t flags, VPIImage *img) |
Create an image object by wrapping around an existing device-memory (CUDA) block. More... | |
Declaration of functions for CUDA interoperability.
The provided methods allows wrapping CUDA objects external to VPI. They can then be used efficiently in VPI compute pipelines.
VPIStatus vpiArrayWrapCudaDeviceMem | ( | const VPIArrayData * | arrayData, |
uint32_t | flags, | ||
VPIArray * | array | ||
) |
#include <vpi/Array.h>
Create an array object by wrapping around an existing device-memory (CUDA) block.
Stride between elements has to be at least as large as the element structure size. It also has to respect alignment requirements of the element data structure.
arrayData | [in] data |
flags | [in] flags |
array | [out] pointer to an array handle |
VPIStatus vpiImageWrapCudaDeviceMem | ( | const VPIImageData * | cudaData, |
uint32_t | flags, | ||
VPIImage * | img | ||
) |
#include <vpi/Image.h>
Create an image object by wrapping around an existing device-memory (CUDA) block.
Only pitch-linear format is supported. The underlying image object does not own/claim the memory block.
cudaData | [in] Pointer to structure with cuda memory to be wrapped. |
flags | [in] flags |
img | [out] pointer to an image handle |