Types¶
Each channel in mirheo::DataManager
can have one of the types listed in the following xmacro:
-
MIRHEO_TYPE_TABLE__
(OP, SEP)¶ xmacro that contains the list of type available for data channels.
Must contain POd structures that are compatible with device code.
Host variants¶
-
template <class T>
structDataTypeWrapper
¶ A simple structure to store a c type.
This is useful with a variant and visitor pattern.
- Template Parameters
T
: The type to wrap
The mirheo::TypeDescriptor
variant contains a type of mirheo::DataTypeWrapper
that is in the type list.
Device variants¶
The mirheo::CudaVarPtr
variant contains a pointer of a type that is in the type list.
Utils¶
-
std::string
mirheo
::
typeDescriptorToString
(const TypeDescriptor &desc)¶ Convert a TypeDescriptor variant to the string that represents the type.
- Return
- The string that correspond to the type (e.g. int gives “int”)
- Parameters
desc
: The variant of DataTypeWrapper
-
TypeDescriptor
mirheo
::
stringToTypeDescriptor
(const std::string &str)¶ reverse operation of typeDescriptorToString().
This method will die if
str
does not correspond to any type in the type list.- Return
- a variant that contains the DataTypeWrapper with the correct type.
- Parameters
str
: The string representation of the type (e.g. “int” for int)