Class TensorDataStridedCuda

Inheritance Relationships

Base Type

Class Documentation

class TensorDataStridedCuda : public nvcv::TensorDataStrided

Represents strided tensor data specifically for CUDA.

The TensorDataStridedCuda class extends TensorDataStrided to handle tensor data stored in a strided manner on CUDA devices. It provides methods specific to CUDA strided tensor data.

Public Types

using Buffer = NVCVTensorBufferStrided

Public Functions

inline TensorDataStridedCuda(const NVCVTensorData &data)

Constructs a TensorDataStridedCuda object from an NVCVTensorData instance.

Parameters:

data – The underlying tensor data representation.

inline TensorDataStridedCuda(const TensorShape &tshape, const DataType &dtype, const Buffer &buffer)

Constructs a TensorDataStridedCuda object from tensor shape, data type, and buffer.

Parameters:
  • tshapeShape of the tensor.

  • dtype – Data type of the tensor elements.

  • buffer – The underlying strided buffer for CUDA.

Public Static Functions

static inline bool IsCompatibleKind(NVCVTensorBufferType kind)

Determines if a given tensor buffer type is compatible with CUDA strided data.

Parameters:

kind – The tensor buffer type to check.

Returns:

true if the buffer type is compatible with CUDA strided data, false otherwise.