Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

A base class for distributed objects that support import and export operations. More...

#include <Tpetra_DistObject.hpp>

Inheritance diagram for Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

Constructor/Destructor Methods

 DistObject (const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
 constructor
 DistObject (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source)
 copy constructor
virtual ~DistObject ()
 destructor
Import/Export Methods

void doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Import.
void doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &dest, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Export.
void doImport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)
 Import (using an Exporter).
void doExport (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
 Export (using an Importer).
Attribute Accessor Methods

bool isDistributed () const
 Accessor for whether or not this is a global object.
const Teuchos::RCP< const Map
< LocalOrdinal, GlobalOrdinal,
Node > > & 
getMap () const
 Access function for the Tpetra::Map this DistObject was constructed with.
I/O methods

void print (std::ostream &os) const
 Print method.

Protected Types

enum  ReverseOption
 

Enum indicating whether the transer should be performed in forward or reverse mode.

More...

Protected Member Functions

virtual void doTransfer (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs, const Teuchos::ArrayView< const LocalOrdinal > &remoteLIDs, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Distributor &distor, ReverseOption revOp)
 Perform transfer (redistribution) of data across memory images.
virtual bool checkSizes (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source)=0
 Allows the source and target (this) objects to be compared for compatibility.
virtual void copyAndPermute (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, size_t numSameIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteToLIDs, const Teuchos::ArrayView< const LocalOrdinal > &permuteFromLIDs)=0
 Perform copies and permutations that are local to this image.
virtual void packAndPrepare (const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< Packet > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor)=0
 Perform any packing or preparation required for communication.
virtual void unpackAndCombine (const Teuchos::ArrayView< const LocalOrdinal > &importLIDs, const Teuchos::ArrayView< const Packet > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM)=0
 Perform any unpacking and combining after communication.

Detailed Description

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
class Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >

A base class for distributed objects that support import and export operations.

The DistObject is a base class for all Tpetra distributed global objects. It provides the basic mechanisms and interface specifications for importing and exporting operations using Tpetra::Import and Tpetra::Export objects.

Distributed Global vs. Replicated Local.

Definition at line 68 of file Tpetra_DistObject.hpp.


Member Enumeration Documentation

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
enum Tpetra::DistObject::ReverseOption [protected]

Enum indicating whether the transer should be performed in forward or reverse mode.

Definition at line 130 of file Tpetra_DistObject.hpp.


Constructor & Destructor Documentation

template<class Packet , class LocalOrdinal, class GlobalOrdinal, class Node>
Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::DistObject ( const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &  map  )  [inline, explicit]

constructor

Definition at line 242 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::DistObject ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source  )  [inline]

copy constructor

Definition at line 247 of file Tpetra_DistObject.hpp.

template<class Packet , class LocalOrdinal , class GlobalOrdinal , class Node >
Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::~DistObject (  )  [inline, virtual]

destructor

Definition at line 252 of file Tpetra_DistObject.hpp.


Member Function Documentation

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::doImport ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Import< LocalOrdinal, GlobalOrdinal, Node > &  importer,
CombineMode  CM 
) [inline]

Import.

Definition at line 256 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::doExport ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  dest,
const Export< LocalOrdinal, GlobalOrdinal, Node > &  exporter,
CombineMode  CM 
) [inline]

Export.

Definition at line 271 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::doImport ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Export< LocalOrdinal, GlobalOrdinal, Node > &  exporter,
CombineMode  CM 
) [inline]

Import (using an Exporter).

Definition at line 286 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::doExport ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  dest,
const Import< LocalOrdinal, GlobalOrdinal, Node > &  importer,
CombineMode  CM 
) [inline]

Export (using an Importer).

Definition at line 302 of file Tpetra_DistObject.hpp.

template<class Packet , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::isDistributed (  )  const [inline]

Accessor for whether or not this is a global object.

Definition at line 317 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
const Teuchos::RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> >& Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::getMap (  )  const [inline]

Access function for the Tpetra::Map this DistObject was constructed with.

Definition at line 114 of file Tpetra_DistObject.hpp.

template<class Packet , class LocalOrdinal , class GlobalOrdinal , class Node >
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::print ( std::ostream &  os  )  const [inline]

Print method.

Definition at line 396 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal, class GlobalOrdinal, class Node>
void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::doTransfer ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source,
CombineMode  CM,
size_t  numSameIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteToLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteFromLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  remoteLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Distributor distor,
ReverseOption  revOp 
) [inline, protected, virtual]

Perform transfer (redistribution) of data across memory images.

Definition at line 322 of file Tpetra_DistObject.hpp.

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual bool Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::checkSizes ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source  )  [protected, pure virtual]

Allows the source and target (this) objects to be compared for compatibility.

Return true if they are compatible, return false if they aren't.

Implemented in Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >, Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >, and Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::copyAndPermute ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source,
size_t  numSameIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteToLIDs,
const Teuchos::ArrayView< const LocalOrdinal > &  permuteFromLIDs 
) [protected, pure virtual]

Perform copies and permutations that are local to this image.

Parameters:
source In On entry, the DistObject that we are importing from.
numSameIDs In On entry, the number of elements that are the same on the source and dest objects. (i.e. The element is owned by the same image in both source and dest, and no permutation occurs.)
numPermuteIDs In On entry, the number of elements that are locally permuted between source and dest objects.
permuteToLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the destination DistObject.)
permuteFromLIDs In On entry, contains a list of the elements that are permuted. (Listed by their LID in the source DistObject.)

Implemented in Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >, Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >, and Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::packAndPrepare ( const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &  source,
const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< Packet > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) [protected, pure virtual]

Perform any packing or preparation required for communication.

Parameters:
source In On entry, the DistObject that we are importing from.
exportLIDs In On entry, a list of the entries we will be sending to other images. (Listed by their LID in the source DistObject.)
exports Out On exit, buffer for data we will be sending out.
numPacketsPerLID Out On exit, numPacketsPerLID[i] contains the number of packets to be exported for exportLIDs[i].
constantNumPackets Out On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that num-packets-per-LID is constant, and constantNumPackets holds that value.
distor In On entry, contains the Distributor object we are using.

Implemented in Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >, Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >, and Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.

template<class Packet, class LocalOrdinal = int, class GlobalOrdinal = LocalOrdinal, class Node = Kokkos::DefaultNode::DefaultNodeType>
virtual void Tpetra::DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node >::unpackAndCombine ( const Teuchos::ArrayView< const LocalOrdinal > &  importLIDs,
const Teuchos::ArrayView< const Packet > &  imports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t  constantNumPackets,
Distributor distor,
CombineMode  CM 
) [protected, pure virtual]

Perform any unpacking and combining after communication.

Parameters:
importLIDs In On entry, a list of the entries we received from other images. (Listed by their LID in the target DistObject.)
imports In Buffer containing data we received.
numPacketsPerLID In numPacketsPerLID[i] contains the number of packets imported for importLIDs[i].
constantNumPackets In If nonzero, then numPacketsPerLID is constant (same value in all entries) and constantNumPackets is that value.
distor In The Distributor object we are using.
CM In The Tpetra::CombineMode to use when combining the imported entries with existing entries.

Implemented in Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node >, Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >, and Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:21:42 2011 for Tpetra Matrix/Vector Services by  doxygen 1.6.3