Accelerated Computation Engine
|
#include <opencl_kernel_locker.h>
Public Member Functions | |
Locker (Kernel *kernel) | |
Locker (Locker &&other) | |
~Locker () | |
This holds a lock on the given kernel object making it easy to manage the locked resource and avoid very hard to avoid deadlock bugs in complicated or exception handling code. This class can move its ownership of a kernel lock to another instance but it cannot be copied. Upon destruction this class calls the unlock method of the kernel object it contains.
Kernel::Locker::Locker | ( | Kernel * | kernel | ) |
Constructs a new locker object with the given locked kernel object.
kernel |
Kernel::Locker::Locker | ( | Locker && | other | ) |
Constructs a new locker object taking ownership of the other locker object's kernel lock.
other |
Kernel::Locker::~Locker | ( | ) |
Unlocks the kernel object this locker object contains.