44 #ifndef EPETRA_SERIALCOMM_H
45 #define EPETRA_SERIALCOMM_H
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
59 #ifdef EPETRA_HAVE_OMP
125 int Broadcast(
double * MyVals,
int Count,
int Root)
const;
139 int Broadcast(
int * MyVals,
int Count,
int Root)
const;
153 int Broadcast(
long * MyVals,
int Count,
int Root)
const;
167 int Broadcast(
long long * MyVals,
int Count,
int Root)
const;
181 int Broadcast(
char * MyVals,
int Count,
int Root)
const;
196 int GatherAll(
double * MyVals,
double * AllVals,
int Count)
const;
208 int GatherAll(
int * MyVals,
int * AllVals,
int Count)
const;
220 int GatherAll(
long * MyVals,
long * AllVals,
int Count)
const;
232 int GatherAll(
long long * MyVals,
long long * AllVals,
int Count)
const;
248 int SumAll(
double * PartialSums,
double * GlobalSums,
int Count)
const;
260 int SumAll(
int * PartialSums,
int * GlobalSums,
int Count)
const;
272 int SumAll(
long * PartialSums,
long * GlobalSums,
int Count)
const;
284 int SumAll(
long long * PartialSums,
long long * GlobalSums,
int Count)
const;
299 int MaxAll(
double * PartialMaxs,
double * GlobalMaxs,
int Count)
const;
311 int MaxAll(
int * PartialMaxs,
int * GlobalMaxs,
int Count)
const;
323 int MaxAll(
long * PartialMaxs,
long * GlobalMaxs,
int Count)
const;
335 int MaxAll(
long long * PartialMaxs,
long long * GlobalMaxs,
int Count)
const;
347 int MinAll(
double * PartialMins,
double * GlobalMins,
int Count)
const;
359 int MinAll(
int * PartialMins,
int * GlobalMins,
int Count)
const;
371 int MinAll(
long * PartialMins,
long * GlobalMins,
int Count)
const;
383 int MinAll(
long long * PartialMins,
long long * GlobalMins,
int Count)
const;
397 int ScanSum(
double * MyVals,
double * ScanSums,
int Count)
const;
408 int ScanSum(
int * MyVals,
int * ScanSums,
int Count)
const;
419 int ScanSum(
long * MyVals,
long * ScanSums,
int Count)
const;
430 int ScanSum(
long long * MyVals,
long long * ScanSums,
int Count)
const;
440 int MyPID()
const {
return(SerialCommData_->MyPID_);};
443 int NumProc()
const {
return(SerialCommData_->NumProc_);};
453 #ifdef CreateDirectory
454 #undef CreateDirectory
461 inline void Print(std::ostream & os)
const {
463 #ifdef EPETRA_HAVE_OMP
466 int numThreads = omp_get_num_threads();
467 int threadNum = omp_get_thread_num();
469 os <<
"::Processor "<<
MyPID()<<
" of " <<
NumProc() <<
" total processors.";
471 os <<
"\n Thread " << threadNum <<
" of " << numThreads <<
" total threads.";
474 os <<
"::Processor "<<
MyPID()<<
" of " <<
NumProc() <<
" total processors.";
491 int ReferenceCount()
const;
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
Epetra_Distributor: The Epetra Gather/Scatter Setup Base Class.
virtual int GatherAll(double *MyVals, double *AllVals, int Count) const =0
Epetra_Comm All Gather function.
virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap &Map) const =0
Create a directory object for the given Epetra_BlockMap.
void PrintInfo(std::ostream &os) const
Print method that implements Epetra_Comm virtual PrintInfo method.
int MyPID() const
Return my process ID.
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
Epetra_Comm Global Min function.
virtual void Barrier() const =0
Epetra_Comm Barrier function.
Epetra_Comm * Clone() const
Clone method.
virtual int MyPID() const =0
Return my process ID.
const Epetra_SerialCommData * DataPtr() const
Returns a pointer to the SerialCommData instance this SerialComm uses.
virtual int MaxAll(double *PartialMaxs, double *GlobalMaxs, int Count) const =0
Epetra_Comm Global Max function.
virtual int SumAll(double *PartialSums, double *GlobalSums, int Count) const =0
Epetra_Comm Global Sum function.
Epetra_Directory: This class is a pure virtual class whose interface allows Epetra_Map and Epetr_Bloc...
Epetra_SerialCommData: The Epetra Serial Communication Data Class.
Epetra_Comm: The Epetra Communication Abstract Base Class.
Epetra_Object & operator=(const Epetra_Object &src)
Epetra_Object: The base Epetra class.
Epetra_BlockMap: A class for partitioning block element vectors and matrices.
int NumProc() const
Returns total number of processes (always returns 1 for SerialComm).
virtual int Broadcast(double *MyVals, int Count, int Root) const =0
Epetra_Comm Broadcast function.
Epetra_SerialComm: The Epetra Serial Communication Class.
Epetra_SerialCommData * SerialCommData_
virtual int NumProc() const =0
Returns total number of processes.
void Print(std::ostream &os) const
Print method that implements Epetra_Object virtual Print method.
virtual Epetra_Distributor * CreateDistributor() const =0
Create a distributor object.
virtual int ScanSum(double *MyVals, double *ScanSums, int Count) const =0
Epetra_Comm Scan Sum function.