42 #include "Thyra_SpmdVectorSpaceUtilities.hpp"
43 #include "Teuchos_CommHelpers.hpp"
49 Ordinal SpmdVectorSpaceUtilities::computeMapCode(
53 using Teuchos::outArg;
62 const int procRank = comm.
getSize ();
64 Ordinal localCode = localSubDim % (procRank+1) + localSubDim;
65 reduceAll<Ordinal, Ordinal> (comm,
REDUCE_SUM, localCode, outArg (mapCode));
70 Ordinal SpmdVectorSpaceUtilities::computeLocalOffset(
74 using Teuchos::outArg;
79 const Ordinal _localOffset = localSubDim;
80 scan<Ordinal, Ordinal> (comm,
REDUCE_SUM, _localOffset, outArg (localOffset));
81 localOffset -= localSubDim;
86 Ordinal SpmdVectorSpaceUtilities::computeGlobalDim(
90 using Teuchos::outArg;
95 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. `*.
TEUCHOS_DEPRECATED void scan(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *scanReduct)
TEUCHOS_DEPRECATED void reduceAll(const Comm< Ordinal > &comm, const EReductionType reductType, const Packet &send, Packet *globalReduct)