44 #ifndef EPETRA_MPIDISTRIBUTOR_H 45 #define EPETRA_MPIDISTRIBUTOR_H 105 const int * ExportPIDs,
107 int & NumRemoteIDs );
134 const int * RemoteGIDs,
135 const int * RemotePIDs,
141 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 143 const long long * RemoteGIDs,
144 const int * RemotePIDs,
147 long long *& ExportGIDs,
181 const int * ExportPIDs,
182 const int & NumRemoteIDs,
183 const int * RemoteGIDs,
184 const int * RemotePIDs,
187 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES 189 const int * ExportPIDs,
190 const int & NumRemoteIDs,
191 const long long * RemoteGIDs,
192 const int * RemotePIDs,
203 int Do(
char * export_objs,
205 int & len_import_objs,
206 char *& import_objs );
211 int & len_import_objs,
212 char *& import_objs );
215 int DoPosts(
char * export_objs,
217 int & len_import_objs,
218 char *& import_objs );
225 int & len_import_objs,
226 char *& import_objs );
236 int Do(
char * export_objs,
239 int & len_import_objs,
240 char *& import_objs );
246 int & len_import_objs,
247 char *& import_objs );
250 int DoPosts(
char * export_objs,
253 int & len_import_objs,
254 char *& import_objs);
260 int & len_import_objs,
261 char *& import_objs );
305 void Print(std::ostream & os)
const;
310 const int & NumExportIDs,
311 const int * ExportPIDs);
315 const int * RemotePIDs);
321 template<
typename id_type>
323 const id_type *& import_ids,
324 const int *& import_procs,
326 id_type *& export_ids,
333 int Sort_ints_(
int *vals,
int *other,
int nvals );
int CreateSendStructures_(int my_proc, int nprocs, const int &NumExportIDs, const int *ExportPIDs)
int ComputeSends_(int num_imports, const id_type *&import_ids, const int *&import_procs, int &num_exports, id_type *&export_ids, int *&export_procs, int my_proc)
int ComputeRecvs_(int my_proc, int nprocs)
Epetra_MpiDistributor & operator=(const Epetra_MpiDistributor &src)
int DoPosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Post buffer of export objects (can do other local work before executing Waits)
void CreateReverseDistributor()
int MaxSendLength() const
Maximum number of values that this proc is sending to another single proc.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
int CreateFromRecvs(const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, int *&ExportGIDs, int *&ExportPIDs)
Create a communication plan from receive list.
int DoReverseWaits()
Wait on a reverse set of posts.
int CreateFromSendsAndRecvs(const int &NumExportIDs, const int *ExportPIDs, const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic)
Create a communication plan from send list and a recv list.
const int * ProcsTo() const
A list of procs to which this proc is sending values.
MPI implementation of Epetra_Distributor.
Epetra_MpiComm: The Epetra MPI Communication Class.
int CreateRecvStructures_(const int &NumRemoteIDs, const int *RemotePIDs)
void GetLastDoStatistics(int &bytes_sent, int &bytes_recvd) const
Information on the last call to Do/DoReverse.
Epetra_Object: The base Epetra class.
virtual ~Epetra_MpiDistributor()
Destructor (declared virtual for memory safety).
int CreateFromSends(const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)
Create a communication plan from send list.
int DoWaits()
Wait on a set of posts.
int TotalReceiveLength() const
Total number of values that this proc is receiving from other procs.
int DoReversePosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Do reverse post of buffer of export objects (can do other local work before executing Waits) ...
Epetra_Distributor * ReverseClone()
Create and extract the reverse version of the distributor.
Epetra_Distributor * Clone()
Clone method.
int NumSends() const
The number of procs to which we will send data.
Epetra_MpiDistributor * comm_plan_reverse_
const int * LengthsFrom() const
Number of values we're receiving from each proc.
int Sort_ints_(int *vals, int *other, int nvals)
int Do(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Execute plan on buffer of export objects in a single step.
Epetra_MpiDistributor(const Epetra_MpiComm &Comm)
Default constructor.
int DoReverse(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)
Execute reverse of plan on buffer of export objects in a single step.
const Epetra_MpiComm * epComm_
int NumReceives() const
The number of procs from which we will receive data.
const int * LengthsTo() const
Number of values we're sending to each proc.
const int * ProcsFrom() const
A list of procs sending values to this proc.
void Print(std::ostream &os) const