Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Epetra_Distributor.h
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ************************************************************************
4 //
5 // Epetra: Linear Algebra Services Package
6 // Copyright 2011 Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ************************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_DISTRIBUTOR_H
45 #define EPETRA_DISTRIBUTOR_H
46 
48 
60 #include "Epetra_Object.h"
62 
63  public:
65 
66  virtual Epetra_Distributor * Clone() = 0;
68 
70 
73  virtual Epetra_Distributor * ReverseClone() =0;
74 
76  virtual ~Epetra_Distributor(){};
77 
79 
80 
82 
83 
95  virtual int CreateFromSends( const int & NumExportIDs,
96  const int * ExportPIDs,
97  bool Deterministic,
98  int & NumRemoteIDs ) = 0;
99 
101 
116  virtual int CreateFromRecvs( const int & NumRemoteIDs,
117  const int * RemoteGIDs,
118  const int * RemotePIDs,
119  bool Deterministic,
120  int & NumExportIDs,
121  int *& ExportGIDs,
122  int *& ExportPIDs) = 0;
123 
124 #ifndef EPETRA_NO_64BIT_GLOBAL_INDICES
125  virtual int CreateFromRecvs( const int & NumRemoteIDs,
126  const long long * RemoteGIDs,
127  const int * RemotePIDs,
128  bool Deterministic,
129  int & NumExportIDs,
130  long long *& ExportGIDs,
131  int *& ExportPIDs) = 0;
132 #endif
133 
134 
136 
137 
139  virtual int Do( char * export_objs,
140  int obj_size,
141  int & len_import_objs,
142  char *& import_objs) = 0;
143 
145  virtual int DoReverse( char * export_objs,
146  int obj_size,
147  int & len_import_objs,
148  char *& import_objs ) = 0;
149 
151  virtual int DoPosts( char * export_objs,
152  int obj_size,
153  int & len_import_objs,
154  char *& import_objs ) = 0;
155 
157  virtual int DoWaits() = 0;
158 
160  virtual int DoReversePosts( char * export_objs,
161  int obj_size,
162  int & len_import_objs,
163  char *& import_objs) = 0;
164 
166  virtual int DoReverseWaits() = 0;
168 
170 
171 
173  virtual int Do( char * export_objs,
174  int obj_size,
175  int *& sizes,
176  int & len_import_objs,
177  char *& import_objs) = 0;
178 
180  virtual int DoReverse( char * export_objs,
181  int obj_size,
182  int *& sizes,
183  int & len_import_objs,
184  char *& import_objs) = 0;
185 
187  virtual int DoPosts( char * export_objs,
188  int obj_size,
189  int *& sizes,
190  int & len_import_objs,
191  char *& import_objs) = 0;
192 
194  virtual int DoReversePosts( char * export_objs,
195  int obj_size,
196  int *& sizes,
197  int & len_import_objs,
198  char *& import_objs) = 0;
200 
202 
203  virtual void Print(std::ostream & os) const = 0;
205 };
206 #endif /* EPETRA_DISTRIBUTOR_H */
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int DoReverse(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Execute reverse of plan on buffer of export objects in a single step.
virtual void Print(std::ostream &os) const =0
virtual int CreateFromSends(const int &NumExportIDs, const int *ExportPIDs, bool Deterministic, int &NumRemoteIDs)=0
Create Distributor object using list of process IDs to which we export.
virtual int DoReverseWaits()=0
Wait on a reverse set of posts.
virtual Epetra_Distributor * ReverseClone()=0
Create and extract the reverse version of the distributor.
virtual int DoWaits()=0
Wait on a set of posts.
virtual int Do(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Execute plan on buffer of export objects in a single step.
virtual int DoPosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Post buffer of export objects (can do other local work before executing Waits)
virtual ~Epetra_Distributor()
Epetra_Distributor Destructor.
virtual int DoReversePosts(char *export_objs, int obj_size, int &len_import_objs, char *&import_objs)=0
Do reverse post of buffer of export objects (can do other local work before executing Waits) ...
virtual int CreateFromRecvs(const int &NumRemoteIDs, const int *RemoteGIDs, const int *RemotePIDs, bool Deterministic, int &NumExportIDs, int *&ExportGIDs, int *&ExportPIDs)=0
Create Distributor object using list of Remote global IDs and corresponding PIDs. ...
virtual Epetra_Distributor * Clone()=0
Epetra_Distributor clone constructor.