HDK
 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.

Classes

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...
 

Namespaces

 cl
 The OpenCL C++ bindings are defined within this namespace.
 
 cl::detail
 

Macros

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

Typedefs

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

Functions

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)
 

Variables

class CE_API cl::KernelFunctor
 

Detailed Description

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

Author
Benedict R. Gaster and Laurent Morichetti

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

Version
1.1
Date
June 2010

Optional extension support

  cl
  cl_ext_device_fission
                   #define USE_CL_DEVICE_FISSION

Definition in file cl.hpp.

Macro Definition Documentation

#define __CL_DECLARE_PARAM_TRAITS (   token,
  param_name,
 
)
Value:
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 978 of file cl.hpp.

#define __ERR_STR (   x)    NULL

Definition at line 254 of file cl.hpp.

#define __GET_INFO_HELPER_WITH_RETAIN (   CPP_TYPE)
Value:
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)()); \
} \
}; \
}
uint32_t cl_uint
Definition: cl_platform.h:261
int32_t cl_int
Definition: cl_platform.h:260
GLfloat f
Definition: glcorearb.h:1926
#define CL_SUCCESS
Definition: cl.h:196
GLuint const GLchar * name
Definition: glcorearb.h:786
GLenum GLfloat param
Definition: glcorearb.h:104
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697

Definition at line 802 of file cl.hpp.

#define __INIT_CL_EXT_FCN_PTR (   name)
Value:
if(!pfn_##name) { \
pfn_##name = (PFN_##name) \
if(!pfn_##name) { \
} \
}
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED void *CL_API_CALL clGetExtensionFunctionAddress(const char *func_name) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
GLuint const GLchar * name
Definition: glcorearb.h:786
if(num_boxed_items<=0)
Definition: UT_RTreeImpl.h:697

Definition at line 201 of file cl.hpp.

#define __MAX_DEFAULT_VECTOR_SIZE   10

Definition at line 439 of file cl.hpp.

#define __PARAM_NAME_INFO_1_0 (   F)

Definition at line 820 of file cl.hpp.

#define CL_CALLBACK

Definition at line 170 of file cl.hpp.

#define VECTOR_CLASS   std::vector

Definition at line 433 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 
)