CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
alpaka::HostOnlyTask Class Reference

#include <HostOnlyTask.h>

Public Member Functions

 HostOnlyTask (std::function< void(std::exception_ptr)> task)
 
void operator() (std::exception_ptr eptr) const
 

Private Attributes

std::function< void(std::exception_ptr)> task_
 

Detailed Description

A task that is guaranted not to call any GPU-ralated APIs

These tasks can be enqueued directly to the native GPU queues, without the use of a dedicated host-side worker thread.

Definition at line 17 of file HostOnlyTask.h.

Constructor & Destructor Documentation

◆ HostOnlyTask()

alpaka::HostOnlyTask::HostOnlyTask ( std::function< void(std::exception_ptr)>  task)
inline

Definition at line 19 of file HostOnlyTask.h.

19 : task_(std::move(task)) {}
std::function< void(std::exception_ptr)> task_
Definition: HostOnlyTask.h:24
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ operator()()

void alpaka::HostOnlyTask::operator() ( std::exception_ptr  eptr) const
inline

Definition at line 21 of file HostOnlyTask.h.

References task_.

21 { task_(eptr); }
std::function< void(std::exception_ptr)> task_
Definition: HostOnlyTask.h:24

Member Data Documentation

◆ task_

std::function<void(std::exception_ptr)> alpaka::HostOnlyTask::task_
private

Definition at line 24 of file HostOnlyTask.h.

Referenced by operator()().