This class is used to store directory entries in the container_directory class and subsequently, its base class directory. It models the map concept. For most pContainers, it is a safe assumption to expect that most GIDs will be mapped to the home location and that there will be only a small amount of GIDs that differ from this closed-form solution (through migration, etc.)
More...
template<typename Key>
class stapl::directory_registry< Key >
This class is used to store directory entries in the container_directory class and subsequently, its base class directory. It models the map concept. For most pContainers, it is a safe assumption to expect that most GIDs will be mapped to the home location and that there will be only a small amount of GIDs that differ from this closed-form solution (through migration, etc.)
In these cases (i.e., for this class), the map only explicitly stores values that differ from the closed-form home calculation.
- Template Parameters
-
Home | Function object that provides a (usually) closed-form solution for key -> value. |
- See also
- container_directory
◆ directory_registry()
template<typename Key >
template<typename Home >
Create a registry with a given manager (home).
- Parameters
-
home | Function object to translate keys to values. |
◆ reset_home()
template<typename Key >
template<typename Partition , typename Mapper >
Resets the partition and mapper stored in m_home.
- Parameters
-
partition | view-based partition of a data distribution. |
mapper | view-based mapper of a data distribution. |
◆ empty()
Returns whether or not the registry is empty.
◆ operator[]()
Lookup in the registry on which location a GID resides.
- Parameters
-
key | Key to look up in the registry |
- Returns
- The location of the key
Checks if the key is in the list of exceptions from the home location. If so, return the location explicitly stored there. Otherwise, return the location the manager/home location assigns to the given GID.
◆ insert()
Register the locality of a GID.
- Parameters
-
val | Key-value pair to insert into the registry |
If the key is mapped to this location by the home manager, see if it is in the exception list (possible for a previous erase call). If so, erase exception. If it's not mapped to this location, add an entry in the exception list with the alternative location.
◆ find()
Lookup in the registry on which location a GID resides.
- Parameters
-
key | Key to look up in the registry |
- Returns
- The location of the key
Checks if the key is in the list of exceptions from the home location. If so, return the location explicitly stored there. Otherwise, return the location the manager/home location assigns to the given GID.
◆ erase()
Erase a mapping of a GID from a location.
- Parameters
-
key | Key to remove from the directory |
When erasing, leave a invalid entry in the exception list. This keeps it in a transition state until a subsequent insert (for static containers, with migration) reenables it in the registry to handle messages on the new location (needed for ordering protocol, messages revert to being buffered in directory).
The documentation for this class was generated from the following file: