- when combining lists in processor order this simplifies code and reduces memory overhead. Write this: ---- labelList collected; const globalIndex sizing(input.size()); sizing.gather(input, collected); ---- OR ---- labelList collected; globalIndex::gatherOp(input, collected); ---- Instead of this: ---- labelList collected; List<labelList> scratch(Pstream::nProcs()); scratch[Pstream::myProcNo()] = input; Pstream::gatherList(scratch); if (Pstream::master()) { collected = ListListOps::combine<labelList> ( scratch, accessOp<labelList>() ); } scratch.clear(); ---- |
||
---|---|---|
.. | ||
advanced | ||
conversion | ||
doc | ||
generation | ||
manipulation |