Zoltan2
|
BaseAdapter defines methods required by all Adapters. More...
#include <Zoltan2_Adapter.hpp>
Public Types | |
typedef InputTraits< User >::gno_t | gno_t |
typedef InputTraits< User >::scalar_t | scalar_t |
typedef InputTraits< User >::part_t | part_t |
Public Member Functions | |
virtual enum BaseAdapterType | adapterType () const =0 |
Returns the type of adapter. More... | |
virtual | ~BaseAdapter () |
Destructor. More... | |
virtual size_t | getLocalNumIDs () const =0 |
Returns the number of objects on this process. More... | |
virtual void | getIDsView (const gno_t *&Ids) const =0 |
Provide a pointer to this process' identifiers. More... | |
virtual int | getNumWeightsPerID () const =0 |
Returns the number of weights per object. Number of weights per object should be zero or greater. If zero, then it is assumed that all objects are equally weighted. More... | |
virtual void | getWeightsView (const scalar_t *&wgt, int &stride, int idx=0) const =0 |
Provide pointer to a weight array with stride. More... | |
void | getPartsView (const part_t *&inputPart) const |
Provide pointer to an array containing the input part assignment for each ID. The input part information may be used for re-partitioning to reduce data movement, or for mapping parts to processes. Adapters may return NULL for this pointer (the default behavior); if NULL is returned, algorithms will assume the rank. More... | |
template<typename Adapter > | |
void | applyPartitioningSolution (const User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
Apply a PartitioningSolution to an input. More... | |
BaseAdapter defines methods required by all Adapters.
Adapters provide access from Zoltan2 to the user's data. The methods in the interface must be defined by users. Many built-in adapters are already defined for common data structures, such as Tpetra and Epetra objects and C-language pointers to arrays.
Definition at line 93 of file Zoltan2_Adapter.hpp.
typedef InputTraits<User>::gno_t Zoltan2::BaseAdapter< User >::gno_t |
Definition at line 96 of file Zoltan2_Adapter.hpp.
typedef InputTraits<User>::scalar_t Zoltan2::BaseAdapter< User >::scalar_t |
Definition at line 97 of file Zoltan2_Adapter.hpp.
typedef InputTraits<User>::part_t Zoltan2::BaseAdapter< User >::part_t |
Definition at line 98 of file Zoltan2_Adapter.hpp.
|
inlinevirtual |
Destructor.
Definition at line 106 of file Zoltan2_Adapter.hpp.
|
pure virtual |
Returns the type of adapter.
Implemented in Zoltan2::MeshAdapter< User >, Zoltan2::VectorAdapter< User >, Zoltan2::VectorAdapter< UserCoord >, Zoltan2::IdentifierAdapter< User >, Zoltan2::GraphAdapter< User, UserCoord >, and Zoltan2::MatrixAdapter< User, UserCoord >.
|
pure virtual |
Returns the number of objects on this process.
Objects may be coordinates, graph vertices, matrix rows, etc. They are the objects to be partitioned, ordered, or colored.
Implemented in Zoltan2::MeshAdapter< User >, Zoltan2::MatrixAdapter< User, UserCoord >, Zoltan2::GraphAdapter< User, UserCoord >, Zoltan2::BasicVectorAdapter< User >, Zoltan2::XpetraMultiVectorAdapter< User >, and Zoltan2::BasicIdentifierAdapter< User >.
|
pure virtual |
Provide a pointer to this process' identifiers.
Ids | will on return point to the list of the global Ids for this process. |
Implemented in Zoltan2::MeshAdapter< User >, Zoltan2::MatrixAdapter< User, UserCoord >, Zoltan2::GraphAdapter< User, UserCoord >, and Zoltan2::BasicIdentifierAdapter< User >.
|
pure virtual |
Returns the number of weights per object. Number of weights per object should be zero or greater. If zero, then it is assumed that all objects are equally weighted.
Implemented in Zoltan2::MeshAdapter< User >, Zoltan2::MatrixAdapter< User, UserCoord >, Zoltan2::GraphAdapter< User, UserCoord >, Zoltan2::BasicVectorAdapter< User >, Zoltan2::XpetraMultiVectorAdapter< User >, and Zoltan2::BasicIdentifierAdapter< User >.
|
pure virtual |
Provide pointer to a weight array with stride.
wgt | on return a pointer to the weights for this idx |
stride | on return, the value such that the nth weight should be found at wgt[n*stride] . |
idx | the weight index, zero or greater |
Implemented in Zoltan2::MeshAdapter< User >, Zoltan2::MatrixAdapter< User, UserCoord >, Zoltan2::GraphAdapter< User, UserCoord >, Zoltan2::XpetraMultiVectorAdapter< User >, and Zoltan2::BasicIdentifierAdapter< User >.
|
inline |
Provide pointer to an array containing the input part assignment for each ID. The input part information may be used for re-partitioning to reduce data movement, or for mapping parts to processes. Adapters may return NULL for this pointer (the default behavior); if NULL is returned, algorithms will assume the rank.
inputPart | on return a pointer to input part numbers |
Definition at line 146 of file Zoltan2_Adapter.hpp.
|
inline |
Apply a PartitioningSolution to an input.
This is not a required part of the InputAdapter interface. However if the Caller calls a Problem method to redistribute data, it needs this method to perform the redistribution.
in | An input object with a structure and assignment of of global Ids to processes that matches that of the input data that instantiated this Adapter. |
out | On return this should point to a newly created object with the specified partitioning. |
solution | The Solution object created by a Problem should be supplied as the third argument. It must have been templated on user data that has the same global ID distribution as this user data. |
Definition at line 172 of file Zoltan2_Adapter.hpp.