Template Function combigrid::CombiCom::getReductionDatatypes

Function Documentation

template<typename FG_ELEMENT, typename SubspaceIndexContainer>
std::vector<std::pair<typename AnyDistributedSparseGrid::SubspaceIndexType, MPI_Datatype>> combigrid::CombiCom::getReductionDatatypes(const DistributedSparseGridUniform<FG_ELEMENT> &dsg, const SubspaceIndexContainer &subspaces, uint32_t maxMiBToSendPerThread)

get the reduction datatypes for a DistributedSparseGridUniform

the datatypes will cover all sparse grid subspaces in subspaces

Template Parameters:
  • FG_ELEMENT – the type of the elements in the sparse grid

  • SubspaceIndexContainer – a container of subspace indices

Parameters:
  • dsg – the DistributedSparseGrid

  • subspaces – the container of subspace indices

  • maxMiBToSendPerThread – the maximum number of MiB to send per OpenMP thread (~= per core) at once

Returns:

a vector of pairs of the start index of the subspace and the MPI datatype for the reduction