10#ifndef TEUCHOS_SERIAL_COMM_HPP 
   11#define TEUCHOS_SERIAL_COMM_HPP 
   13#include "Teuchos_Comm.hpp" 
   25template<
class OrdinalType>
 
   43template<
typename Ordinal>
 
   85          const int root) 
const;
 
  110        const int tag) 
const;
 
  120         const int tag) 
const;
 
  135             const int tag) 
const;
 
  145         const int tag) 
const;
 
  155            const int tag) 
const;
 
 
  192template<
typename Ordinal>
 
  206template<
typename Ordinal>
 
  210template<
typename Ordinal>
 
  218template<
typename Ordinal>
 
  225template<
typename Ordinal>
 
  232template<
typename Ordinal>
 
  239template<
typename Ordinal>
 
  241  const int , 
const Ordinal , 
char []
 
 
  248template<
typename Ordinal>
 
  265template<
typename Ordinal>
 
  271                             const int root)
 const 
 
  285template<
typename Ordinal>
 
  296template<
typename Ordinal>
 
  307template<
typename Ordinal>
 
  309  const Ordinal , 
const char [], 
const int  
  313    true, std::logic_error
 
  314    ,
"SerialComm<Ordinal>::send(...): Error, you can not call send(...) when you" 
  315    " only have one process!" 
 
  319template<
typename Ordinal>
 
  327    true, std::logic_error
 
  328    ,
"SerialComm<Ordinal>::send(...): Error, you can not call send(...) when you" 
  329    " only have one process!" 
 
  333template<
typename Ordinal>
 
  335  const Ordinal , 
const char [], 
const int  
  339    true, std::logic_error
 
  340    ,
"SerialComm<Ordinal>::send(...): Error, you can not call ssend(...) when you" 
  341    " only have one process!" 
 
  345template<
typename Ordinal>
 
  353    true, std::logic_error
 
  354    ,
"SerialComm<Ordinal>::send(...): Error, you can not call ssend(...) when you" 
  355    " only have one process!" 
  359template<
typename Ordinal>
 
  361  const int , 
const Ordinal , 
char []
 
  365    true, std::logic_error
 
  366    ,
"SerialComm<Ordinal>::receive(...): Error, you can not call receive(...) when you" 
  367    " only have one process!" 
 
  372template<
typename Ordinal>
 
  379    true, std::logic_error
 
  380    ,
"SerialComm<Ordinal>::readySend(...): Error, you can not call readySend(...) when you" 
  381    " only have one process!" 
 
  385template<
typename Ordinal>
 
  398    true, std::logic_error
 
  399    ,
"SerialComm<Ordinal>::readySend(...): Error, you can not call readySend(...) when you" 
  400    " only have one process!" 
 
  404template<
typename Ordinal>
 
  410  TEUCHOS_TEST_FOR_EXCEPTION( 
true, std::logic_error, 
"SerialComm<Ordinal>::isend: You cannot call isend when you only have one process." );
 
 
  414template<
typename Ordinal>
 
  421  TEUCHOS_TEST_FOR_EXCEPTION( 
true, std::logic_error, 
"SerialComm<Ordinal>::isend: You cannot call isend when you only have one process." );
 
 
  425template<
typename Ordinal>
 
  431  TEUCHOS_TEST_FOR_EXCEPTION( 
true, std::logic_error, 
"SerialComm<Ordinal>::ireceive: You cannot call isend when you only have one process." );
 
 
  435template<
typename Ordinal>
 
  442  TEUCHOS_TEST_FOR_EXCEPTION( 
true, std::logic_error, 
"SerialComm<Ordinal>::ireceive: You cannot call isend when you only have one process." );
 
 
  446template<
typename Ordinal>
 
  454template<
typename Ordinal>
 
  461    std::invalid_argument, 
"Teuchos::SerialComm::waitAll: There are not enough " 
  462    "entries in the statuses array to hold all the results of the communication" 
  463    " requests.  requests.size() = " << 
requests.size() << 
" > statuses.size() " 
 
  472template<
typename Ordinal>
 
  478    "Teuchos::SerialComm::wait: On input, the request pointer is null.");
 
 
  487template< 
typename Ordinal>
 
  494template<
typename Ordinal>
 
  505template<
typename Ordinal>
 
  519template<
typename Ordinal>
 
  522  std::ostringstream 
oss;
 
 
Defines basic traits for the ordinal field type.
 
Encapsulation of the result of a receive (blocking or nonblocking).
 
Abstract interface for distributed-memory communication.
 
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
 
Smart reference counting pointer class for automatic garbage collection.
 
RCP< T > rcp(const boost::shared_ptr< T > &sptr)
Conversion function that takes in a boost::shared_ptr object and spits out a Teuchos::RCP object.
 
bool is_null() const
Returns true if the underlying pointer is null.
 
T * getRawPtr() const
Get the raw C++ pointer to the underlying object.
 
Implementation of CommStatus for a serial communicator.
 
OrdinalType getSourceRank()
The source rank that sent the message (must be zero).
 
OrdinalType getTag()
The tag of the received message.
 
SerialCommStatus()
Default constructor.
 
Concrete serial communicator subclass.
 
virtual void barrier() const
 
virtual RCP< CommRequest< Ordinal > > ireceive(const ArrayView< char > &Buffer, const int sourceRank) const
 
virtual RCP< CommRequest< Ordinal > > isend(const ArrayView< const char > &sendBuffer, const int destRank) const
 
virtual void broadcast(const int rootRank, const Ordinal bytes, char buffer[]) const
 
virtual RCP< Comm< Ordinal > > createSubcommunicator(const ArrayView< const int > &ranks) const
 
virtual void reduceAll(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char globalReducts[]) const
 
int incrementTag()
Increments the tag and then returns it.
 
virtual void gather(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[], const int root) const
Gather values from all processes to the root process.
 
virtual int receive(const int sourceRank, const Ordinal bytes, char recvBuffer[]) const
 
int getTag() const
The current tag.
 
virtual void readySend(const ArrayView< const char > &sendBuffer, const int destRank) const
 
virtual int getSize() const
 
RCP< SerialComm< Ordinal > > createSerialComm()
Nonmember constructor.
 
virtual RCP< Comm< Ordinal > > duplicate() const
 
virtual void ssend(const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const
 
virtual void scan(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char scanReducts[]) const
 
virtual void send(const Ordinal bytes, const char sendBuffer[], const int destRank) const
 
virtual RCP< CommStatus< Ordinal > > wait(const Ptr< RCP< CommRequest< Ordinal > > > &request) const
 
virtual void waitAll(const ArrayView< RCP< CommRequest< Ordinal > > > &requests) const
 
virtual RCP< Comm< Ordinal > > split(const int color, const int key) const
 
virtual void gatherAll(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[]) const
 
virtual void ssend(const Ordinal bytes, const char sendBuffer[], const int destRank) const
 
std::string description() const
 
virtual int getRank() const
 
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
This macro is designed to be a short version of TEUCHOS_TEST_FOR_EXCEPTION() that is easier to call.
 
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
Macro for throwing an exception with breakpointing to ease debugging.
 
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
 
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Deprecated.
 
static std::string name()
Returns name of this ordinal type.