44 #ifndef EPETRA_SERIALCOMM_H
45 #define EPETRA_SERIALCOMM_H
51 #ifdef EPETRA_HAVE_OMP
117 int Broadcast(
double * MyVals,
int Count,
int Root)
const;
131 int Broadcast(
int * MyVals,
int Count,
int Root)
const;
145 int Broadcast(
long * MyVals,
int Count,
int Root)
const;
159 int Broadcast(
long long * MyVals,
int Count,
int Root)
const;
173 int Broadcast(
char * MyVals,
int Count,
int Root)
const;
188 int GatherAll(
double * MyVals,
double * AllVals,
int Count)
const;
200 int GatherAll(
int * MyVals,
int * AllVals,
int Count)
const;
212 int GatherAll(
long * MyVals,
long * AllVals,
int Count)
const;
224 int GatherAll(
long long * MyVals,
long long * AllVals,
int Count)
const;
240 int SumAll(
double * PartialSums,
double * GlobalSums,
int Count)
const;
252 int SumAll(
int * PartialSums,
int * GlobalSums,
int Count)
const;
264 int SumAll(
long * PartialSums,
long * GlobalSums,
int Count)
const;
276 int SumAll(
long long * PartialSums,
long long * GlobalSums,
int Count)
const;
291 int MaxAll(
double * PartialMaxs,
double * GlobalMaxs,
int Count)
const;
303 int MaxAll(
int * PartialMaxs,
int * GlobalMaxs,
int Count)
const;
315 int MaxAll(
long * PartialMaxs,
long * GlobalMaxs,
int Count)
const;
327 int MaxAll(
long long * PartialMaxs,
long long * GlobalMaxs,
int Count)
const;
339 int MinAll(
double * PartialMins,
double * GlobalMins,
int Count)
const;
351 int MinAll(
int * PartialMins,
int * GlobalMins,
int Count)
const;
363 int MinAll(
long * PartialMins,
long * GlobalMins,
int Count)
const;
375 int MinAll(
long long * PartialMins,
long long * GlobalMins,
int Count)
const;
389 int ScanSum(
double * MyVals,
double * ScanSums,
int Count)
const;
400 int ScanSum(
int * MyVals,
int * ScanSums,
int Count)
const;
411 int ScanSum(
long * MyVals,
long * ScanSums,
int Count)
const;
422 int ScanSum(
long long * MyVals,
long long * ScanSums,
int Count)
const;
432 int MyPID()
const {
return(SerialCommData_->MyPID_);};
435 int NumProc()
const {
return(SerialCommData_->NumProc_);};
449 inline void Print(std::ostream & os)
const {
451 #ifdef EPETRA_HAVE_OMP
454 int numThreads = omp_get_num_threads();
455 int threadNum = omp_get_thread_num();
457 os <<
"::Processor "<<
MyPID()<<
" of " <<
NumProc() <<
" total processors.";
459 os <<
"\n Thread " << threadNum <<
" of " << numThreads <<
" total threads.";
462 os <<
"::Processor "<<
MyPID()<<
" of " <<
NumProc() <<
" total processors.";
479 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.