|
VPI - Vision Programming Interface
0.1.0 Release
|
Go to the documentation of this file.
56 #ifndef NV_VPI_ARRAY_H
57 #define NV_VPI_ARRAY_H
103 #define VPI_ARRAY_NO_PVA 0x01
104 #define VPI_ARRAY_NO_CPU 0x02
105 #define VPI_ARRAY_NO_CUDA 0x04
110 #define VPI_ARRAY_ONLY_CUDA (VPI_ARRAY_NO_PVA | VPI_ARRAY_NO_CPU)
111 #define VPI_ARRAY_ONLY_CPU (VPI_ARRAY_NO_PVA | VPI_ARRAY_NO_CUDA)
112 #define VPI_ARRAY_ONLY_PVA (VPI_ARRAY_NO_CUDA | VPI_ARRAY_NO_CPU)
116 typedef struct VPIArrayDataRec
275 #endif // NV_VPI_ARRAY_H
void vpiArrayDestroy(VPIArray array)
Destroy an array instance as well as all resources it owns.
VPIStatus vpiArrayCreate(uint32_t capacity, VPIArrayType fmt, uint32_t flags, VPIArray *array)
Create an empty array instance with the specified flags.
VPIStatus vpiArrayGetType(VPIArray array, VPIArrayType *type)
Get the array type.
VPIArrayType type
Type of each array element.
VPIStatus vpiArraySetSize(VPIArray array, uint32_t size)
Set the array size in elements.
VPIStatus vpiArrayUnlock(VPIArray array)
Releases the lock on array object.
VPIStatus vpiArrayGetSize(VPIArray array, uint32_t *size)
Get the array size in elements.
VPIStatus vpiArrayGetFlags(VPIArray array, uint32_t *flags)
Get the array flags.
uint32_t size
Number of elements in the array.
VPIStatus vpiArrayWrapHostMem(const VPIArrayData *arrayData, uint32_t flags, VPIArray *array)
Create an array object by wrapping around an existing host-memory block.
uint32_t capacity
Maximum number of elements that the array can hold.
void * data
Points to the first element of the array.
VPIArrayType
Array element formats.
Stores information about array characteristics and content.
VPIStatus vpiArrayWrapCudaDeviceMem(const VPIArrayData *arrayData, uint32_t flags, VPIArray *array)
Create an array object by wrapping around an existing device-memory (CUDA) block.
VPILockMode
Defines the lock modes used by memory lock functions.
VPIStatus vpiArrayLock(VPIArray array, VPILockMode mode, VPIArrayData *arrayData)
Acquires the lock on array object and returns a pointer to array data.
VPIStatus vpiArrayGetStride(VPIArray array, uint32_t *stride)
Get the array stride (distance between two consecutive elements) in bytes.
struct VPIArrayImpl * VPIArray
VPIStatus vpiArrayInvalidate(VPIArray array)
This method is useful for unmanaged arrays only (created with 'vpiArrayWrap*`).
VPIStatus vpiArrayGetCapacity(VPIArray array, uint32_t *capacity)
Get the array capacity in elements.
uint32_t stride
Size in bytes of each array element.