Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Return a default global communicator appropriate for the build. More...
#include <Teuchos_DefaultComm.hpp>
Static Public Member Functions | |
static Teuchos::RCP< const Comm< OrdinalType > > | getComm () |
Return the default global communicator. More... | |
static Teuchos::RCP< const Comm< OrdinalType > > | getDefaultSerialComm (const Teuchos::RCP< const Comm< OrdinalType > > &comm) |
Return a serial Comm if the input Comm is null. More... | |
Static Private Member Functions | |
static void | freeDefaultComm () |
Free the default Comm object. More... | |
static void | freeDefaultSerialComm () |
Free the default serial Comm object. More... | |
Static Private Attributes | |
static const Comm< OrdinalType > * | comm_ = NULL |
The default global communicator. More... | |
static const Comm< OrdinalType > * | defaultSerialComm_ = NULL |
A "serial" communicator (containing one process, whose rank is zero). More... | |
Return a default global communicator appropriate for the build.
Use this class to get a Comm instance representing the default global communicator. If Teuchos was built with MPI (i.e., if the HAVE_MPI macro is defined), then the default communicator wraps MPI_COMM_WORLD. Otherwise, it is a "serial" communicator (containing one process, whose rank is zero).
OrdinalType | The ordinal type for the Comm communicator wrapper template class. Comm uses OrdinalType to represent things like array lengths and indices. |
OrdinalType
is called OrdinalType
and not Ordinal
, because of a bug in Intel's C++ compiler (version 11.1). This compiler confuses the Ordinal
template parameter of DefaultComm with the Teuchos::Ordinal typedef. The Ordinal
template parameter should actually shadow the typedef in Teuchos, and it does with GCC 4.5.1, but does not with Intel's compiler. This may be the case with other compilers as well, but I haven't tested them yet. If this class' template parameter were named Ordinal
, then the following line of code would result in a compile error: Definition at line 62 of file Teuchos_DefaultComm.hpp.
|
static |
Return the default global communicator.
Definition at line 180 of file Teuchos_DefaultComm.hpp.
|
static |
Return a serial Comm if the input Comm is null.
If the input communicator comm
is null, return the default serial communicator. Otherwise, just return the input.
Definition at line 302 of file Teuchos_DefaultComm.hpp.
|
inlinestaticprivate |
Free the default Comm object.
Definition at line 111 of file Teuchos_DefaultComm.hpp.
|
inlinestaticprivate |
Free the default serial Comm object.
Definition at line 119 of file Teuchos_DefaultComm.hpp.
|
staticprivate |
The default global communicator.
If Teuchos was built with MPI, this is a wrapper for MPI_COMM_WORLD. Otherwise, this is a "serial" communicator (containing one process, whose rank is zero).
Definition at line 93 of file Teuchos_DefaultComm.hpp.
|
staticprivate |
A "serial" communicator (containing one process, whose rank is zero).
Definition at line 96 of file Teuchos_DefaultComm.hpp.