Each channel in mirheo::DataManager can have one of the types listed in the following xmacro:


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>
struct DataTypeWrapper

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.


std::string mirheo::typeDescriptorToString(const TypeDescriptor &desc)

Convert a TypeDescriptor variant to the string that represents the type.

The string that correspond to the type (e.g. int gives “int”)

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.
a variant that contains the DataTypeWrapper with the correct type.
  • str: The string representation of the type (e.g. “int” for int)