|
Teuchos - Trilinos Tools Package
Version of the Day
|
42 #ifndef TEUCHOS_COMM_HPP
43 #define TEUCHOS_COMM_HPP
45 #include "Teuchos_ReductionOp.hpp"
46 #include "Teuchos_ArrayRCP.hpp"
70 template<
class OrdinalType>
84 template<
class OrdinalType>
136 template<
class OrdinalType>
309 template<
typename Ordinal>
370 const int rootRank,
const Ordinal bytes,
char buffer[]
375 gather (
const Ordinal sendBytes,
const char sendBuffer[],
376 const Ordinal recvBytes,
char recvBuffer[],
377 const int root)
const = 0;
402 const Ordinal sendBytes,
const char sendBuffer[]
403 ,
const Ordinal recvBytes,
char recvBuffer[]
421 ,
const Ordinal bytes,
const char sendBuffer[],
char globalReducts[]
439 ,
const Ordinal bytes,
const char sendBuffer[],
char scanReducts[]
466 const Ordinal bytes,
const char sendBuffer[],
const int destRank
472 const char sendBuffer[],
474 const int tag)
const = 0;
496 const Ordinal bytes,
const char sendBuffer[],
const int destRank
502 const char sendBuffer[],
504 const int tag)
const = 0;
527 const int sourceRank,
const Ordinal bytes,
char recvBuffer[]
550 const char sendBuffer[],
552 const int tag)
const = 0;
578 const int tag)
const = 0;
602 const int sourceRank,
603 const int tag)
const = 0;
808 #endif // TEUCHOS_COMM_HPP
virtual void readySend(const ArrayView< const char > &sendBuffer, const int destRank) const =0
Ready send of data from this process to another process.
virtual RCP< CommStatus< Ordinal > > wait(const Ptr< RCP< CommRequest< Ordinal > > > &request) const =0
Wait on a single communication request, and return its status.
virtual ~CommStatus()
Destructor (declared virtual for memory safety)
virtual void send(const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const =0
Variant of send() that takes a tag.
virtual OrdinalType getSourceRank()=0
The source rank that sent the message.
virtual RCP< Comm > duplicate() const =0
Duplicate this communicator.
virtual void broadcast(const int rootRank, const Ordinal bytes, char buffer[]) const =0
Broadcast values from the root process to the slave processes.
virtual void gatherAll(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[]) const =0
Gather values from each process to collect on all processes.
virtual int receive(const int sourceRank, const Ordinal bytes, char recvBuffer[]) const =0
Blocking receive of data from this process to another process.
virtual void scan(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char scanReducts[]) const =0
Scan reduction.
virtual int getRank() const =0
Returns the rank of this process.
Encapsulation of the result of a receive (blocking or nonblocking).
virtual void waitAll(const ArrayView< RCP< CommRequest< Ordinal > > > &requests, const ArrayView< RCP< CommStatus< Ordinal > > > &statuses) const =0
Wait on communication requests, and return their statuses.
virtual OrdinalType getTag()=0
The tag of the received message.
virtual RCP< Comm > createSubcommunicator(const ArrayView< const int > &ranks) const =0
Create a subcommunicator containing the specified processes.
Smart reference counting pointer class for automatic garbage collection.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
virtual ~Comm()
Destructor, declared virtual for safety of derived classes.
virtual void barrier() const =0
Pause every process in *this communicator until all the processes reach this point.
virtual RCP< CommRequest< Ordinal > > isend(const ArrayView< const char > &sendBuffer, const int destRank, const int tag) const =0
Variant of isend() that takes a tag.
virtual void gather(const Ordinal sendBytes, const char sendBuffer[], const Ordinal recvBytes, char recvBuffer[], const int root) const =0
Gather values from all processes to the root process.
virtual ~CommRequest()
Destructor; cancels the request if it is still pending.
virtual void ssend(const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const =0
Variant of ssend() that takes a message tag.
virtual int getTag() const =0
The current tag.
virtual void reduceAll(const ValueTypeReductionOp< Ordinal, char > &reductOp, const Ordinal bytes, const char sendBuffer[], char globalReducts[]) const =0
Global reduction.
Base class for all objects that can describe themselves.
virtual void ssend(const Ordinal bytes, const char sendBuffer[], const int destRank) const =0
Always blocking send of data from this process to another process.
virtual int getSize() const =0
Returns the number of processes that make up this communicator.
virtual RCP< CommRequest< Ordinal > > isend(const ArrayView< const char > &sendBuffer, const int destRank) const =0
Non-blocking send.
virtual RCP< CommRequest< Ordinal > > ireceive(const ArrayView< char > &recvBuffer, const int sourceRank) const =0
Non-blocking receive.
virtual void send(const Ordinal bytes, const char sendBuffer[], const int destRank) const =0
Possibly blocking send of data from this process to another process.
virtual RCP< CommStatus< OrdinalType > > wait()=0
Wait on this request (a blocking operation).
virtual void readySend(const Ordinal bytes, const char sendBuffer[], const int destRank, const int tag) const =0
Variant of readySend() that accepts a message tag.
Abstract interface for distributed-memory communication.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Encapsulation of a pending nonblocking communication operation.
virtual void waitAll(const ArrayView< RCP< CommRequest< Ordinal > > > &requests) const =0
Wait on a set of communication requests.
virtual RCP< Comm > split(const int color, const int key) const =0
Split a communicator into subcommunicators based on color and key.
virtual RCP< CommRequest< Ordinal > > ireceive(const ArrayView< char > &recvBuffer, const int sourceRank, const int tag) const =0
Variant of ireceive that takes a tag.