Accelerated Computation Engine
Public Member Functions | List of all members
OpenCL::Kernel::Locker Class Reference

#include <opencl_kernel_locker.h>

Public Member Functions

 Locker (Kernel *kernel)
 
 Locker (Locker &&other)
 
 ~Locker ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Locker() [1/2]

Kernel::Locker::Locker ( Kernel kernel)

Constructs a new locker object with the given locked kernel object.

Parameters
kernel

◆ Locker() [2/2]

Kernel::Locker::Locker ( Locker &&  other)

Constructs a new locker object taking ownership of the other locker object's kernel lock.

Parameters
other

◆ ~Locker()

Kernel::Locker::~Locker ( )

Unlocks the kernel object this locker object contains.


The documentation for this class was generated from the following files: