Helper class template to handle resource tracking of OpenCL reference counted resources. More...
#include <clpp.hpp>
Public Member Functions | |
shared_item () | |
Default constructor. | |
shared_item (T item) | |
Initializing constructor, assumes caller has retained item. | |
shared_item & | operator= (const shared_item &other) |
Assignment operator, increments reference count. | |
shared_item (const shared_item &other) | |
Copy constructor, increments reference count. | |
~shared_item () | |
Destructor, decrements reference count. | |
T | get () const |
Retrieve item value. | |
Private Member Functions | |
void | destroy () |
reference count decrement function | |
template<> | |
void | delete_item (cl_context item) |
template<> | |
void | delete_item (cl_mem item) |
template<> | |
void | delete_item (cl_program item) |
template<> | |
void | delete_item (cl_command_queue item) |
template<> | |
void | delete_item (cl_kernel item) |
template<> | |
void | retain_item (cl_context item) |
template<> | |
void | retain_item (cl_mem item) |
template<> | |
void | retain_item (cl_program item) |
template<> | |
void | retain_item (cl_command_queue item) |
template<> | |
void | retain_item (cl_kernel item) |
Static Private Member Functions | |
static void | delete_item (T item) |
Function that decreases the item reference count. | |
static void | retain_item (T item) |
Function that increases the item reference count. | |
Private Attributes | |
T | item_ |
item holder |
Helper class template to handle resource tracking of OpenCL reference counted resources.