Class DType#
Defined in File dtype.hpp
Class Documentation#
-
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.
-
TypeId type_id() const#
Get the TypeId of the DType object.
- Returns:
The TypeId of the DType object.
-
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.
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.
-
DType(TypeId tid)#