ATLAS Offline Software
|
Helper object used for synchronising GPU kernel tasks. More...
#include <KernelStatus.h>
Public Member Functions | |
KernelStatus () | |
Default constructor. More... | |
void | finished (int code) |
Function called by "the framework" when the CUDA kernel finished. More... | |
int | wait () |
Wait for the execution of the kernel to finish. More... | |
Private Attributes | |
int | m_code |
The result of the kernel execution. More... | |
std::mutex | m_mutex |
Mutex used for waiting for the CUDA task to finish. More... | |
Helper object used for synchronising GPU kernel tasks.
It is meant to be used as a mixture of std::future
and StatusCode
. Client code can use it to wait for the (asynchronous) execution of a GPU calculation.
Definition at line 21 of file KernelStatus.h.
AthCUDA::KernelStatus::KernelStatus | ( | ) |
void AthCUDA::KernelStatus::finished | ( | int | code | ) |
Function called by "the framework" when the CUDA kernel finished.
Definition at line 16 of file KernelStatus.cxx.
int AthCUDA::KernelStatus::wait | ( | ) |
Wait for the execution of the kernel to finish.
Definition at line 23 of file KernelStatus.cxx.
|
private |
The result of the kernel execution.
Definition at line 35 of file KernelStatus.h.
|
private |
Mutex used for waiting for the CUDA task to finish.
Definition at line 37 of file KernelStatus.h.