Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes

cl::shared_item< T > Struct Template Reference

Helper class template to handle resource tracking of OpenCL reference counted resources. More...

#include <clpp.hpp>

List of all members.

Public Member Functions

 shared_item ()
 Default constructor.
 shared_item (T item)
 Initializing constructor, assumes caller has retained item.
shared_itemoperator= (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.
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

item_
 item holder

Detailed Description

template<typename T>
struct cl::shared_item< T >

Helper class template to handle resource tracking of OpenCL reference counted resources.


The documentation for this struct was generated from the following file: