Stack
- group Stack
Functions
-
NVCVStatus cvcudaStackCreate(NVCVOperatorHandle *handle)
Constructs and an instance of the Stack operator.
- Parameters:
handle – [out] Where the image instance handle will be written to.
Must not be NULL.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Handle is null.
NVCV_ERROR_OUT_OF_MEMORY – Not enough memory to create the operator.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaStackSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVTensorBatchHandle in, NVCVTensorHandle out)
Executes the Stack operation on the given cuda stream. This operation does not wait for completion. The stack operation copies source tensors from into an output tensor. The output tensor is a concatenation of the source tensors, with each source tensor copied into the output tensor. All of the source tensors must have the same data type and number of channels width and height.
Limitations:
Input: Data Layout: [kNHWC, kNCHW, kCHW, kHWC] Channels: [1,2,3,4]
Data Type
Allowed
8bit Unsigned
Yes
8bit Signed
Yes
16bit Unsigned
Yes
16bit Signed
Yes
32bit Unsigned
Yes
32bit Signed
Yes
16bit Float
Yes
32bit Float
Yes
64bit Float
Yes
Output: Data Layout: [kNHWC, kNCHW] Channels: [1,2,3,4]
Data Type
Allowed
8bit Unsigned
Yes
8bit Signed
Yes
16bit Unsigned
Yes
16bit Signed
Yes
32bit Unsigned
Yes
32bit Signed
Yes
16bit Float
Yes
32bit Float
Yes
64bit Float
Yes
Input/Output dependency
Property | Input == Output -------------- | ------------- Data Layout | Yes Data Type | Yes Number | No Channels | Yes Width | Yes Height | Yes
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid CUDA stream.
in – [in] input tensors batch.
out – [out] output tensor in NHWC or NCHW layout, where N is equal to the total number of samples across all input tensors.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaStackVarShapeSubmit(NVCVOperatorHandle handle, cudaStream_t stream, NVCVImageBatchHandle in, NVCVTensorHandle out)
Executes the Stack operation on the given cuda stream using a variable shape image batch as input. This operation does not wait for completion. The stack operation copies source images into an output tensor. The output tensor is a concatenation of the source images. All of the source images must have the same format (data type and number of channels) and dimensions (width and height).
- Parameters:
handle – [in] Handle to the operator.
Must not be NULL.
stream – [in] Handle to a valid CUDA stream.
in – [in] input varshape image batch.
out – [out] output tensor NHWC/NCHW where N is equal to the number of input images.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside valid range.
NVCV_ERROR_INTERNAL – Internal error in the operator, invalid types passed in.
NVCV_SUCCESS – Operation executed successfully.
-
NVCVStatus cvcudaStackCreate(NVCVOperatorHandle *handle)