Skip to content

Commit

Permalink
#2092: location: call function pointer directly
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Feb 14, 2023
1 parent a4ea3a8 commit 31dc65b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vt/topos/location/location.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ struct EntityLocationCoord : LocationCoord {
*
* \param[in] m message shared pointer
*/
template <typename MessageT>
template <typename MessageT, ActiveTypedFnType<MessageT> *f>
void routePreparedMsgHandler(MsgSharedPtr<MessageT> const& msg);

/**
Expand All @@ -264,7 +264,7 @@ struct EntityLocationCoord : LocationCoord {
*
* \param[in] m message shared pointer
*/
template <typename MessageT>
template <typename MessageT, ActiveTypedFnType<MessageT> *f>
void routeMsgHandlerLocal(MsgSharedPtr<MessageT> const& msg);

/**
Expand Down
6 changes: 3 additions & 3 deletions src/vt/topos/location/location.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -663,14 +663,14 @@ void EntityLocationCoord<EntityID>::routeMsgHandler(
}

template <typename EntityID>
template <typename MessageT>
template <typename MessageT, ActiveTypedFnType<MessageT> *f>
void EntityLocationCoord<EntityID>::routePreparedMsgHandler(
MsgSharedPtr<MessageT> const& msg
) {
if (local_registered_.find(msg->getEntity()) == local_registered_.end()) {
return routePreparedMsg(msg);
} else {
return routeMsgHandlerLocal(msg);
return routeMsgHandlerLocal<MessageT, f>(msg);
}
}

Expand Down Expand Up @@ -698,7 +698,7 @@ void EntityLocationCoord<EntityID>::setupMessageForRouting(
}

template <typename EntityID>
template <typename MessageT>
template <typename MessageT, ActiveTypedFnType<MessageT> *f>
void EntityLocationCoord<EntityID>::routeMsgHandlerLocal(
MsgSharedPtr<MessageT> const& msg
) {
Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/manager.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ messaging::PendingSend CollectionManager::sendMsgUntypedHandler(
msg, [](MsgSharedPtr<BaseMsgType>& inner_msg){
auto typed_msg = inner_msg.template to<MsgT>();
auto lm2 = theLocMan()->getCollectionLM<IdxT>(typed_msg->getLocInst());
lm2->template routePreparedMsgHandler<MsgT>(typed_msg);
lm2->template routePreparedMsgHandler<MsgT, collectionMsgTypedHandler<ColT,IdxT,MsgT>>(typed_msg);
}
};
}
Expand Down

0 comments on commit 31dc65b

Please sign in to comment.