Tpetra::Distributor< Ordinal > Class Template Reference

Tpetra::Distributor: The Tpetra Gather/Scatter Setup Class. More...

#include <Tpetra_Distributor.hpp>

Inheritance diagram for Tpetra::Distributor< Ordinal >:

Teuchos::Object List of all members.

Public Member Functions

Constructor/Destructor
 Distributor (const Teuchos::RCP< const Teuchos::Comm< Ordinal > > &comm)
 Comm Constuctor (default ctr).
 Distributor (const Distributor< Ordinal > &distributor)
 Copy Constructor.
 ~Distributor ()
 Destructor.
Gather/Scatter Constructors
void createFromSends (const Teuchos::ArrayView< const Ordinal > &exportImageIDs, Ordinal &numImports)
 Create Distributor object using list of ImageIDs to send to.
void createFromRecvs (const Teuchos::ArrayView< const Ordinal > &remoteGIDs, const Teuchos::ArrayView< const Ordinal > &remoteImageIDs, Teuchos::ArrayRCP< Ordinal > &exportGIDs, Teuchos::ArrayRCP< Ordinal > &exportImageIDs)
 Create Distributor object using list of Image IDs to receive from.
Attribute Accessor Methods
const Ordinal & getNumReceives () const
 getNumReceives
const Ordinal & getNumSends () const
 getNumSends
bool getSelfMessage () const
 getSelfMessage - flag for if we're sending to ourself
const Ordinal & getMaxSendLength () const
 getMaxSendLength - maximum number of elements we're sending to a remote image
const Ordinal & getTotalReceiveLength () const
 getTotalReceiveLength
Teuchos::ArrayView< const
Ordinal > 
getImagesFrom () const
 getImagesFrom - list of images sending elements to us (non-persisting view)
Teuchos::ArrayView< const
Ordinal > 
getImagesTo () const
 getImagesTo - list of images we're sending elements to (non-persisting view)
Teuchos::ArrayView< const
Ordinal > 
getLengthsFrom () const
 getLengthsFrom - number of elements we're receiving from each image (non-persisting view)
Teuchos::ArrayView< const
Ordinal > 
getLengthsTo () const
 getLengthsTo - number of elements we're sending to each image (non-persisting view)
Teuchos::ArrayView< const
Ordinal > 
getStartsTo () const
 getStartsTo - list of offsets into export buffer (non-persisting view)
Teuchos::ArrayView< const
Ordinal > 
getIndicesTo () const
 getIndicesTo (non-persisting view)
Reverse Communication Methods
Teuchos::RCP< Distributor<
Ordinal > > 
getReverse () const
 Returns a Distributor with a reverse plan of this Distributor's plan.
Execute Distributor Plan Methods
template<typename Packet>
void doPostsAndWaits (const Teuchos::ArrayView< const Packet > &exports, Ordinal numPackets, const Teuchos::ArrayView< Packet > &imports)
 doPostsAndWaits
template<typename Packet>
void doPosts (const Teuchos::ArrayView< const Packet > &exports, Ordinal numPackets, const Teuchos::ArrayRCP< Packet > &imports)
 doPosts
void doWaits ()
 doWaits
template<typename Packet>
void doReversePostsAndWaits (const Teuchos::ArrayView< const Packet > &exports, Ordinal numPackets, const Teuchos::ArrayView< Packet > &imports)
 doReversePostsAndWaits
template<typename Packet>
void doReversePosts (const Teuchos::ArrayView< const Packet > &exports, Ordinal numPackets, const Teuchos::ArrayRCP< Packet > &imports)
 doReversePosts
void doReverseWaits ()
 doReverseWaits
I/O Methods
void print (std::ostream &os) const
 print method inherited from Teuchos::Object

Detailed Description

template<typename Ordinal>
class Tpetra::Distributor< Ordinal >

Tpetra::Distributor: 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

template<typename Ordinal>
Tpetra::Distributor< Ordinal >::Distributor ( const Teuchos::RCP< const Teuchos::Comm< Ordinal > > &  comm  ) 

Comm Constuctor (default ctr).

template<typename Ordinal>
Tpetra::Distributor< Ordinal >::Distributor ( const Distributor< Ordinal > &  distributor  ) 

Copy Constructor.

template<typename Ordinal>
Tpetra::Distributor< Ordinal >::~Distributor (  ) 

Destructor.


Member Function Documentation

template<typename Ordinal>
void Tpetra::Distributor< Ordinal >::createFromSends ( const Teuchos::ArrayView< const Ordinal > &  exportImageIDs,
Ordinal &  numImports 
)

Create Distributor object using list of ImageIDs to send to.

Take a list of ImageIDs and construct a plan for efficiently scattering to these images. Return the number of IDs being sent to me.

Parameters:
exportImageIDs In List of images that will get the exported data. Image IDs less than zero are ignored; their placement corresponds to null sends in any future exports.
numImports Out Number of imports this image will be receiving.

template<typename Ordinal>
void Tpetra::Distributor< Ordinal >::createFromRecvs ( const Teuchos::ArrayView< const Ordinal > &  remoteGIDs,
const Teuchos::ArrayView< const Ordinal > &  remoteImageIDs,
Teuchos::ArrayRCP< Ordinal > &  exportGIDs,
Teuchos::ArrayRCP< Ordinal > &  exportImageIDs 
)

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

Take a list of global IDs and construct a plan for efficiently scattering to these images. Return the number and list of IDs being sent by me.

Parameters:
remoteGIDs In List of IDs that this image wants.
remoteImageIDs In List of images that will send the remote IDs.
exportGIDs Out List of IDs that need to be sent from this image.
exportImageIDs Out List of images that will get the exported IDs.

template<typename Ordinal>
const Ordinal & Tpetra::Distributor< Ordinal >::getNumReceives (  )  const

getNumReceives

template<typename Ordinal>
const Ordinal & Tpetra::Distributor< Ordinal >::getNumSends (  )  const

getNumSends

template<typename Ordinal>
bool Tpetra::Distributor< Ordinal >::getSelfMessage (  )  const

getSelfMessage - flag for if we're sending to ourself

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

template<typename Ordinal>
const Ordinal & Tpetra::Distributor< Ordinal >::getMaxSendLength (  )  const

getMaxSendLength - maximum number of elements we're sending to a remote image

template<typename Ordinal>
const Ordinal & Tpetra::Distributor< Ordinal >::getTotalReceiveLength (  )  const

getTotalReceiveLength

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getImagesFrom (  )  const

getImagesFrom - list of images sending elements to us (non-persisting view)

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getImagesTo (  )  const

getImagesTo - list of images we're sending elements to (non-persisting view)

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getLengthsFrom (  )  const

getLengthsFrom - number of elements we're receiving from each image (non-persisting view)

We will receive lengthsFrom[i] elements from image imagesFrom[i]

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getLengthsTo (  )  const

getLengthsTo - number of elements we're sending to each image (non-persisting view)

We will send lengthsTo[i] elements to image imagesTo[i]

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getStartsTo (  )  const

getStartsTo - list of offsets into export buffer (non-persisting view)

Given an export buffer that contains all of the elements we're sending out, image i's block of elements will start at position startsTo[i]

template<typename Ordinal>
Teuchos::ArrayView< const Ordinal > Tpetra::Distributor< Ordinal >::getIndicesTo (  )  const

getIndicesTo (non-persisting view)

(Used only if exportImageIDs was not blocked by image.) Gives the order to the export buffer, in order to get a version that is sorted by imageID.

template<typename Ordinal>
Teuchos::RCP< Distributor< Ordinal > > Tpetra::Distributor< Ordinal >::getReverse (  )  const

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

Creates the reverse Distributor if this is the first time this function has been called.

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

doPostsAndWaits

Execute a plan specified by the distributor object.

Parameters:
exports In Contains the values we're exporting.
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<typename Ordinal>
template<typename Packet>
void Tpetra::Distributor< Ordinal >::doPosts ( const Teuchos::ArrayView< const Packet > &  exports,
Ordinal  numPackets,
const Teuchos::ArrayRCP< Packet > &  imports 
)

doPosts

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

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

template<typename Ordinal>
void Tpetra::Distributor< Ordinal >::doWaits (  ) 

doWaits

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

doReversePostsAndWaits

Execute a reverse plan specified by the distributor object.

Parameters:
exports In Contains the values we're exporting.
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<typename Ordinal>
template<typename Packet>
void Tpetra::Distributor< Ordinal >::doReversePosts ( const Teuchos::ArrayView< const Packet > &  exports,
Ordinal  numPackets,
const Teuchos::ArrayRCP< Packet > &  imports 
)

doReversePosts

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

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

template<typename Ordinal>
void Tpetra::Distributor< Ordinal >::doReverseWaits (  ) 

doReverseWaits

template<typename Ordinal>
void Tpetra::Distributor< Ordinal >::print ( std::ostream &  os  )  const [virtual]

print method inherited from Teuchos::Object

Reimplemented from Teuchos::Object.


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