All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
viennacl::ocl::handle< OCL_TYPE > Class Template Reference

Handle class the effectively represents a smart pointer for OpenCL handles. More...

`#include <forwards.h>`

## Public Member Functions

| handle ()
| handle (const OCL_TYPE &something, viennacl::ocl::context const &c)
| handle (const handle &other)
| ~handle ()
handle & | operator= (const handle &other)
| Copies the OpenCL handle from the provided handle. Does not take ownership like e.g. std::auto_ptr<>, so both handle objects are valid (more like shared_ptr). More...
handle & | operator= (const OCL_TYPE &something)
| Wraps an OpenCL handle. Does not change the context of this handle object! Decreases the reference count if the handle object is destroyed or another OpenCL handle is assigned. More...
handle & | operator= (std::pair< OCL_TYPE, cl_context > p)
| Wraps an OpenCL handle including its associated context. Decreases the reference count if the handle object is destroyed or another OpenCL handle is assigned. More...
| operator OCL_TYPE () const
| Implicit conversion to the plain OpenCL handle. DEPRECATED and will be removed some time in the future. More...
const OCL_TYPE & | get () const
viennacl::ocl::context const & | context () const
void | context (viennacl::ocl::context const &c)
handle & | swap (handle &other)
| Swaps the OpenCL handle of two handle objects. More...
void | inc ()
| Manually increment the OpenCL reference count. Typically called automatically, but is necessary if user-supplied memory objects are wrapped. More...
void | dec ()
| Manually decrement the OpenCL reference count. Typically called automatically, but might be useful with user-supplied memory objects. More...

## Detailed Description

### template<class OCL_TYPE>
class viennacl::ocl::handle< OCL_TYPE >

Handle class the effectively represents a smart pointer for OpenCL handles.

Definition at line 51 of file forwards.h.

## Constructor & Destructor Documentation

template<class OCL_TYPE>

viennacl::ocl::handle< OCL_TYPE >::handle | ( |  | ) |

inline

Definition at line 154 of file handle.hpp.

template<class OCL_TYPE>

viennacl::ocl::handle< OCL_TYPE >::handle | ( | const OCL_TYPE & | something,
|  | viennacl::ocl::context const & | c
| ) |  |

inline

Definition at line 155 of file handle.hpp.

template<class OCL_TYPE>

viennacl::ocl::handle< OCL_TYPE >::handle | ( | const handle< OCL_TYPE > & | other | ) |

inline

Definition at line 156 of file handle.hpp.

template<class OCL_TYPE>

viennacl::ocl::handle< OCL_TYPE >::~handle | ( |  | ) |

inline

Definition at line 157 of file handle.hpp.

## Member Function Documentation

template<class OCL_TYPE>

viennacl::ocl::context const& viennacl::ocl::handle< OCL_TYPE >::context | ( |  | ) | const

inline

Definition at line 193 of file handle.hpp.

template<class OCL_TYPE>

void viennacl::ocl::handle< OCL_TYPE >::context | ( | viennacl::ocl::context const & | c | ) |

inline

Definition at line 198 of file handle.hpp.

template<class OCL_TYPE>

void viennacl::ocl::handle< OCL_TYPE >::dec | ( |  | ) |

inline

Manually decrement the OpenCL reference count. Typically called automatically, but might be useful with user-supplied memory objects.

Definition at line 218 of file handle.hpp.

template<class OCL_TYPE>

const OCL_TYPE& viennacl::ocl::handle< OCL_TYPE >::get | ( |  | ) | const

inline

Definition at line 191 of file handle.hpp.

template<class OCL_TYPE>

void viennacl::ocl::handle< OCL_TYPE >::inc | ( |  | ) |

inline

Manually increment the OpenCL reference count. Typically called automatically, but is necessary if user-supplied memory objects are wrapped.

Definition at line 216 of file handle.hpp.

template<class OCL_TYPE>

viennacl::ocl::handle< OCL_TYPE >::operator OCL_TYPE | ( |  | ) | const

inline

Implicit conversion to the plain OpenCL handle. DEPRECATED and will be removed some time in the future.

Definition at line 189 of file handle.hpp.

template<class OCL_TYPE>

handle& viennacl::ocl::handle< OCL_TYPE >::operator= | ( | const handle< OCL_TYPE > & | other | ) |

inline

Copies the OpenCL handle from the provided handle. Does not take ownership like e.g. std::auto_ptr<>, so both handle objects are valid (more like shared_ptr).

Definition at line 160 of file handle.hpp.

template<class OCL_TYPE>

handle& viennacl::ocl::handle< OCL_TYPE >::operator= | ( | const OCL_TYPE & | something | ) |

inline

Wraps an OpenCL handle. Does not change the context of this handle object! Decreases the reference count if the handle object is destroyed or another OpenCL handle is assigned.

Definition at line 171 of file handle.hpp.

template<class OCL_TYPE>

handle& viennacl::ocl::handle< OCL_TYPE >::operator= | ( | std::pair< OCL_TYPE, cl_context > | p | ) |

inline

Wraps an OpenCL handle including its associated context. Decreases the reference count if the handle object is destroyed or another OpenCL handle is assigned.

Definition at line 179 of file handle.hpp.

template<class OCL_TYPE>

handle& viennacl::ocl::handle< OCL_TYPE >::swap | ( | handle< OCL_TYPE > & | other | ) |

inline

Swaps the OpenCL handle of two handle objects.

Definition at line 202 of file handle.hpp.

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

- viennacl/ocl/forwards.h
- viennacl/ocl/handle.hpp