OpenCL C++ Wrapper API 1.1
Classes | Namespaces | Defines | Typedefs | Functions | Variables
CL/cl.hpp File Reference

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

#include <GL/gl.h>
#include <CL/opencl.h>
#include <utility>
#include <limits>
#include <vector>
#include <string>
#include <cstring>
#include <tr1/functional>
#include <exception>

Go to the source code of this file.

Classes

class  cl::Error
 Exception class. More...
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::GetInfoHelper< Func, size_t< N > >
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...

Namespaces

namespace  cl
 

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


namespace  cl::detail

Defines

#define CL_CALLBACK
#define __INIT_CL_EXT_FCN_PTR(name)
#define __CL_ENABLE_EXCEPTIONS
#define __ERR_STR(x)   #x
#define VECTOR_CLASS   std::vector
#define __MAX_DEFAULT_VECTOR_SIZE   10
#define __DEFAULT_NOT_INITIALIZED   1
#define __DEFAULT_BEING_INITIALIZED   2
#define __DEFAULT_INITIALIZED   4
#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 std::string cl::STRING_CLASS

Functions

int cl::detail::compare_exchange (volatile int *dest, int exchange, int comparand)
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)
static cl_int cl::detail::errHandler (cl_int err, const char *errStr=NULL) throw (Error)
static cl_int cl::UnloadCompiler ()
static cl_int cl::WaitForEvents (const VECTOR_CLASS< Event > &events)
LocalSpaceArg cl::__local (::size_t size)
__attribute__((weak)) volatile
int CommandQueue __attribute__((weak))
CommandQueue CommandQueue
__attribute__((weak)) volatile
cl_int CommandQueue cl_int 
cl::enqueueReadBuffer (const Buffer &buffer, cl_bool blocking,::size_t offset,::size_t size, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueWriteBuffer (const Buffer &buffer, cl_bool blocking,::size_t offset,::size_t size, const void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueCopyBuffer (const Buffer &src, const Buffer &dst,::size_t src_offset,::size_t dst_offset,::size_t size, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueReadImage (const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > &region,::size_t row_pitch,::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueWriteImage (const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > &region,::size_t row_pitch,::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueCopyImage (const Image &src, const Image &dst, const size_t< 3 > &src_origin, const size_t< 3 > &dst_origin, const size_t< 3 > &region, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueCopyImageToBuffer (const Image &src, const Buffer &dst, const size_t< 3 > &src_origin, const size_t< 3 > &region,::size_t dst_offset, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::enqueueCopyBufferToImage (const Buffer &src, const Image &dst,::size_t src_offset, const size_t< 3 > &dst_origin, const size_t< 3 > &region, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int cl::flush (void)
cl_int cl::finish (void)

Variables

static const NDRange cl::NullRange

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.


Define 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 at line 1028 of file cl.hpp.

Definition at line 214 of file cl.hpp.

Definition at line 693 of file cl.hpp.

#define __DEFAULT_INITIALIZED   4

Definition at line 694 of file cl.hpp.

#define __DEFAULT_NOT_INITIALIZED   1

Definition at line 692 of file cl.hpp.

#define __ERR_STR (   x)    #x

Definition at line 255 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)()); \
    } \
}; \
}

Definition at line 852 of file cl.hpp.

#define __INIT_CL_EXT_FCN_PTR (   name)
Value:
if(!pfn_##name) { \
        pfn_##name = (PFN_##name) \
            clGetExtensionFunctionAddress(#name); \
        if(!pfn_##name) { \
        } \
    }

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 870 of file cl.hpp.

#define CL_CALLBACK

Definition at line 168 of file cl.hpp.

#define VECTOR_CLASS   std::vector

Definition at line 433 of file cl.hpp.

 All Classes Namespaces Files Functions Variables Typedefs Defines