Location metadata. More...
Classes | |
| class | fence_md |
| Fence metadata for intragang requests. More... | |
Public Member Functions | |
| void * | operator new (std::size_t) |
| void | operator delete (void *) |
| void * | operator new[] (std::size_t)=delete |
| void | operator delete[] (void *)=delete |
| location_md (const id lid, gang_md &g) | |
| Constructs a new location_md object. More... | |
| location_md (const id lid, const size_type local_idx, gang_md &g) | |
| Constructs a new location_md object. More... | |
| location_md (location_md const &)=delete | |
| location_md & | operator= (location_md const &)=delete |
| id | get_id (void) const noexcept |
| gang_md const & | get_gang_md (void) const noexcept |
| gang_md & | get_gang_md (void) noexcept |
| bool | is_leader (void) const noexcept |
Returns true if this location is the leader among all the locally managed locations. | |
| size_type | local_index (void) const noexcept |
| Returns the index of this location among all the locally managed locations. | |
| runqueue_type const & | get_runqueue (void) const noexcept |
| runqueue_type & | get_runqueue (void) noexcept |
| void | set_executor (std::unique_ptr< executor_base > ex) noexcept |
| Sets the executor of this location_md. | |
| executor_base * | try_get_executor (void) noexcept |
| executor_base & | get_executor (void) |
| magic_id | disambiguate (context_id const &src, context_id const &dest) |
| Generates the magic number to disambiguate between context_id objects that should not be the same. More... | |
| gang_md * | get_cached_gang_md (const gang_md::id gid) |
Returns a pointer to the cached gang metadata if it is available, otherwise nullptr. | |
| epoch_type | advance_epoch (void) |
| epoch_type | get_epoch (void) const noexcept |
| void | undefer_requests (void) |
| void | defer_requests (void) |
| bool | try_defer_requests (void) |
| std::pair< object_virtual_address, epoch_type > | register_object (void *const p, const bool avoid_registry) |
Returns a handle and registration epoch upon registering p. More... | |
| void | unregister_object (object_virtual_address const &h) |
Unregisters the pointer associated with handle h. More... | |
| void * | get_object (object_virtual_address const &h, const epoch_type e=logical_clock::no_time) const |
| void | pre_fence (void) |
| Pre rmi_fence() operations. More... | |
| void | post_fence (void) |
| Post rmi_fence() operations. More... | |
| fence_md const & | get_fence_md (void) const noexcept |
| fence_md & | get_fence_md (void) noexcept |
| bool | has_pending_rmis (void) const noexcept |
| Returns if there are pending RMIs. More... | |
| template<typename T , typename U > | |
| T & | reset_lss (void *addr, U &&u) |
| Replaces the object associated with the given address. More... | |
| template<typename T , typename CreatorFunction > | |
| T & | get_lss (void *addr, CreatorFunction &&f) |
| Returns an object associated with the given address. More... | |
| template<typename T > | |
| T * | try_get_lss (void *addr) noexcept |
| Returns an object associated with the given address. More... | |
| void | destroy_lss (void *addr) noexcept |
| Destroys the object associated with the given address. More... | |
| void | add_ref (long count=1, std::memory_order order=std::memory_order_relaxed) noexcept |
Increases the reference count by count. | |
| long | remove_ref (long count=1, std::memory_order order=std::memory_order_relaxed) noexcept |
Decreases the reference count by count. More... | |
| bool | release (std::memory_order order=std::memory_order_relaxed) noexcept |
| Decreases the reference count, destroying the object if it reached 0. More... | |
| long | use_count (std::memory_order order=std::memory_order_relaxed) const noexcept |
| bool | unique (std::memory_order order=std::memory_order_relaxed) const noexcept |
Public Types | |
| using | id = location_id |
| using | epoch_type = logical_clock::time_type |
| using | size_type = gang_md::size_type |
| using | runqueue_type = runqueue |
Related Functions | |
(Note that these are not member functions.) | |
| constexpr bool | operator== (location_md const &x, location_md const &y) noexcept |
Returns if x is equal to y. More... | |
Location metadata.
The metadata includes fence metadata for the intragang requests of the contexts of the associated location, objects registered through rmi_handle, location_specific_storage objects and a runqueue for incoming requests.
All location_md objects are reference-counted and are destroyed when the count becomes 0. The associated gang_md object is notified when the location_md object is destroyed.
| stapl::runtime::location_md::location_md | ( | const id | lid, |
| gang_md & | g | ||
| ) |
Constructs a new location_md object.
| lid | Id of the location. |
| g | Metadata of the gang the location belongs to. |
| stapl::runtime::location_md::location_md | ( | const id | lid, |
| const size_type | local_idx, | ||
| gang_md & | g | ||
| ) |
Constructs a new location_md object.
| lid | Id of the location. |
| local_idx | Index in the locally managed locations list of g. |
| g | Metadata of the gang the location belongs to. |
| magic_id stapl::runtime::location_md::disambiguate | ( | context_id const & | src, |
| context_id const & | dest | ||
| ) |
Generates the magic number to disambiguate between context_id objects that should not be the same.
| std::pair<object_virtual_address, epoch_type> stapl::runtime::location_md::register_object | ( | void *const | p, |
| const bool | avoid_registry | ||
| ) |
Returns a handle and registration epoch upon registering p.
If avoid_registry is true, then the object will not be inserted in a registry and the epoch will not be increased.
| void stapl::runtime::location_md::unregister_object | ( | object_virtual_address const & | h | ) |
Unregisters the pointer associated with handle h.
| void stapl::runtime::location_md::pre_fence | ( | void | ) |
Pre rmi_fence() operations.
This notifies the runqueue to change the scheduling policy.
| void stapl::runtime::location_md::post_fence | ( | void | ) |
Post rmi_fence() operations.
This makes all unregistered handles from spmd_registry and the SPMD keys available again.
|
noexcept |
Returns if there are pending RMIs.
| T& stapl::runtime::location_md::reset_lss | ( | void * | addr, |
| U && | u | ||
| ) |
Replaces the object associated with the given address.
If there is a stored object, it will destroy it.
| T& stapl::runtime::location_md::get_lss | ( | void * | addr, |
| CreatorFunction && | f | ||
| ) |
Returns an object associated with the given address.
If there is no object, it will create one.
|
noexcept |
Returns an object associated with the given address.
If there is no object, it will not create one.
|
noexcept |
Destroys the object associated with the given address.
|
noexceptinherited |
Decreases the reference count by count.
|
noexceptinherited |
Decreases the reference count, destroying the object if it reached 0.
release() returns true, then the object has been destroyed.true if the object was destroyed, otherwise false.
1.8.13