Function nvcvTensorCalcRequirementsForImages
Defined in File Tensor.h
Function Documentation
-
NVCVStatus nvcvTensorCalcRequirementsForImages(int32_t numImages, int32_t width, int32_t height, NVCVImageFormat format, int32_t baseAddrAlignment, int32_t rowAddrAlignment, NVCVTensorRequirements *reqs)
Calculates the resource requirements needed to create a tensor that holds N images.
- Parameters:
numImages – [in] Number of images in the tensor.
Must be >= 1.
width, height – [in] Dimensions of each image in the tensor.
Must be >= 1x1
format – [in] Format of the images in the tensor.
Must not be NVCV_IMAGE_FORMAT_NONE.
All planes in must have the same number of channels.
No subsampled planes are allowed.
baseAddrAlignment – [in] Alignment, in bytes, of the requested memory buffer. If 0, use a default suitable for optimized memory access. The used alignment is at least the given value.
If different from 0, it must be a power-of-two.
rowAddrAlignment – [in] Alignment, in bytes, of the start of each second-to-last dimension address. If 0, use a default suitable for optimized memory access. The used alignment is at least the given value. Pass 1 for creation of fully packed tensors, i.e., no padding between dimensions.
If different from 0, it must be a power-of-two.
reqs – [out] Where the tensor requirements will be written to.
Must not be NULL.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_SUCCESS – Operation executed successfully.