56 #ifndef NV_VPI_ARRAY_H
57 #define NV_VPI_ARRAY_H
155 typedef struct VPIArrayBufferRec
167 typedef struct VPIArrayDataRec
Declaration of VPI status codes handling functions.
Defines all types needed for programming with VPI.
VPIArrayBufferType bufferType
Type of array buffer.
void * data
Points to the first element of the array.
VPIArrayBuffer buffer
Stores the array contents.
int32_t * sizePointer
Points to the number of elements in the array.
VPIArrayBufferAOS aos
Array stored in array-of-structures layout.
int32_t capacity
Maximum number of elements that the array can hold.
int32_t strideBytes
Size in bytes of each array element.
VPIArrayType type
Type of each array element.
VPIStatus vpiArraySetSize(VPIArray array, int32_t size)
Set the array size in elements.
VPIStatus vpiArrayUnlock(VPIArray array)
Releases the lock on array object.
VPIStatus vpiArrayGetFlags(VPIArray array, uint64_t *flags)
Returns the array flags.
VPIStatus vpiArrayLockData(VPIArray array, VPILockMode mode, VPIArrayBufferType bufType, VPIArrayData *data)
Acquires the lock on an array object and returns the array contents.
VPIStatus vpiArrayCreateWrapper(const VPIArrayData *data, uint64_t flags, VPIArray *array)
Create an array object by wrapping an existing host memory block.
void vpiArrayDestroy(VPIArray array)
Destroy an array instance.
VPIStatus vpiArrayGetStrideBytes(VPIArray array, int32_t *strideBytes)
Returns the array stride (distance between two consecutive elements) in bytes.
VPIArrayType
Array element formats.
VPIStatus vpiArrayGetType(VPIArray array, VPIArrayType *type)
Returns the array type.
VPIStatus vpiArrayGetSize(VPIArray array, int32_t *size)
Returns the array size in elements.
VPIStatus vpiArrayCreate(int32_t capacity, VPIArrayType type, uint64_t flags, VPIArray *array)
Create an empty array instance.
VPIStatus vpiArrayLock(VPIArray array, VPILockMode mode)
Acquires the lock on an array object.
VPIStatus vpiArraySetWrapper(VPIArray array, const VPIArrayData *data)
Redefines the wrapped memory buffer in an existing VPIArray wrapper.
VPIArrayBufferType
Represents how the array data is stored.
struct VPIArrayImpl * VPIArray
A handle to an array.
VPIStatus vpiArrayGetCapacity(VPIArray array, int32_t *capacity)
Returns the array capacity in elements.
@ VPI_ARRAY_BUFFER_INVALID
Invalid buffer type.
@ VPI_ARRAY_BUFFER_HOST_AOS
Host-accessible array-of-structures.
@ VPI_ARRAY_BUFFER_CUDA_AOS
CUDA-accessible array-of-structures.
Represents the availablemethods to access array contents.
Stores information about array characteristics and content.
Stores information about array characteristics and contents.
VPILockMode
Defines the lock modes used by memory lock functions.