Skip to content

Commit

Permalink
[#204] Local data getters for hasmap, multimap and set
Browse files Browse the repository at this point in the history
  • Loading branch information
VitoCastellana committed Mar 7, 2022
1 parent dc66fbe commit a3615e9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/shad/data_structures/hashmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ class Hashmap : public AbstractDataStructure<
/// @return The global identifier associated with the hashmap instance.
ObjectID GetGlobalID() const { return oid_; }

/// @brief Getter of the local hasmap.
///
/// @return The pointer to the local hashmap instance.
LocalHashmap<KTYPE, VTYPE, KEY_COMPARE, INSERT_POLICY> * GetLocalHashmap() {
return & localMap_;
};

/// @brief Overall size of the hashmap (number of entries).
/// @warning Calling the size method may result in one-to-all
/// communication among localities to retrieve consinstent information.
Expand Down
7 changes: 7 additions & 0 deletions include/shad/data_structures/multimap.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ class Multimap : public AbstractDataStructure< Multimap<KTYPE, VTYPE, KEY_COMPAR
/// @return The global identifier associated with the multimap instance.
ObjectID GetGlobalID() const { return oid_; }

/// @brief Getter of the local local multimap.
///
/// @return The pointer to the local multimap instance.
LocalMultimap<KTYPE, VTYPE, KEY_COMPARE> * GetLocalMultimap() {
return &localMultimap_;
};

/// @brief Overall size of the multimap (number of entries).
/// @warning Calling the size method may result in one-to-all
/// communication among localities to retrieve consistent information.
Expand Down
7 changes: 7 additions & 0 deletions include/shad/data_structures/set.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ class Set : public AbstractDataStructure<Set<T, ELEM_COMPARE>> {
/// @return The global identifier associated with the set instance.
ObjectID GetGlobalID() const { return oid_; }

/// @brief Getter of the local set.
///
/// @return The pointer to the local set instance.
LocalSet<T, ELEM_COMPARE> * GetLocalSet() {
return & localSet_;
};

/// @brief Overall size of the set (number of elements).
/// @warning Calling the size method may result in one-to-all
/// communication among localities to retrieve consinstent information.
Expand Down

0 comments on commit a3615e9

Please sign in to comment.