Function nvcvTensorGetShape
Defined in File Tensor.h
Function Documentation
-
NVCVStatus nvcvTensorGetShape(NVCVTensorHandle handle, int32_t *rank, int64_t *shape)
Retrieve the tensor shape.
- Parameters:
handle – [in] Tensor to be queried.
Must not be NULL.
Must have been created by nvcvTensorConstruct.
rank – [inout] Number of elements in output shape buffer. When function returns, it stores the actual tensor rank.. Set it to NVCV_TENSOR_MAX_RANK to return the full shape in @shape. Set it to 0 if only tensor’s rank must be returned.
shape – [out] Where the tensor shape will be written to. Must point to a buffer with
rank
elements. Elements above actual number of dimensions will be set to 1.If NULL,
rank
must be 0.
- Return values:
NVCV_ERROR_INVALID_ARGUMENT – Some parameter is outside its valid range.
NVCV_SUCCESS – Operation executed successfully.