|
Zoltan2
Version of the Day
|
This class represents a collection of global Identifiers and their associated weights, if any. More...
#include <Zoltan2_BasicIdentifierInput.hpp>


Public Types | |
| typedef InputTraits< User > ::scalar_t | scalar_t |
| typedef InputTraits< User >::lno_t | lno_t |
| typedef InputTraits< User >::gno_t | gno_t |
| typedef InputTraits< User >::gid_t | gid_t |
| typedef InputTraits< User >::node_t | node_t |
| typedef IdentifierInput< User > | base_adapter_t |
| typedef User | user_t |
Public Member Functions | |
| BasicIdentifierInput (lno_t numIds, const gid_t *idPtr, vector< const scalar_t * > &weights, vector< int > &weightStrides) | |
| Constructor. More... | |
| string | inputAdapterName () const |
| Returns a descriptive name that identifies the concrete adapter. More... | |
| size_t | getLocalNumberOfObjects () const |
| Returns the number of objects in the input. More... | |
| int | getNumberOfWeightsPerObject () const |
| 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... | |
| size_t | getObjectWeights (int dim, const scalar_t *&wgt, int &stride) const |
| Provide pointer to a weight array with stride. More... | |
| size_t | getLocalNumberOfIdentifiers () const |
| Return the number of identifiers on this process. More... | |
| int | getNumberOfWeights () const |
| Return the number of weights associated with each identifier. If the number of weights is zero, then we assume that the identifiers are equally weighted. More... | |
| size_t | getIdentifierList (const gid_t *&Ids) const |
| size_t | getIdentifierWeights (int dimension, const scalar_t *&weights, int &stride) const |
| Provide a pointer to one of the dimensions of this process' optional weights. More... | |
| enum InputAdapterType | inputAdapterType () const |
| Returns the type of adapter. More... | |
| virtual size_t | getIdentifierList (gid_t const *&Ids) const =0 |
| Provide a pointer to this process' identifiers. More... | |
| template<typename Adapter > | |
| size_t | applyPartitioningSolution (User &in, User *&out, const PartitioningSolution< Adapter > &solution) const |
| Apply a PartitioningSolution to an input. More... | |
Static Public Member Functions | |
| static string | inputAdapterTypeName (InputAdapterType iaType) |
| Returns the name of the input adapter. More... | |
This class represents a collection of global Identifiers and their associated weights, if any.
The user supplies the identifiers and weights by way of pointers to arrays.
The template parameter (User) is a C++ class type which provides the actual data types with which the Zoltan2 library will be compiled, through a Traits mechanism. User may be the actual class used by application to represent coordinates, or it may be the empty helper class BasicUserTypes with which a Zoltan2 user can easily supply the data types for the library.
The scalar_t type, representing use data such as matrix values, is used by Zoltan2 for weights, coordinates, part sizes and quality metrics. Some User types (like Tpetra::CrsMatrix) have an inherent scalar type, and some (like Tpetra::CrsGraph) do not. For such objects, the scalar type is set by Zoltan2 to float. If you wish to change it to double, set the second template parameter to double.
Definition at line 83 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef InputTraits<User>::scalar_t Zoltan2::BasicIdentifierInput< User >::scalar_t |
Definition at line 87 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef InputTraits<User>::lno_t Zoltan2::BasicIdentifierInput< User >::lno_t |
Definition at line 88 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef InputTraits<User>::gno_t Zoltan2::BasicIdentifierInput< User >::gno_t |
Definition at line 89 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef InputTraits<User>::gid_t Zoltan2::BasicIdentifierInput< User >::gid_t |
Definition at line 90 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef InputTraits<User>::node_t Zoltan2::BasicIdentifierInput< User >::node_t |
Definition at line 91 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef IdentifierInput<User> Zoltan2::BasicIdentifierInput< User >::base_adapter_t |
Definition at line 92 of file Zoltan2_BasicIdentifierInput.hpp.
| typedef User Zoltan2::BasicIdentifierInput< User >::user_t |
Definition at line 93 of file Zoltan2_BasicIdentifierInput.hpp.
| Zoltan2::BasicIdentifierInput< User >::BasicIdentifierInput | ( | lno_t | numIds, |
| const gid_t * | idPtr, | ||
| vector< const scalar_t * > & | weights, | ||
| vector< int > & | weightStrides | ||
| ) |
Constructor.
| numIds | is the number of identifiers in the list |
| ids | should point to a list of numIds identifiers. |
| weights | a list of pointers to arrays of weights. The number of weights per identifier is assumed to be weights.size(). |
| weightStrides | a list of strides for the weights. The weight for weight dimension n for ids[k] should be found at weights[n][weightStrides[n] * k]. If weightStrides.size() is zero, it is assumed all strides are one. |
The values pointed to the arguments must remain valid for the lifetime of this InputAdapter.
Definition at line 167 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Returns a descriptive name that identifies the concrete adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 117 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Returns the number of objects in the input.
Objects may be coordinates, graph vertices, matrix rows, etc. They are the objects to be partitioned, ordered, or colored.
Implements Zoltan2::InputAdapter< User >.
Definition at line 119 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
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.
Implements Zoltan2::InputAdapter< User >.
Definition at line 121 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Provide pointer to a weight array with stride.
| dim | the weight dimension, zero or greater |
| wgt | on return a pointer to the weights for this dimension |
| stride | on return, the value such that the nth weight should be found at wgt[n*stride] . |
wgt array, which should be at least equal to getLocalNumberOfObjects() * stride . Implements Zoltan2::InputAdapter< User >.
Definition at line 123 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Return the number of identifiers on this process.
Implements Zoltan2::IdentifierInput< User >.
Definition at line 133 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Return the number of weights associated with each identifier. If the number of weights is zero, then we assume that the identifiers are equally weighted.
Implements Zoltan2::IdentifierInput< User >.
Definition at line 135 of file Zoltan2_BasicIdentifierInput.hpp.
|
inline |
Definition at line 137 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtual |
Provide a pointer to one of the dimensions of this process' optional weights.
| dimension | is a value ranging from zero to one less than getNumberOfWeights() |
| weights | on return will contain a list of the weights for the dimension specified. If weights for this dimension are to be uniform for all identifierse in the global problem, the weights should be a NULL pointer. |
| stride | on return will indicate the stride of the weights list. |
If stride is k then the weight corresponding to the identifier Ids[n] (returned in getIdentifierList) should be found at weights[k*n].
Implements Zoltan2::IdentifierInput< User >.
Definition at line 143 of file Zoltan2_BasicIdentifierInput.hpp.
|
inlinevirtualinherited |
Returns the type of adapter.
Implements Zoltan2::InputAdapter< User >.
Definition at line 123 of file Zoltan2_IdentifierInput.hpp.
|
pure virtualinherited |
Provide a pointer to this process' identifiers.
| Ids | will on return point to the list of the global Ids for this process. |
|
inlineinherited |
Apply a PartitioningSolution to an input.
This is not a required part of the IdentifierInput 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 InputAdapter. |
| 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 194 of file Zoltan2_IdentifierInput.hpp.
|
staticinherited |
Returns the name of the input adapter.
Definition at line 134 of file Zoltan2_InputAdapter.hpp.
1.8.5