Skip to content

Commit

Permalink
#1899: runnable: add missing getter for trace context
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Sep 20, 2022
1 parent aa7d058 commit 5416018
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/vt/runnable/runnable.impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ inline ctx::LBData* RunnableNew::get<ctx::LBData>() {
return nullptr;
}

#if vt_check_enabled(trace_enabled)
template <>
inline ctx::Trace* RunnableNew::get<ctx::Trace>() {
if (contexts_.has_trace)
return &contexts_.trace;
else
return nullptr;
}
#endif


template <typename... Args>
void RunnableNew::addContextSetContext(Args&&... args) {
contexts_.setcontext = ctx::SetContext{std::forward<Args>(args)...};
Expand Down

0 comments on commit 5416018

Please sign in to comment.