Skip to content

Commit 8358893

Browse files
committed
expose start/end and task type in context
1 parent 50f4bdd commit 8358893

File tree

1 file changed

+17
-1
lines changed
  • cudax/include/cuda/experimental/__stf/internal

1 file changed

+17
-1
lines changed

cudax/include/cuda/experimental/__stf/internal/context.cuh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ class context
164164
::std::variant<T1, T2> payload;
165165
};
166166

167+
public:
167168
/*
168169
* A task that can be either a stream task or a graph task.
169170
*/
@@ -194,6 +195,22 @@ class context
194195
return mv(*this);
195196
}
196197

198+
auto& start()
199+
{
200+
payload->*[&](auto& self) {
201+
self.start();
202+
};
203+
return *this;
204+
}
205+
206+
auto& end()
207+
{
208+
payload->*[&](auto& self) {
209+
self.end();
210+
};
211+
return *this;
212+
}
213+
197214
/**
198215
* @brief Add dependencies to this task.
199216
*
@@ -238,7 +255,6 @@ class context
238255
::std::variant<stream_task<Deps...>, graph_task<Deps...>> payload;
239256
};
240257

241-
public:
242258
/**
243259
* @brief Default constructor for the context class.
244260
*/

0 commit comments

Comments
 (0)