|
Teuchos Package Browser (Single Doxygen Collection)
Version of the Day
|
Utility class for setting an MPI-compatible reduction object and using it to create an MPI_Op object.
More...
#include <Teuchos_MpiReductionOpSetter.hpp>
Public Member Functions | |
| MpiReductionOpSetter (const Teuchos::RCP< const MpiReductionOpBase > &reduct_op) | |
Construct a new MPI_Op object which uses the passed in reduct_op objects. | |
| ~MpiReductionOpSetter () | |
| | |
| MPI_Op | mpi_op () const |
Return the created MPI_Op reduction object that can be used by MPI. | |
Private Member Functions | |
| MpiReductionOpSetter () | |
| MpiReductionOpSetter (const MpiReductionOpSetter &) | |
| MpiReductionOpSetter & | operator= (const MpiReductionOpSetter &) |
Utility class for setting an MPI-compatible reduction object and using it to create an MPI_Op object.
The destructor to this object will remove the set MPI-compatible reduction operation.
Note, this object can only be allocated on the stack and should be used directly before a call to any MPI function that takes an MPI_Op object. For example:
???
Note that this class can only be used in a program where MPI is called from only one thread.
Note, HAVE_MPI must be defined to use this class!.
Definition at line 122 of file Teuchos_MpiReductionOpSetter.hpp.
| Teuchos::MpiReductionOpSetter::MpiReductionOpSetter | ( | const Teuchos::RCP< const MpiReductionOpBase > & | reduct_op | ) |
Construct a new MPI_Op object which uses the passed in reduct_op objects.
Preconditions:
reduct_op.get()!=NULL Postconditions:
this->mpi_op() gives access to the created MPI_Op object that can be used with MPI. Definition at line 140 of file Teuchos_MpiReductionOpSetter.cpp.
Definition at line 150 of file Teuchos_MpiReductionOpSetter.cpp.
| Teuchos::MpiReductionOpSetter::MpiReductionOpSetter | ( | ) | [private] |
| Teuchos::MpiReductionOpSetter::MpiReductionOpSetter | ( | const MpiReductionOpSetter & | ) | [private] |
| MPI_Op Teuchos::MpiReductionOpSetter::mpi_op | ( | ) | const |
Return the created MPI_Op reduction object that can be used by MPI.
Note, this reduction function object will only be valid while *this is still in scope. Therefore, it is recommended that clients only directly call this function to pass in the returned MPI_Op object.
Definition at line 155 of file Teuchos_MpiReductionOpSetter.cpp.
| MpiReductionOpSetter& Teuchos::MpiReductionOpSetter::operator= | ( | const MpiReductionOpSetter & | ) | [private] |
1.7.6.1