FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
Public Member Functions | List of all members
cl::Kernel Class Reference

Class interface for cl_kernel. More...

#include <cl.hpp>

Inheritance diagram for cl::Kernel:
cl::detail::Wrapper< cl_kernel >

Public Member Functions

 Kernel (const Program &program, const char *name, cl_int *err=NULL)
 
 ~Kernel ()
 Destructor.
 
 Kernel ()
 Default constructor - initializes to NULL.
 
 Kernel (const Kernel &kernel)
 Copy constructor - performs shallow copy.
 
__CL_EXPLICIT_CONSTRUCTORS Kernel (const cl_kernel &kernel)
 Constructor from cl_kernel - takes ownership.
 
Kerneloperator= (const Kernel &rhs)
 Assignment operator from Kernel.
 
Kerneloperator= (const cl_kernel &rhs)
 Assignment operator from cl_kernel - takes ownership.
 
template<typename T >
cl_int getInfo (cl_kernel_info name, T *param) const
 
template<cl_int name>
detail::param_traits< detail::cl_kernel_info, name >::param_type getInfo (cl_int *err=NULL) const
 
template<typename T >
cl_int getWorkGroupInfo (const Device &device, cl_kernel_work_group_info name, T *param) const
 
template<cl_int name>
detail::param_traits< detail::cl_kernel_work_group_info, name >::param_type getWorkGroupInfo (const Device &device, cl_int *err=NULL) const
 
template<typename T >
cl_int setArg (cl_uint index, T value)
 
cl_int setArg (cl_uint index, ::size_t size, void *argPtr)
 
- Public Member Functions inherited from cl::detail::Wrapper< cl_kernel >
 Wrapper (const cl_type &obj)
 
 Wrapper (const Wrapper< cl_type > &rhs)
 
Wrapper< cl_type > & operator= (const Wrapper< cl_type > &rhs)
 
Wrapper< cl_type > & operator= (const cl_type &rhs)
 
cl_type operator() () const
 
cl_type & operator() ()
 

Additional Inherited Members

- Public Types inherited from cl::detail::Wrapper< cl_kernel >
typedef cl_kernel cl_type
 
- Protected Member Functions inherited from cl::detail::Wrapper< cl_kernel >
cl_int retain () const
 
cl_int release () const
 
- Protected Attributes inherited from cl::detail::Wrapper< cl_kernel >
cl_type object_
 

Detailed Description

Class interface for cl_kernel.

Note
Copies of these objects are shallow, meaning that the copy will refer to the same underlying cl_kernel as the original. For details, see clRetainKernel() and clReleaseKernel().
See also
cl_kernel

Constructor & Destructor Documentation

◆ ~Kernel()

cl::Kernel::~Kernel ( )
inline

Destructor.

This calls clReleaseKernel() on the value held by this instance.

◆ Kernel() [1/2]

cl::Kernel::Kernel ( const Kernel kernel)
inline

Copy constructor - performs shallow copy.

This calls clRetainKernel() on the parameter's cl_kernel.

◆ Kernel() [2/2]

__CL_EXPLICIT_CONSTRUCTORS cl::Kernel::Kernel ( const cl_kernel &  kernel)
inline

Constructor from cl_kernel - takes ownership.

This effectively transfers ownership of a refcount on the cl_kernel into the new Kernel object.

Member Function Documentation

◆ operator=() [1/2]

Kernel & cl::Kernel::operator= ( const cl_kernel &  rhs)
inline

Assignment operator from cl_kernel - takes ownership.

This effectively transfers ownership of a refcount on the rhs and calls clReleaseKernel() on the value previously held by this instance.

◆ operator=() [2/2]

Kernel & cl::Kernel::operator= ( const Kernel rhs)
inline

Assignment operator from Kernel.

This calls clRetainKernel() on the parameter and clReleaseKernel() on the previous value held by this instance.