Skip to content

Commit

Permalink
#249: location: provide entity caching predicate
Browse files Browse the repository at this point in the history
  • Loading branch information
hobywan committed Feb 15, 2019
1 parent 19eaacc commit 65bb5c0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/vt/topos/location/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ struct EntityLocationCoord : LocationCoord {
);
void printCurrentCache() const;

bool isCached(EntityID const& id) const;

private:
template <typename MessageT>
static void msgHandler(MessageT *msg);
Expand Down
6 changes: 6 additions & 0 deletions src/vt/topos/location/location.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,12 @@ void EntityLocationCoord<EntityID>::registerEntityMigrated(
return registerEntity(id, uninitialized_destination, msg_action, true);
}

template <typename EntityID>
bool EntityLocationCoord<EntityID>::isCached(EntityID const& id) const {

return recs_.exists(id);
}

template <typename EntityID>
void EntityLocationCoord<EntityID>::insertPendingEntityAction(
EntityID const& id, NodeActionType action
Expand Down

0 comments on commit 65bb5c0

Please sign in to comment.