cl.hpp File Reference

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

`#include <CL/opencl.h>`
`#include <utility>`
`#include <limits>`
`#include <iterator>`
`#include <vector>`
`#include <string>`
`#include <cstring>`
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::size_t< N >
| class used to interface between C++ and OpenCL C calls that require arrays of size_t values, whose size is known statically. More...
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 >
class | cl::detail::Wrapper< cl_device_id >
struct | cl::ImageFormat
| Adds constructors and member functions for cl_image_format. More...
class | cl::Device
| Class interface for cl_device_id. More...
class | cl::Platform
| Class interface for cl_platform_id. More...
class | cl::Context
| Class interface for cl_context. More...
class | cl::Event
| Class interface for cl_event. More...
class | cl::Memory
| Class interface for cl_mem. More...
class | cl::Buffer
| Class interface for Buffer Memory Objects. More...
class | cl::BufferGL
| Class interface for GL Buffer Memory Objects. More...
class | cl::Image
| C++ base class for Image Memory objects. More...
class | cl::Image2D
| Class interface for 2D Image Memory objects. More...
class | cl::CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
| Class interface for GL 2D Image Memory objects. More...
class | cl::Image3D
| Class interface for 3D Image Memory objects. More...
class | cl::Image3DGL
| Class interface for GL 3D Image Memory objects. More...
class | cl::BufferRenderGL
| Class interface for GL Render Buffer Memory Objects. More...
class | cl::Sampler
| Class interface for cl_sampler. More...
class | cl::NDRange
| Class interface for specifying NDRange values. More...
struct | cl::LocalSpaceArg
| Local address wrapper for use with Kernel::setArg. More...
struct | cl::detail::KernelArgumentHandler< T >
struct | cl::detail::KernelArgumentHandler< LocalSpaceArg >
class | cl::Kernel
| Class interface for cl_kernel. More...
class | cl::Program
| Program interface that implements cl_program. More...
class | cl::CommandQueue
| CommandQueue interface for cl_command_queue. More...
struct | cl::EnqueueArgs
class | cl::detail::NullType
struct | cl::detail::SetArg< index, T0 >
struct | cl::detail::SetArg< index, NullType >
class | cl::detail::KernelFunctorGlobal< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31 >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31 >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, T8, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, T7, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, T6, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, T5, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, T4, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, T3, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, T2, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, T1, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::detail::functionImplementation_< T0, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType >
struct | cl::make_kernel< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25, T26, T27, T28, T29, T30, T31 >

## Namespaces

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

## Macros

#define | CL_HPP_NOEXCEPT
#define | __CL_EXPLICIT_CONSTRUCTORS
#define | CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
#define | CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
#define | CL_CALLBACK
#define | __ERR_STR(x) NULL
#define | VECTOR_CLASS std::vector
#define | __DEFAULT_NOT_INITIALIZED 1
#define | __DEFAULT_BEING_INITIALIZED 2
#define | __DEFAULT_INITIALIZED 4
#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)
void | cl::detail::fence ()
template<typename Functor , typename T >
cl_int | cl::detail::getInfoHelper (Functor f, cl_uint name, T *param, long)
template<typename Func , typename T >
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, VECTOR_CLASS< T > *param, long)
template<typename Func , typename T >
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, VECTOR_CLASS< T > *param, int, typename T::cl_type=0)
template<typename Func >
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, VECTOR_CLASS< char * > *param, int)
template<typename Func >
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, STRING_CLASS *param, long)
template<typename Func , ::size_t N>
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, size_t< N > *param, long)
template<typename Func , typename T >
cl_int | cl::detail::getInfoHelper (Func f, cl_uint name, T *param, int, typename T::cl_type=0)
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)
template<typename IteratorType >
cl_int | cl::copy (IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer)
template<typename IteratorType >
cl_int | cl::copy (const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator)
template<typename IteratorType >
cl_int | cl::copy (const CommandQueue &queue, IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer)
template<typename IteratorType >
cl_int | cl::copy (const CommandQueue &queue, const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator)
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED LocalSpaceArg | cl::__local (::size_t size) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
| Helper function for generating LocalSpaceArg objects. Deprecated. Replaced with Local. More...
LocalSpaceArg | cl::Local (::size_t size)
| Helper function for generating LocalSpaceArg objects. More...
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)
void * | cl::enqueueMapBuffer (const Buffer &buffer, cl_bool blocking, cl_map_flags flags, ::size_t offset, ::size_t size, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL, cl_int *err=NULL)
cl_int | cl::enqueueUnmapMemObject (const Memory &memory, void *mapped_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)

## Detailed Description

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

Author
  Benedict R. Gaster, Laurent Morichetti and Lee Howes

Additions and fixes from: Brian Cole, March 3rd 2010 and April 2012 Matt Gruenke, April 2012. Bruce Merry, February 2013. Tom Deakin and Simon McIntosh-Smith, July 2013

Version
  1.2.7

Date
  January 2015

Optional extension support

      cl
      cl_ext_device_fission
     #define USE_CL_DEVICE_FISSION

Definition in file cl.hpp.

## Macro Definition Documentation

## __CL_DECLARE_PARAM_TRAITS

#define __CL_DECLARE_PARAM_TRAITS | ( |  | token,
|  |  | param_name,
|  |  | T
| ) |  |

Value:
struct token; \
template<> \
struct param_traits<detail:: token,param_name> \
{ \
enum { value = param_name }; \
typedef T param_type; \
};

Definition at line 1367 of file cl.hpp.

## __CL_EXPLICIT_CONSTRUCTORS

#define __CL_EXPLICIT_CONSTRUCTORS

Definition at line 97 of file cl.hpp.

## __DEFAULT_BEING_INITIALIZED

#define __DEFAULT_BEING_INITIALIZED 2

Definition at line 952 of file cl.hpp.

## __DEFAULT_INITIALIZED

#define __DEFAULT_INITIALIZED 4

Definition at line 953 of file cl.hpp.

## __DEFAULT_NOT_INITIALIZED

#define __DEFAULT_NOT_INITIALIZED 1

Definition at line 951 of file cl.hpp.

## __ERR_STR

#define __ERR_STR | ( |  | x | ) | NULL

Definition at line 223 of file cl.hpp.

## __PARAM_NAME_INFO_1_0

#define __PARAM_NAME_INFO_1_0 | ( |  | F | ) |

Definition at line 1183 of file cl.hpp.

## CL_CALLBACK

#define CL_CALLBACK

Definition at line 110 of file cl.hpp.

## CL_EXT_PREFIX__VERSION_1_1_DEPRECATED

#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED

Definition at line 103 of file cl.hpp.

## CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED

#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED

Definition at line 106 of file cl.hpp.

## CL_HPP_NOEXCEPT

#define CL_HPP_NOEXCEPT

Definition at line 87 of file cl.hpp.

## VECTOR_CLASS

#define VECTOR_CLASS std::vector

Definition at line 560 of file cl.hpp.