How to add new type support
Things to know
- Hpt has vector and scalar implementation. To support new type, you will need to go to
hpt-types
crate.
How
- Go to
hpt-types/src/dtype.rs
. - Implement
TypeCommon
for new type, implement CudaType
for new type if the new type is supported in cuda - Add Dtype variant for the
Dtype
enum. - Go to
hpt-types/src/scalars/
, based on the existing implementation for primitive type, implement the traits for new type. - Go to
hpt-types/src/vectors/
, based on the existing implementation for primitive type, implement the traits for new type. - Go to
hpt-types/src/convertion.rs
, add type conversion for the new type, add to_new_type
method in traits. - Go to
hpt-types/src/promotion/
, add type promotion for new type.