Data types
- group NVCV_CPP_CORE_DATATYPE
Defines types and functions to handle data types.
This class represents the data type of an element in a tensor or array. This includes the kind of data (e.g., floating point, integer), the packing of multiple channels (e.g., RGB), and additional meta-information.
Functions
-
constexpr DataType()
Default constructor. Initializes to a default data type.
-
explicit constexpr DataType(NVCVDataType type)
Construct from a native data type.
- Parameters:
type – The native data type.
-
inline DataType(DataKind dataKind, Packing packing)
Construct from a data kind and packing.
- Parameters:
dataKind – The kind of data (e.g., floating point, integer).
packing – The packing of the data (e.g., channel ordering).
-
static constexpr DataType ConstCreate(DataKind dataKind, Packing packing)
Construct a constant data type from a data kind and packing.
- Parameters:
dataKind – The kind of data.
packing – The packing of the data.
- Returns:
The constructed data type.
-
constexpr operator NVCVDataType() const
Implicit conversion to the native data type.
- Returns:
The native data type.
-
class DataType
- #include <DataType.hpp>
-
constexpr DataType()