All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cl.hpp File Reference

C++ bindings for OpenCL 1.0 (rev 48) and OpenCL 1.1 (rev 33) More...

#include <CL/opencl.h>
#include <utility>
#include <vector>
#include <string>
#include <cstring>
#include <exception>
+ Include dependency graph for cl.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  cl::string
 Simple string class, that provides a limited subset of std::string functionality but avoids many of the issues that come with that class. More...
class  cl::vector< T, N >
 Fixed sized vector implementation that mirroring std::vector functionality. More...
class  cl::vector< T, N >::iterator
 Iterator class for vectors. More...
struct  cl::size_t< N >
 size_t class used to interface between C++ and OpenCL C calls that require arrays of size_t values, who's size is known statically. More...
struct  cl::detail::GetInfoHelper< Functor, T >
struct  cl::detail::GetInfoHelper< Func, VECTOR_CLASS< T > >
struct  cl::detail::GetInfoHelper< Func, VECTOR_CLASS< char * > >
struct  cl::detail::GetInfoHelper< Func, STRING_CLASS >
struct  cl::detail::param_traits< enum_type, Name >
struct  cl::detail::GetInfoFunctor0< Func, Arg0 >
struct  cl::detail::GetInfoFunctor1< Func, Arg0, Arg1 >
struct  cl::detail::ReferenceHandler< T >
struct  cl::detail::ReferenceHandler< cl_device_id >
struct  cl::detail::ReferenceHandler< cl_platform_id >
struct  cl::detail::ReferenceHandler< cl_context >
struct  cl::detail::ReferenceHandler< cl_command_queue >
struct  cl::detail::ReferenceHandler< cl_mem >
struct  cl::detail::ReferenceHandler< cl_sampler >
struct  cl::detail::ReferenceHandler< cl_program >
struct  cl::detail::ReferenceHandler< cl_kernel >
struct  cl::detail::ReferenceHandler< cl_event >
class  cl::detail::Wrapper< T >
struct  cl::ImageFormat
 ImageFormat interface fro cl_image_format. More...
class  cl::Device
 Device interface for cl_device_id. More...
class  cl::Platform
 Platform interface. More...
class  cl::Context
class  cl::Event
 Event interface for cl_event. More...
class  cl::Memory
 Memory interface for cl_mem. More...
class  cl::Buffer
 Memory buffer interface. More...
class  cl::BufferGL
 Memory buffer interface for GL interop. More...
class  cl::BufferRenderGL
 Memory buffer interface for GL interop with renderbuffer. More...
class  cl::Image
 Base class interface for all images. More...
class  cl::Image2D
 Image interface for 2D images. More...
class  cl::Image2DGL
 2D image interface for GL interop. More...
class  cl::Image3D
 Image interface for 3D images. More...
class  cl::Image3DGL
class  cl::Sampler
 Sampler interface for cl_sampler. More...
class  cl::NDRange
 NDRange interface. More...
struct  cl::LocalSpaceArg
 Local address raper for use with Kernel::setArg. More...
struct  cl::detail::KernelArgumentHandler< T >
struct  cl::detail::KernelArgumentHandler< LocalSpaceArg >
class  cl::Kernel
 Kernel interface that implements cl_kernel. More...
class  cl::Program
 Program interface that implements cl_program. More...
class  cl::CommandQueue
 CommandQueue interface for cl_command_queue. More...
class  cl::KernelFunctor
 Kernel functor interface. More...


 The OpenCL C++ bindings are defined within this namespace.


#define __INIT_CL_EXT_FCN_PTR(name)
#define __ERR_STR(x)   NULL
#define VECTOR_CLASS   std::vector
#define __PARAM_NAME_INFO_1_0(F)
#define __CL_DECLARE_PARAM_TRAITS(token, param_name, T)


typedef int GLint
typedef unsigned int GLenum
typedef unsigned int GLuint
typedef std::string cl::STRING_CLASS


template<typename Func , typename T >
cl_int cl::detail::getInfo (Func f, cl_uint name, T *param)
template<typename Func , typename Arg0 , typename T >
cl_int cl::detail::getInfo (Func f, const Arg0 &arg0, cl_uint name, T *param)
template<typename Func , typename Arg0 , typename Arg1 , typename T >
cl_int cl::detail::getInfo (Func f, const Arg0 &arg0, const Arg1 &arg1, cl_uint name, T *param)
LocalSpaceArg cl::__local (::size_t size)
CE_API cl_int ce_enqueueKernel (const cl::CommandQueue &queue, const cl::Kernel &kernel, const cl::NDRange &offset, const cl::NDRange &global, const cl::NDRange &local, const std::vector< cl::Event > *events, cl::Event *event)


class CE_API cl::KernelFunctor

Detailed Description

C++ bindings for OpenCL 1.0 (rev 48) and OpenCL 1.1 (rev 33)

Benedict R. Gaster and Laurent Morichetti

Additions and fixes from Brian Cole, March 3rd 2010.

June 2010

Optional extension support

                   #define USE_CL_DEVICE_FISSION

Definition in file cl.hpp.

Macro Definition Documentation

#define __CL_DECLARE_PARAM_TRAITS (   token,
struct token; \
template<> \
struct param_traits<detail:: token,param_name> \
{ \
enum { value = param_name }; \
typedef T param_type; \
Definition: core.h:1131

Definition at line 976 of file cl.hpp.

#define __ERR_STR (   x)    NULL

Definition at line 252 of file cl.hpp.

namespace detail { \
template <typename Func> \
struct GetInfoHelper<Func, CPP_TYPE> \
{ \
static cl_int get(Func f, cl_uint name, CPP_TYPE* param) \
{ \
cl_uint err = f(name, sizeof(CPP_TYPE), param, NULL); \
if (err != CL_SUCCESS) { \
return err; \
} \
return ReferenceHandler<CPP_TYPE::cl_type>::retain((*param)()); \
} \
}; \
GLenum GLfloat param
Definition: glcorearb.h:104
GLuint const GLchar * name
Definition: glcorearb.h:786
#define CL_SUCCESS
Definition: cl.h:163
Definition: UT_RTreeImpl.h:697
GLfloat f
Definition: glcorearb.h:1926

Definition at line 800 of file cl.hpp.

#define __INIT_CL_EXT_FCN_PTR (   name)
if(!pfn_##name) { \
pfn_##name = (PFN_##name) \
if(!pfn_##name) { \
} \
GLuint const GLchar * name
Definition: glcorearb.h:786
Definition: UT_RTreeImpl.h:697

Definition at line 196 of file cl.hpp.


Definition at line 437 of file cl.hpp.

#define __PARAM_NAME_INFO_1_0 (   F)

Definition at line 818 of file cl.hpp.


Definition at line 170 of file cl.hpp.

#define VECTOR_CLASS   std::vector

Definition at line 431 of file cl.hpp.

Typedef Documentation

typedef GLenum

Definition at line 166 of file cl.hpp.

typedef GLint

Definition at line 165 of file cl.hpp.

typedef GLuint

Definition at line 167 of file cl.hpp.

Function Documentation

CE_API cl_int ce_enqueueKernel ( const cl::CommandQueue queue,
const cl::Kernel kernel,
const cl::NDRange offset,
const cl::NDRange global,
const cl::NDRange local,
const std::vector< cl::Event > *  events,
cl::Event event