10 #include "Thyra_SpmdVectorSpaceUtilities.hpp"
11 #include "Teuchos_CommHelpers.hpp"
17 Ordinal SpmdVectorSpaceUtilities::computeMapCode(
21 using Teuchos::outArg;
23 using Teuchos::reduceAll;
30 const int procRank = comm.
getSize ();
32 Ordinal localCode = localSubDim % (procRank+1) + localSubDim;
33 reduceAll<Ordinal, Ordinal> (comm,
REDUCE_SUM, localCode, outArg (mapCode));
38 Ordinal SpmdVectorSpaceUtilities::computeLocalOffset(
42 using Teuchos::outArg;
47 const Ordinal _localOffset = localSubDim;
48 scan<Ordinal, Ordinal> (comm,
REDUCE_SUM, _localOffset, outArg (localOffset));
49 localOffset -= localSubDim;
54 Ordinal SpmdVectorSpaceUtilities::computeGlobalDim(
58 using Teuchos::outArg;
60 using Teuchos::reduceAll;
63 reduceAll<Ordinal, Ordinal> (comm,
REDUCE_SUM, localSubDim, outArg (globalDim));
virtual int getSize() const =0
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.