5 #include "Proto_DisjointBoxLayout.H" 7 #include "Proto_SPMD.H" 8 #include "Proto_LevelIterators.H" 9 #include <unordered_map> 11 #include "Proto_MayDay.H" 72 inline void define(OP a_op);
74 virtual void buildMotionPlans(OP& a_op) = 0;
77 inline bool operator==(
const Copier<OP>& a_rhs)
const;
78 inline void reverse();
79 inline void execute();
86 std::vector<MotionItem*> m_localMotionPlan;
87 std::vector<MotionItem*> m_fromMotionPlan;
88 std::vector<MotionItem*> m_toMotionPlan;
90 bool m_isDefined =
false;
99 void completePendingSends()
const;
100 void allocateBuffers();
101 void writeToSendBuffers();
102 void postSends()
const;
103 void readFromRecvBuffers();
104 void postRecvs()
const;
109 mutable size_t m_sendCapacity;
110 mutable size_t m_recvCapacity;
111 mutable void* m_sendBuffer;
112 mutable void* m_recvBuffer;
118 mutable std::vector<BufferEntry> m_fromMe;
119 mutable std::vector<BufferEntry> m_toMe;
120 mutable std::vector<std::vector<BufferEntry>> m_toMeUnpack;
122 mutable int m_numSends;
123 mutable int m_numRecvs;
126 mutable std::vector<MPI_Request> m_sendRequests, m_recvRequests;
127 mutable std::vector<MPI_Status> m_sendStatus, m_recvStatus;
142 inline bool operator<(
const BufferEntry& a_rhs)
const;
155 const Box& a_fromRegion,
156 const Box& a_toRegion);
158 inline bool operator==(
const MotionItem& a_rhs)
const;
159 inline bool operator<(
const MotionItem& a_rhs)
const;
165 inline bool operator()(
MotionItem*
const & a_lhs,
168 return ((*a_lhs) < (*a_rhs));
179 inline CopierIterator(
const std::vector<MotionItem*>* a_motionPlan);
181 inline const MotionItem& operator[](
size_t a_index)
const;
183 inline void operator++();
186 inline size_t size()
const;
190 const vector<MotionItem*>* m_motionPlan;
191 unsigned int m_current;
195 #include "implem/Proto_CopierImplem.H" 197 #endif //end include guard Definition: Proto_Copier.H:134
Point operator*(int a_scale, Point a_pt)
Premultiplication by scalar.
Definition: Proto_Point.H:426
Definition: Proto_Copier.H:175
Definition: Proto_Copier.H:145
An interval in DIM dimensional space.
Definition: Proto_Box.H:26
int procID()
local process ID
Definition: Proto_SPMD.H:52
Definition: Proto_Box.H:11
Definition: Proto_Copier.H:162
Definition: Proto_DataIndex.H:17
Abstract Generic Parallel Copier.
Definition: Proto_Copier.H:52