mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
wrapper for mpi-gather to ngscore
This commit is contained in:
parent
a5acada9fc
commit
4bad16744b
@ -303,6 +303,24 @@ namespace ngcore
|
||||
&recv, 1, GetMPIType<T>(), 0, comm);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void GatherRoot (FlatArray<T> recv) const
|
||||
{
|
||||
recv[0] = T(0);
|
||||
if (size == 1) return;
|
||||
MPI_Gather (MPI_IN_PLACE, 1, GetMPIType<T>(),
|
||||
recv.Data(), 1, GetMPIType<T>(), 0, comm);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void Gather (T send) const
|
||||
{
|
||||
if (size == 1) return;
|
||||
MPI_Gather (&send, 1, GetMPIType<T>(),
|
||||
NULL, 1, GetMPIType<T>(), 0, comm);
|
||||
}
|
||||
|
||||
|
||||
template <typename T>
|
||||
void AllGather (T val, FlatArray<T> recv) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user