Tpetra Matrix/Vector Services Version of the Day
Public Member Functions
Tpetra::SrcDistObjectWithPack< Packet, LocalOrdinal > Class Template Reference

Abstract base class for objects that can be the source of an Import or Export operation, and that also know how to pack their data to send to the target object. More...

#include <Tpetra_SrcDistObjectWithPack.hpp>

Inheritance diagram for Tpetra::SrcDistObjectWithPack< Packet, LocalOrdinal >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void pack (const Teuchos::ArrayView< const LocalOrdinal > &exportLIDs, Teuchos::Array< Packet > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor) const =0
 Pack the object's data for an Import or Export.
virtual ~SrcDistObjectWithPack ()
 Destructor (declared virtual for memory safety of derived classes).

Detailed Description

template<class Packet, class LocalOrdinal>
class Tpetra::SrcDistObjectWithPack< Packet, LocalOrdinal >

Abstract base class for objects that can be the source of an Import or Export operation, and that also know how to pack their data to send to the target object.

If an object implements SrcDistObjectWithPack, then that object acknowledges that it knows how to pack its data as the source object of an Import or Export operation. The target object in general assumes responsibility for packing the source object's data. However, the target object (in its packAndPrepare method) may ask the source object to pack its own data, if the source object implements SrcDistObjectWithPack.

Definition at line 75 of file Tpetra_SrcDistObjectWithPack.hpp.


Constructor & Destructor Documentation

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

Destructor (declared virtual for memory safety of derived classes).

Definition at line 105 of file Tpetra_SrcDistObjectWithPack.hpp.


Member Function Documentation

template<class Packet, class LocalOrdinal>
virtual void Tpetra::SrcDistObjectWithPack< Packet, LocalOrdinal >::pack ( const Teuchos::ArrayView< const LocalOrdinal > &  exportLIDs,
Teuchos::Array< Packet > &  exports,
const Teuchos::ArrayView< size_t > &  numPacketsPerLID,
size_t &  constantNumPackets,
Distributor distor 
) const [pure virtual]

Pack the object's data for an Import or Export.

Parameters:
exportLIDs[in] List of the entries (as local IDs in the source object) we will be sending to other processes.
exports[out] On exit, the buffer for data to send.
numPacketsPerLID[out] On exit, the implementation of this method must do one of two things: set numPacketsPerLID[i] to contain the number of packets to be exported for exportLIDs[i] and set constantNumPackets to zero, or set constantNumPackets to a nonzero value. If the latter, the implementation need not fill numPacketsPerLID.
constantNumPackets[out] On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that the number of packets per LID is constant, and that constantNumPackets is that value.
distor[in] The Distributor object we are using.

Implemented in Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, LocalMatOps >, Tpetra::RowMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node >, and Tpetra::CrsMatrix< Scalar, LocalOrdinal, GlobalOrdinal, Node, SpMatOps >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines