Function nvcvAllocatorAllocCudaMemory
Defined in File Allocator.h
Function Documentation
-
NVCVStatus nvcvAllocatorAllocCudaMemory(NVCVAllocatorHandle halloc, void **ptr, int64_t sizeBytes, int32_t alignBytes)
Allocates a memory buffer of cuda-accessible memory.
It’s usually used when implementing operators.
- Parameters:
halloc – [in] Handle to the resource allocator object to be used.
Must have been created by nvcvAllocatorCreate.
ptr – [out] Holds a pointer to the allocated buffer.
Cannot be NULL.
sizeBytes – [in] How many bytes to allocate.
Must be >= 0.
Must be an integral multiple of
alignBytes
.
alignBytes – [in] Address alignment in bytes. The returned address will be multiple of this value.
Must a power of 2.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside its valid range.
NVCV_ERROR_OUT_OF_MEMORY – Not enough free memory.
NVCV_SUCCESS – Operation completed successfully.