Class TensorBatchData

Inheritance Relationships

Derived Type

Class Documentation

class TensorBatchData

General type represenitng data of any tensor batch.

Subclassed by nvcv::TensorBatchDataStrided

Public Functions

inline TensorBatchData(const NVCVTensorBatchData &data)
inline int rank() const

Return rank of the tensors in the batch.

inline TensorLayout layout() const

Return the layout of the tensors in the batch.

inline DataType dtype() const

Return the data type of the tensors in the batch.

inline int32_t numTensors() const

Return the number of the tensors in the batch.

inline NVCVTensorBatchData cdata() const

Return underlying C struct representing the tensor batch data.

template<typename Derived>
inline Optional<Derived> cast() const

Cast the tensor batch data to a derived type (e.g. TensorBatchDataStridedCuda)

Template Parameters:

Derived – target type

template<typename Derived>
inline bool IsCompatible() const

Checks if data can be casted to a given derived type.

Template Parameters:

Derived – tested type

Public Static Functions

static inline constexpr bool IsCompatibleKind(NVCVTensorBufferType kind)

Protected Functions

TensorBatchData() = default
inline NVCVTensorBatchData &data()