Task & TaskTypes
michaelsippel opened this issue · comments
In the current form there are only functors (i.e. object which satisfies Callable
), which can optionally be paired with a property-functor (called after actually enqueueing the functor with the Schedulable
(the graph vertex) and the same parameters which get bound to the functor) to set properties for the functor based on the parameters.
It may be useful to call this functor-pair a Task
. To simplify the property-functor, a Task
could derive from multiple TaskTypes
, which all implement a property-functor.
Example from pmacc: TaskCopyDeviceToHost
would use the TaskTypes StreamTask
and CopyTask<Src, Dst>
Currently working on it on branch topic-task
I really like that the proposed Task = enquened Callable, that feels very natural.
current integration in pmacc:
I used a namespace NEW because the old Task implementations can't be removed in order to compile pmacc
current drawbacks:
- TaskTypes cannot implement a constructor (because of
boost::mpl::inherit
) rmngr::Task
needs the final type, so further deriving requires passing through the final type.- Task implementation cannot provide properties-functor, only TaskTypes can
deprecated