In https://github.com/fmihpc/dccrg/issues/6 the final datatype cannot be cached by cells but when transferring one cell at a time that is possible. Whether each cells datatype should be cached by dccrg instead of cells themselves remains to be seen. If dccrg would cache the datatype I guess the API would be to call bool reuse_datatype(...) of each cell to decide whether to call that cell's get_mpi_datatype(...). If reuse_datatype() doesn't exist then always call get_mpi_datatype() of every cell.
In https://github.com/fmihpc/dccrg/issues/6 the final datatype cannot be cached by cells but when transferring one cell at a time that is possible. Whether each cells datatype should be cached by dccrg instead of cells themselves remains to be seen. If dccrg would cache the datatype I guess the API would be to call
bool reuse_datatype(...)
of each cell to decide whether to call that cell'sget_mpi_datatype(...)
. Ifreuse_datatype()
doesn't exist then always callget_mpi_datatype()
of every cell.