|
Zoltan2
|
An IdentifierMap manages a global space of object identifiers. More...
#include <Zoltan2_IdentifierMap.hpp>
Public Types | |
| typedef InputTraits< User >::lno_t | lno_t |
| Constructor - Must be called by all processes. | |
| typedef InputTraits< User >::gno_t | gno_t |
| typedef InputTraits< User >::zgid_t | zgid_t |
Public Member Functions | |
| IdentifierMap (const RCP< const Environment > &env, const RCP< const Comm< int > > &comm, const ArrayRCP< const zgid_t > &gids, bool gidsMustBeConsecutive=false) | |
| ~IdentifierMap () | |
| Destructor. | |
| IdentifierMap (const IdentifierMap &id) | |
| Copy Constructor. | |
| IdentifierMap & | operator= (const IdentifierMap &id) |
| Assignment operator. | |
| bool | gnosAreGids () const |
| Return true if we are using the application global IDs for our internal global numbers. | |
| gno_t | getGlobalNumberOfIds () const |
| Return the global number of identifiers. | |
| gno_t | getLocalNumberOfIds () const |
| Return the local number of identifiers. | |
| void | getGnoRange (gno_t &min, gno_t &max) const |
| Return the minimum and maximum values of the internal global numbers. | |
| bool | gnosAreConsecutive () const |
| Return true if our internal global numbers are consecutive. | |
| bool | consecutiveGnosAreRequired () const |
| Return true if consecutive Gids are required. | |
| gno_t | getMinimumGlobalId () const |
| Return the minimum Zoltan2 global Id across all processes. | |
| gno_t | getMaximumGlobalId () const |
| Return the maximum Zoltan2 global Id across all processes. | |
| void | gidTranslate (ArrayView< zgid_t > gid, ArrayView< gno_t > gno, TranslationType tt) const |
| Map the application global IDs to internal global numbers or vice versa. | |
| void | lnoTranslate (ArrayView< lno_t > lno, ArrayView< gno_t > gno, TranslationType tt) const |
| Map application indices to internal global numbers or vice versa. | |
| void | gidGlobalTranslate (ArrayView< const zgid_t > in_gid, ArrayView< gno_t > out_gno, ArrayView< int > out_proc) const |
| Map application global IDs to internal global numbers and/or process owners. | |
| void | gnoGlobalTranslate (ArrayView< const gno_t > in_gno, ArrayView< zgid_t > out_gid, ArrayView< int > out_proc) const |
| Map library internal global numbers to application GIDs, and their process owners. | |
An IdentifierMap manages a global space of object identifiers.
Data types:
lno_t local indices and local counts gno_t global indices and global counts zgid_t application global IdsThe template parameter User is a user-defined data type which, through a traits mechanism, provides the actual data types with which the Zoltan2 library will be compiled. User may be the actual class or structure used by application to represent a vector, or it may be the helper class BasicUserTypes. See InputTraits for more information.
Definition at line 106 of file Zoltan2_IdentifierMap.hpp.
| typedef InputTraits<User>::lno_t Zoltan2::IdentifierMap< User >::lno_t |
Constructor - Must be called by all processes.
| env | the problem and library environment |
| comm | the problem communicator |
| gids | the application global IDs |
| gidsMustBeConsecutive | set to true if the algorithm or third party library requires consective ids If necessary the IdentifierMap will map the application's global IDs to consecutive integral IDs beginning at zero. |
Definition at line 121 of file Zoltan2_IdentifierMap.hpp.
| typedef InputTraits<User>::gno_t Zoltan2::IdentifierMap< User >::gno_t |
Definition at line 122 of file Zoltan2_IdentifierMap.hpp.
| typedef InputTraits<User>::zgid_t Zoltan2::IdentifierMap< User >::zgid_t |
Definition at line 123 of file Zoltan2_IdentifierMap.hpp.
| Zoltan2::IdentifierMap< User >::IdentifierMap | ( | const RCP< const Environment > & | env, |
| const RCP< const Comm< int > > & | comm, | ||
| const ArrayRCP< const zgid_t > & | gids, | ||
| bool | gidsMustBeConsecutive = false |
||
| ) | [explicit] |
Definition at line 317 of file Zoltan2_IdentifierMap.hpp.
| Zoltan2::IdentifierMap< User >::~IdentifierMap | ( | ) | [inline] |
Destructor.
Definition at line 131 of file Zoltan2_IdentifierMap.hpp.
| Zoltan2::IdentifierMap< User >::IdentifierMap | ( | const IdentifierMap< User > & | id | ) |
Copy Constructor.
| IdentifierMap& Zoltan2::IdentifierMap< User >::operator= | ( | const IdentifierMap< User > & | id | ) |
Assignment operator.
| bool Zoltan2::IdentifierMap< User >::gnosAreGids | ( | ) | const |
Return true if we are using the application global IDs for our internal global numbers.
Definition at line 338 of file Zoltan2_IdentifierMap.hpp.
| gno_t Zoltan2::IdentifierMap< User >::getGlobalNumberOfIds | ( | ) | const [inline] |
Return the global number of identifiers.
Definition at line 146 of file Zoltan2_IdentifierMap.hpp.
| gno_t Zoltan2::IdentifierMap< User >::getLocalNumberOfIds | ( | ) | const [inline] |
Return the local number of identifiers.
Definition at line 150 of file Zoltan2_IdentifierMap.hpp.
| void Zoltan2::IdentifierMap< User >::getGnoRange | ( | gno_t & | min, |
| gno_t & | max | ||
| ) | const |
Return the minimum and maximum values of the internal global numbers.
Definition at line 344 of file Zoltan2_IdentifierMap.hpp.
| bool Zoltan2::IdentifierMap< User >::gnosAreConsecutive | ( | ) | const |
Return true if our internal global numbers are consecutive.
Definition at line 351 of file Zoltan2_IdentifierMap.hpp.
| bool Zoltan2::IdentifierMap< User >::consecutiveGnosAreRequired | ( | ) | const |
Return true if consecutive Gids are required.
Definition at line 357 of file Zoltan2_IdentifierMap.hpp.
| InputTraits< User >::gno_t Zoltan2::IdentifierMap< User >::getMinimumGlobalId | ( | ) | const |
Return the minimum Zoltan2 global Id across all processes.
Definition at line 363 of file Zoltan2_IdentifierMap.hpp.
| InputTraits< User >::gno_t Zoltan2::IdentifierMap< User >::getMaximumGlobalId | ( | ) | const |
Return the maximum Zoltan2 global Id across all processes.
Definition at line 369 of file Zoltan2_IdentifierMap.hpp.
| void Zoltan2::IdentifierMap< User >::gidTranslate | ( | ArrayView< zgid_t > | gid, |
| ArrayView< gno_t > | gno, | ||
| TranslationType | tt | ||
| ) | const |
Map the application global IDs to internal global numbers or vice versa.
| gid | an array of caller's global IDs |
| gno | an array of Zoltan2 global numbers |
| tt | should be TRANSLATE_APP_TO_LIB or TRANSLATE_LIB_TO_APP |
Both gid and gno are preallocated by the caller.
This is a local call. If gid is a vector of application global IDs, then gno will be set to the corresponding internal global numbers. If the gno vector contains internal global numbers, they will be translated to application global IDs. The application global IDs must be from those supplied by this process.
Definition at line 375 of file Zoltan2_IdentifierMap.hpp.
| void Zoltan2::IdentifierMap< User >::lnoTranslate | ( | ArrayView< lno_t > | lno, |
| ArrayView< gno_t > | gno, | ||
| TranslationType | tt | ||
| ) | const |
Map application indices to internal global numbers or vice versa.
| lno | an array of indices |
| gno | an array of Zoltan2 global numbers |
| tt | should be TRANSLATE_APP_TO_LIB or TRANSLATE_LIB_TO_APP |
This is a local call.
If gno contains a list of Zoltan2 internal global numbers, then lno[i] on return will be the index at which the application's global ID associated with gno[i] appeared in the input adapter's "get" method list. In this case, lno should be pre-allocated by the caller, and tt should be TRANSLATE_LIB_TO_APP.
Similarly, if lno contains a list of indices ranging from 0 to N-1 (where N would be the local number of objects), then gno[i] on return will be the internal global number associated with the application's global ID that appeared in location lno[i] in the input adapter's "get" method list. In this case, gno should be pre-allocated by the caller and tt should be TRANSLATE_APP_TO_LIB.
Definition at line 446 of file Zoltan2_IdentifierMap.hpp.
| void Zoltan2::IdentifierMap< User >::gidGlobalTranslate | ( | ArrayView< const zgid_t > | in_gid, |
| ArrayView< gno_t > | out_gno, | ||
| ArrayView< int > | out_proc | ||
| ) | const |
Map application global IDs to internal global numbers and/or process owners.
| in_gid | input, an array of the global IDs |
| out_gno | output, an optional array of the corresponding global numbers used by Zoltan2. If out_gno.size() is zero, we assume global numbers are not needed. |
| out_proc | output, an optional array of the corresponding process ranks owning the global Ids. If out_proc.size() is zero, we assume process ranks are not needed. |
If in_gid[i] is not one of the global Ids supplied in this problem, then out_proc[i] will be -1, and out_gno[i] (if requested) is undefined. This behavior supports graph subsetting.
All processes must call this. The global IDs supplied may belong to another process.
Definition at line 517 of file Zoltan2_IdentifierMap.hpp.
| void Zoltan2::IdentifierMap< User >::gnoGlobalTranslate | ( | ArrayView< const gno_t > | in_gno, |
| ArrayView< zgid_t > | out_gid, | ||
| ArrayView< int > | out_proc | ||
| ) | const |
Map library internal global numbers to application GIDs, and their process owners.
| in_gno | input, an array of the global numbers. |
| out_gid | output, an optional array of the corresponding user global Ids. If out_gid.size() is zero, we assume global Ids are not desired. |
| out_proc | output, an optional array of the corresponding process ranks owning the global numbers. If out_proc.size() is zero, we assume process ranks are not needed. |
Global numbers are always consecutive numbers beginning with zero. If the global number is out of range, a std::runtime_error() is thrown.
All processes must call this. The global numbers supplied may belong to another process.
Definition at line 862 of file Zoltan2_IdentifierMap.hpp.
1.7.6.1