cuda::experimental::host_launch
Defined in include/cuda/experimental/__launch/host_launch.cuh
-
template<typename _Callable, typename ..._Args>
void cuda::experimental::host_launch(stream_ref __stream, _Callable __callable, _Args... __args) Launches a host callable to be executed in stream order on the provided stream.
Callable and arguments are copied into an internal dynamic allocation to preserve them until the asynchronous call happens. Lambda capture or reference_wrapper can be used if there is a need to pass something by reference.
Callable must not call any APIs from cuda, thrust or cub namespaces. It must not call into CUDA Runtime or Driver APIs. It also can’t depend on another thread that might block on any asynchronous CUDA work.
- Parameters
__stream – Stream to launch the host function on
__callable – Host function or callable object to call in stream order
__args – Arguments to call the supplied callable with