Epetra Package Browser (Single Doxygen Collection) Development
Epetra_Comm.h
Go to the documentation of this file.
00001 /*
00002 //@HEADER
00003 // ************************************************************************
00004 // 
00005 //               Epetra: Linear Algebra Services Package 
00006 //                 Copyright 2011 Sandia Corporation
00007 // 
00008 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00009 // the U.S. Government retains certain rights in this software.
00010 //
00011 // Redistribution and use in source and binary forms, with or without
00012 // modification, are permitted provided that the following conditions are
00013 // met:
00014 //
00015 // 1. Redistributions of source code must retain the above copyright
00016 // notice, this list of conditions and the following disclaimer.
00017 //
00018 // 2. Redistributions in binary form must reproduce the above copyright
00019 // notice, this list of conditions and the following disclaimer in the
00020 // documentation and/or other materials provided with the distribution.
00021 //
00022 // 3. Neither the name of the Corporation nor the names of the
00023 // contributors may be used to endorse or promote products derived from
00024 // this software without specific prior written permission.
00025 //
00026 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00027 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00029 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00030 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00031 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00032 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00033 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00034 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00035 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00036 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 //
00038 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00039 // 
00040 // ************************************************************************
00041 //@HEADER
00042 */
00043 
00044 #ifndef EPETRA_COMM_H
00045 #define EPETRA_COMM_H
00046 
00047 #include "Epetra_ConfigDefs.h"
00048 #include "Epetra_Object.h"
00049 
00050 class Epetra_Distributor;
00051 class Epetra_Directory;
00052 class Epetra_BlockMap;
00053 
00055 
00073 class EPETRA_LIB_DLL_EXPORT Epetra_Comm {
00074     
00075   public:
00077 
00078 
00079 
00083   virtual Epetra_Comm * Clone() const = 0;
00085   virtual ~Epetra_Comm() {};
00087 
00089 
00090 
00091 
00093   virtual void Barrier() const = 0;
00095 
00097 
00098 
00099 
00110   virtual int Broadcast(double * MyVals, int Count, int Root) const = 0;
00111 
00113 
00124   virtual int Broadcast(int * MyVals, int Count, int Root) const = 0;
00125 
00127 
00138   virtual int Broadcast(long * MyVals, int Count, int Root) const = 0;
00139 
00141 
00152   virtual int Broadcast(long long * MyVals, int Count, int Root) const = 0;
00153 
00155 
00166   virtual int Broadcast(char * MyVals, int Count, int Root) const = 0;
00167 
00169 
00171 
00172 
00173 
00183   virtual int GatherAll(double * MyVals, double * AllVals, int Count) const = 0;
00184 
00186 
00196   virtual int GatherAll(int * MyVals, int * AllVals, int Count) const = 0;
00197 
00199 
00209   virtual int GatherAll(long * MyVals, long * AllVals, int Count) const = 0;
00210 
00212 
00222   virtual int GatherAll(long long * MyVals, long long * AllVals, int Count) const = 0;
00224 
00226 
00227 
00228 
00239   virtual int SumAll(double * PartialSums, double * GlobalSums, int Count) const = 0;
00240 
00242 
00252   virtual int SumAll(int * PartialSums, int * GlobalSums, int Count) const = 0;
00253 
00255 
00265   virtual int SumAll(long * PartialSums, long * GlobalSums, int Count) const = 0;
00266 
00268 
00278   virtual int SumAll(long long * PartialSums, long long * GlobalSums, int Count) const = 0;
00280 
00282 
00283 
00284 
00294   virtual int MaxAll(double * PartialMaxs, double * GlobalMaxs, int Count) const = 0;
00295 
00297 
00307   virtual int MaxAll(int * PartialMaxs, int * GlobalMaxs, int Count) const = 0;
00308 
00310 
00320   virtual int MaxAll(long * PartialMaxs, long * GlobalMaxs, int Count) const = 0;
00321 
00323 
00333   virtual int MaxAll(long long * PartialMaxs, long long * GlobalMaxs, int Count) const = 0;
00334 
00336 
00346   virtual int MinAll(double * PartialMins, double * GlobalMins, int Count) const = 0;
00347 
00349 
00359   virtual int MinAll(int * PartialMins, int * GlobalMins, int Count) const = 0;
00360 
00362 
00372   virtual int MinAll(long * PartialMins, long * GlobalMins, int Count) const = 0;
00373 
00384   virtual int MinAll(long long * PartialMins, long long * GlobalMins, int Count) const = 0;
00386 
00388 
00389 
00390 
00400   virtual int ScanSum(double * MyVals, double * ScanSums, int Count) const = 0;
00401 
00403 
00413   virtual int ScanSum(int * MyVals, int * ScanSums, int Count) const = 0;
00414 
00416 
00426   virtual int ScanSum(long * MyVals, long * ScanSums, int Count) const = 0;
00427 
00429 
00439   virtual int ScanSum(long long * MyVals, long long * ScanSums, int Count) const = 0;
00441 
00443 
00444     
00446 
00449   virtual int MyPID() const = 0;
00450   
00452 
00455   virtual int NumProc() const = 0;
00457 
00459 
00460 
00461   virtual Epetra_Distributor * CreateDistributor() const = 0;
00463   virtual Epetra_Directory * CreateDirectory(const Epetra_BlockMap & Map) const = 0;
00465 
00467 
00468 
00469   virtual void PrintInfo(std::ostream & os) const = 0;
00471 };
00472 #endif /* EPETRA_COMM_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines