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()> task)
 
void operator() () const
 

Private Attributes

std::function< void()> 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 15 of file HostOnlyTask.h.

Constructor & Destructor Documentation

◆ HostOnlyTask()

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

Definition at line 17 of file HostOnlyTask.h.

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

Member Function Documentation

◆ operator()()

void alpaka::HostOnlyTask::operator() ( ) const
inline

Definition at line 19 of file HostOnlyTask.h.

References task_.

19 { task_(); }
std::function< void()> task_
Definition: HostOnlyTask.h:22

Member Data Documentation

◆ task_

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

Definition at line 22 of file HostOnlyTask.h.

Referenced by operator()().