40 #ifndef TPETRA_DETAILS_DISTRIBUTOR_PLAN_HPP
41 #define TPETRA_DETAILS_DISTRIBUTOR_PLAN_HPP
43 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
44 #include "Teuchos_Array.hpp"
45 #include "Teuchos_Comm.hpp"
46 #include "Teuchos_RCP.hpp"
52 const bool barrierBetween_default =
false;
53 const bool useDistinctTags_default =
true;
79 DISTRIBUTOR_NOT_INITIALIZED,
80 DISTRIBUTOR_INITIALIZED_BY_CREATE_FROM_SENDS,
81 DISTRIBUTOR_INITIALIZED_BY_CREATE_FROM_RECVS,
82 DISTRIBUTOR_INITIALIZED_BY_CREATE_FROM_SENDS_N_RECVS,
83 DISTRIBUTOR_INITIALIZED_BY_REVERSE,
84 DISTRIBUTOR_INITIALIZED_BY_COPY,
118 int getTag(
const int pathTag)
const;
120 size_t createFromSends(
const Teuchos::ArrayView<const int>& exportProcIDs);
121 void createFromRecvs(
const Teuchos::ArrayView<const int>& remoteProcIDs);
122 void createFromSendsAndRecvs(
const Teuchos::ArrayView<const int>& exportProcIDs,
123 const Teuchos::ArrayView<const int>& remoteProcIDs);
125 void setParameterList(
const Teuchos::RCP<Teuchos::ParameterList>& plist);
127 Teuchos::RCP<DistributorPlan> getReversePlan()
const;
129 Teuchos::RCP<const Teuchos::Comm<int>> getComm()
const {
return comm_; }
131 bool barrierBetweenRecvSend()
const {
return barrierBetweenRecvSend_; }
132 bool useDistinctTags()
const {
return useDistinctTags_; }
133 size_t getNumReceives()
const {
return numReceives_; }
134 size_t getNumSends()
const {
return numSendsToOtherProcs_; }
135 bool hasSelfMessage()
const {
return sendMessageToSelf_; }
136 size_t getMaxSendLength()
const {
return maxSendLength_; }
137 size_t getTotalReceiveLength()
const {
return totalReceiveLength_; }
138 Teuchos::ArrayView<const int> getProcsFrom()
const {
return procsFrom_; }
139 Teuchos::ArrayView<const int> getProcsTo()
const {
return procIdsToSendTo_; }
140 Teuchos::ArrayView<const size_t> getLengthsFrom()
const {
return lengthsFrom_; }
141 Teuchos::ArrayView<const size_t> getLengthsTo()
const {
return lengthsTo_; }
142 Teuchos::ArrayView<const size_t> getStartsTo()
const {
return startsTo_; }
143 Teuchos::ArrayView<const size_t> getIndicesTo()
const {
return indicesTo_; }
147 Teuchos::RCP<const Teuchos::ParameterList> getValidParameters()
const;
149 void createReversePlan()
const;
161 void computeReceives();
163 Teuchos::RCP<const Teuchos::Comm<int>> comm_;
165 mutable Teuchos::RCP<DistributorPlan> reversePlan_;
170 bool barrierBetweenRecvSend_;
183 bool useDistinctTags_;
186 bool sendMessageToSelf_;
187 size_t numSendsToOtherProcs_;
188 Teuchos::Array<int> procIdsToSendTo_;
198 Teuchos::Array<size_t> startsTo_;
205 Teuchos::Array<size_t> lengthsTo_;
210 size_t maxSendLength_;
227 Teuchos::Array<size_t> indicesTo_;
246 size_t totalReceiveLength_;
253 Teuchos::Array<size_t> lengthsFrom_;
260 Teuchos::Array<int> procsFrom_;
267 Teuchos::Array<size_t> startsFrom_;
274 Teuchos::Array<size_t> indicesFrom_;
int getTag(const int pathTag) const
Implementation details of Tpetra.
std::string DistributorSendTypeEnumToString(EDistributorSendType sendType)
Convert an EDistributorSendType enum value to a string.
EDistributorSendType
The type of MPI send that Distributor should use.
EDistributorHowInitialized
Enum indicating how and whether a Distributor was initialized.
std::string DistributorHowInitializedEnumToString(EDistributorHowInitialized how)
Convert an EDistributorHowInitialized enum value to a string.
Namespace Tpetra contains the class and methods constituting the Tpetra library.