VPI - Vision Programming Interface

0.3.7 Release

CUDA Interoperability

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

Detailed Description

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.

Function Documentation

◆ vpiArrayWrapCudaDeviceMem()

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.

Parameters
arrayData[in] data
flags[in] flags
array[out] pointer to an array handle
Returns
an error code on failure else VPI_SUCCESS

◆ vpiImageWrapCudaDeviceMem()

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.

Parameters
cudaData[in] Pointer to structure with cuda memory to be wrapped.
flags[in] flags
img[out] pointer to an image handle
Returns
an error code on failure else VPI_SUCCESS