cs_host_task extends cs_device_task to add support for host function tasks. More...
#include <cs_dispatch_queue.h>
Inheritance diagram for cs_host_task< FunctionType, Args >:
Collaboration diagram for cs_host_task< FunctionType, Args >:Public Types | |
| using | args_tuple_t = std::tuple< Args... > |
| Tuple type for argument storage. More... | |
| using | data_tuple_t = std::tuple< FunctionType > |
Public Member Functions | |
| cs_host_task (cs_host_task const &)=delete | |
| cs_host_task & | operator= (cs_host_task const &)=delete |
| cs_host_task (cs_host_task &&)=default | |
| cs_host_task & | operator= (cs_host_task &&)=default |
| cs_host_task (FunctionType &&function, cs_dispatch_context context) | |
| void | launch (Args... args) |
| ~cs_host_task () | |
| Wait for task termination. More... | |
Public Member Functions inherited from cs_task | |
| cs_task (cs_task const &)=delete | |
| cs_task & | operator= (cs_task const &)=delete |
| cs_task (cs_task &&)=default | |
| cs_task & | operator= (cs_task &&)=default |
| cs_task (cs_dispatch_context context={}) | |
| Create a new task with a given context and initialize a new stream. More... | |
| void | add_dependency (cs_event_ref event) |
| Add an event to wait for. More... | |
| void | add_dependency (std::initializer_list< cs_event_ref > const &sync_events) |
| void | wait () |
| Wait for task completion. More... | |
| cs_event_ref | record_end_event () |
| Record an event from the task and return a cs_event_ref to it. More... | |
| operator cs_event_ref () | |
| Call record_event() to implicitely convert a task to an event. More... | |
| cs_dispatch_context & | get_context () |
| Return a reference to the context. More... | |
| cs_event_ref | get_start_event () |
| Return a reference to the start event. More... | |
| cs_event_ref | get_end_event () |
| Return a reference to the end event. More... | |
| ~cs_task () | |
| Waits for task termination and destroys the associated CUDA stream. More... | |
cs_host_task extends cs_device_task to add support for host function tasks.
| using args_tuple_t = std::tuple<Args...> |
Tuple type for argument storage.
| using data_tuple_t = std::tuple<FunctionType> |
Tuple type for function (possibly a lambda with captures) and argument storage.
|
delete |
|
default |
|
inline |
Initialize a host task with given function and context. The function must be launched using the launch method.
|
inline |
Wait for task termination.
|
inline |
Launch the host function asynchronously using the given parameters with cudaLaunchHostFunc.
|
default |
|
delete |