Class DType
Defined in File dtype.hpp
-
class DType
This class represents a data type specified by a TypeId.
Public Functions
-
DType(TypeId tid)
Construct a DType for a given type specified by a TypeId.
- Parameters
tid – The TypeId to initialize the DType object with.
-
DType(const DType &dtype) = default
Copy constructor.
- Parameters
dtype – The DType object to copy from.
-
bool operator==(const DType &other) const
Equality operator.
-
size_t item_size() const
Get the number of bytes per item.
- Returns
The number of bytes per item.
-
std::string type_str() const
Get the numpy string representation of the DType object.
- Returns
The numpy string representation of the DType object.
-
std::string triton_str() const
Get the triton string representation of the DType object.
- Returns
The triton string representation of the DType object.
-
bool is_fully_supported() const
Check if the DType object is fully supported.
- Returns
True if the DType object is fully supported, false otherwise.
Public Static Functions
-
static DType from_cudf(cudf::type_id tid)
Create a DType object from a cudf type id.
- Parameters
id – The cudf type id.
- Returns
A DType object.
-
static DType from_numpy(const std::string &numpy_str)
Create a DType object from a numpy type string.
- Parameters
type_str – The numpy type string.
- Returns
A DType object.
-
static DType from_triton(const std::string &type_str)
Create a DType object from a triton type string.
- Parameters
type_str – The triton type string.
- Returns
A DType object.
-
template<typename T>
static inline DType create() Construct a DType object from a C++ type.
- Returns
A DType object.
-
DType(TypeId tid)