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:
@ -39,7 +39,7 @@ Description
|
||||
#include "List.H"
|
||||
#include "ListOps.H"
|
||||
#include "ops.H"
|
||||
#include "PstreamCombineReduceOps.H"
|
||||
#include "Pstream.H"
|
||||
#include <functional>
|
||||
|
||||
using namespace Foam;
|
||||
@ -138,8 +138,8 @@ int main()
|
||||
maxFirstEqOp<label>()(maxIndexed, item);
|
||||
}
|
||||
|
||||
Foam::combineReduce(minIndexed, minFirstEqOp<label>());
|
||||
Foam::combineReduce(maxIndexed, maxFirstEqOp<label>());
|
||||
Pstream::combineAllGather(minIndexed, minFirstEqOp<label>());
|
||||
Pstream::combineAllGather(maxIndexed, maxFirstEqOp<label>());
|
||||
|
||||
Info<< "Min indexed: " << minIndexed << nl
|
||||
<< "Max indexed: " << maxIndexed << nl;
|
||||
@ -156,8 +156,8 @@ int main()
|
||||
maxIndexed = maxFirstOp<label>()(maxIndexed, item);
|
||||
}
|
||||
|
||||
Foam::combineReduce(minIndexed, minFirstEqOp<label>());
|
||||
Foam::combineReduce(maxIndexed, maxFirstEqOp<label>());
|
||||
Pstream::combineAllGather(minIndexed, minFirstEqOp<label>());
|
||||
Pstream::combineAllGather(maxIndexed, maxFirstEqOp<label>());
|
||||
|
||||
Info<< "Min indexed: " << minIndexed << nl
|
||||
<< "Max indexed: " << maxIndexed << nl;
|
||||
|
||||
Reference in New Issue
Block a user