Tpetra::Distributor Class Reference

The Tpetra gather/scatter setup class. More...

#include <Tpetra_Distributor.hpp>

Inheritance diagram for Tpetra::Distributor:

Inheritance graph
[legend]
List of all members.

Public Member Functions

Constructor/Destructor
 Distributor (const Teuchos::RCP< const Teuchos::Comm< int > > &comm)
 Construct the Distributor using the specified communicator.
 Distributor (const Distributor &distributor)
 Copy Constructor.
 ~Distributor ()
 Destructor.
Gather/Scatter Constructors
size_t createFromSends (const Teuchos::ArrayView< const int > &exportNodeIDs)
 Create a Distributor object using list of node IDs to send to.
template<class Ordinal>
void createFromRecvs (const Teuchos::ArrayView< const Ordinal > &remoteIDs, const Teuchos::ArrayView< const int > &remoteNodeIDs, Teuchos::ArrayRCP< Ordinal > &exportIDs, Teuchos::ArrayRCP< int > &exportNodeIDs)
 Create Distributor object using list of node IDs to receive from.
Attribute Accessor Methods
size_t getNumReceives () const
 The number of nodes from which we will receive data, not include this node ("myself").
size_t getNumSends () const
 The number of nodes to which we will send data, not include this node ("myself").
bool hasSelfMessage () const
 Indicates whether values are being sent to/recieved from this node.
size_t getMaxSendLength () const
 Maximum number of values that this node is sending to another single node.
size_t getTotalReceiveLength () const
 Total number of values that this nodes is receiving from other nodes.
Teuchos::ArrayView< const
int > 
getImagesFrom () const
 A list of images sending values to this node. (non-persisting view).
Teuchos::ArrayView< const
int > 
getImagesTo () const
 A list of images to which this node is sending values. (non-persisting view).
Teuchos::ArrayView< const
size_t > 
getLengthsFrom () const
 Number of values we're receiving from each node. (non-persisting view).
Teuchos::ArrayView< const
size_t > 
getLengthsTo () const
 Number of values we're sending to each node. (non-persisting view).
Reverse Communication Methods
const Teuchos::RCP< Distributor > & getReverse () const
 Returns a Distributor with a reverse plan of this Distributor's plan.
Execute Distributor Plan Methods
template<class Packet>
void doPostsAndWaits (const Teuchos::ArrayView< const Packet > &exports, size_t numPackets, const Teuchos::ArrayView< Packet > &imports)
 Execute a plan specified by the distributor object.
template<class Packet>
void doPosts (const Teuchos::ArrayView< const Packet > &exports, size_t numPackets, const Teuchos::ArrayRCP< Packet > &imports)
 Post the data for a distributor plan, but do not execute the waits yet.
void doWaits ()
 Wait on any outstanding posts to complete.
template<class Packet>
void doReversePostsAndWaits (const Teuchos::ArrayView< const Packet > &exports, size_t numPackets, const Teuchos::ArrayView< Packet > &imports)
 Execute a reverse plan specified by the distributor object.
template<class Packet>
void doReversePosts (const Teuchos::ArrayView< const Packet > &exports, size_t numPackets, const Teuchos::ArrayRCP< Packet > &imports)
 Post the data for a reverse plan, but do not execute the waits yet.
void doReverseWaits ()
 Wait on any outstanding reverse waits to complete.
Overridden from Teuchos::Describable
std::string description () const
 Return a simple one-line description of this object.
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const
 Print the object with some verbosity level to an FancyOStream object.

Detailed Description

The Tpetra gather/scatter setup class.

The Distributor class is an interface that encapsulates the general information and services needed for other Tpetra classes to perform gather/scatter operations on a parallel computer.


Constructor & Destructor Documentation

Tpetra::Distributor::Distributor ( const Teuchos::RCP< const Teuchos::Comm< int > > &  comm  )  [explicit]

Construct the Distributor using the specified communicator.

Tpetra::Distributor::Distributor ( const Distributor distributor  ) 

Copy Constructor.

Tpetra::Distributor::~Distributor (  ) 

Destructor.


Member Function Documentation

size_t Tpetra::Distributor::createFromSends ( const Teuchos::ArrayView< const int > &  exportNodeIDs  ) 

Create a Distributor object using list of node IDs to send to.

Take a list of node IDs and construct a plan for efficiently scattering to those nodes. Return the number of IDs being sent to me.

Parameters:
exportNodeIDs [in] List of nodes that will get the exported data. A node ID greater than or equal to the number of nodes will result in a std::runtime_error on all nodes. Node IDs less than zero are ignored; their placement corresponds to null sends in any future exports. That is, if exportNodeIDs[0] == -1, then the corresponding position in the export array is ignored during a call to doPosts() or doPostsAndWaits() is skipped. For this reason, a negative entry is sufficient to break contiguity.
Returns:
Number of imports this node will be receiving.

template<class Ordinal>
void Tpetra::Distributor::createFromRecvs ( const Teuchos::ArrayView< const Ordinal > &  remoteIDs,
const Teuchos::ArrayView< const int > &  remoteNodeIDs,
Teuchos::ArrayRCP< Ordinal > &  exportIDs,
Teuchos::ArrayRCP< int > &  exportNodeIDs 
)

Create Distributor object using list of node IDs to receive from.

Take a list of node IDs and construct a plan for efficiently scattering to those nodes. Return the number and list of IDs being sent by me.

Parameters:
remoteIDs [in] List of remote IDs wanted.
remoteNodeIDs [in] List of nodes that will send the corresponding remote IDs. Node IDs less than zero are ignored; their placement corresponds to null sends in any future exports. A node ID greater than or equal to the number of nodes will result in a std::runtime_error on all nodes.
exportIDs [out] List of IDs that need to be sent from this node.
exportNodeIDs [out] List of nodes that will get the exported IDs.
Note:
exportGIDs and exportNodeIDs are allocated by the Distributor, but they are reference counted and will be automatically deallocated.

size_t Tpetra::Distributor::getNumReceives (  )  const

The number of nodes from which we will receive data, not include this node ("myself").

size_t Tpetra::Distributor::getNumSends (  )  const

The number of nodes to which we will send data, not include this node ("myself").

bool Tpetra::Distributor::hasSelfMessage (  )  const

Indicates whether values are being sent to/recieved from this node.

If we are sending any elements to ourself, returns true. If we aren't, returns false.

size_t Tpetra::Distributor::getMaxSendLength (  )  const

Maximum number of values that this node is sending to another single node.

size_t Tpetra::Distributor::getTotalReceiveLength (  )  const

Total number of values that this nodes is receiving from other nodes.

Teuchos::ArrayView< const int > Tpetra::Distributor::getImagesFrom (  )  const

A list of images sending values to this node. (non-persisting view).

Teuchos::ArrayView< const int > Tpetra::Distributor::getImagesTo (  )  const

A list of images to which this node is sending values. (non-persisting view).

Teuchos::ArrayView< const size_t > Tpetra::Distributor::getLengthsFrom (  )  const

Number of values we're receiving from each node. (non-persisting view).

We will receive getLengthsFrom[i] values from node getImagesFrom[i].

Teuchos::ArrayView< const size_t > Tpetra::Distributor::getLengthsTo (  )  const

Number of values we're sending to each node. (non-persisting view).

We will send getLengthsTo[i] values to image getImagesTo[i].

const Teuchos::RCP< Distributor > & Tpetra::Distributor::getReverse (  )  const

Returns a Distributor with a reverse plan of this Distributor's plan.

This method creates the reverse Distributor the first time the function is called.

template<class Packet>
void Tpetra::Distributor::doPostsAndWaits ( const Teuchos::ArrayView< const Packet > &  exports,
size_t  numPackets,
const Teuchos::ArrayView< Packet > &  imports 
)

Execute a plan specified by the distributor object.

Parameters:
exports [in] Contains the values we're exporting.
numPackets [in] Specifies the number of values per export/import.
imports [out] On entry, buffer must be large enough to accomodate the data exported to us. On exit, contains the values exported to us.

template<class Packet>
void Tpetra::Distributor::doPosts ( const Teuchos::ArrayView< const Packet > &  exports,
size_t  numPackets,
const Teuchos::ArrayRCP< Packet > &  imports 
)

Post the data for a distributor plan, but do not execute the waits yet.

Parameters:
exports [in] Contains the values to be sent by this node.
numPackets [in] Specifies the number of scalars per export/import.
imports [out] Buffer must be large enough to accomodate the data exported to us. The buffer is not guaranteed to be filled until doWaits() is executed.

void Tpetra::Distributor::doWaits (  ) 

Wait on any outstanding posts to complete.

template<class Packet>
void Tpetra::Distributor::doReversePostsAndWaits ( const Teuchos::ArrayView< const Packet > &  exports,
size_t  numPackets,
const Teuchos::ArrayView< Packet > &  imports 
)

Execute a reverse plan specified by the distributor object.

Parameters:
exports [in] Contains the values to be sent by this node.
numPackets [in] Specifies the number of scalars per export/import.
imports [out] On entry, buffer must be large enough to accomodate the data exported to us. On exit, contains the values exported to us.

template<class Packet>
void Tpetra::Distributor::doReversePosts ( const Teuchos::ArrayView< const Packet > &  exports,
size_t  numPackets,
const Teuchos::ArrayRCP< Packet > &  imports 
)

Post the data for a reverse plan, but do not execute the waits yet.

Parameters:
exports [in] Contains the values we're exporting.
numPackets [in] Specifies the number of scalars per export/import.
imports [out] Buffer must be large enough to accomodate the data exported to us. The buffer is not guaranteed to be filled until doWaits() is executed.

void Tpetra::Distributor::doReverseWaits (  ) 

Wait on any outstanding reverse waits to complete.

std::string Tpetra::Distributor::description (  )  const [virtual]

Return a simple one-line description of this object.

Reimplemented from Teuchos::Describable.

void Tpetra::Distributor::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel = Teuchos::Describable::verbLevel_default 
) const [virtual]

Print the object with some verbosity level to an FancyOStream object.

Reimplemented from Teuchos::Describable.


The documentation for this class was generated from the following files:
Generated on Wed May 12 21:40:14 2010 for Tpetra Matrix/Vector Services by  doxygen 1.4.7