mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: bundle Pstream:: AllGather methods
- bundles frequently used 'gather/scatter' patterns more consistently. - combineAllGather -> combineGather + broadcast - listCombineAllGather -> listCombineGather + broadcast - mapCombineAllGather -> mapCombineGather + broadcast - allGatherList -> gatherList + scatterList - reduce -> gather + broadcast (ie, allreduce) - The allGatherList currently wraps gatherList/scatterList, but may be replaced with a different algorithm in the future. STYLE: PstreamCombineReduceOps.H is mostly unneeded now
This commit is contained in:
@ -223,7 +223,7 @@ bool writeOptionalMeshObject
|
||||
|
||||
// Make sure all know if there is a valid class name
|
||||
wordList classNames(1, io.headerClassName());
|
||||
combineReduce(classNames, uniqueEqOp<word>());
|
||||
Pstream::combineAllGather(classNames, uniqueEqOp<word>());
|
||||
|
||||
// Check for correct type
|
||||
if (classNames[0] == T::typeName)
|
||||
@ -422,7 +422,7 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
|
||||
combineReduce(lagrangianDirs, uniqueEqOp<fileName>());
|
||||
Pstream::combineAllGather(lagrangianDirs, uniqueEqOp<fileName>());
|
||||
|
||||
if (!lagrangianDirs.empty())
|
||||
{
|
||||
@ -459,7 +459,7 @@ int main(int argc, char *argv[])
|
||||
)
|
||||
);
|
||||
|
||||
combineReduce(cloudDirs, uniqueEqOp<fileName>());
|
||||
Pstream::combineAllGather(cloudDirs, uniqueEqOp<fileName>());
|
||||
|
||||
forAll(cloudDirs, i)
|
||||
{
|
||||
@ -485,7 +485,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
// Combine with all other cloud objects
|
||||
combineReduce(cloudFields, uniqueEqOp<word>());
|
||||
Pstream::combineAllGather(cloudFields, uniqueEqOp<word>());
|
||||
|
||||
for (const word& name : cloudFields)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user