Analysis Software
Documentation for sPHENIX simulation software
 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 <GL/gl.h>
#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

namespace  cl
 Forward declaration of incomplete type cl::sycl::queue.
 
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 __DECLARE_PARAM_TRAITS(token, param_name, T)
 

Typedefs

typedef std::string cl::STRING_CLASS
 

Functions

 cl::detail::__PARAM_NAME_INFO_1_0 (__DECLARE_PARAM_TRAITS)
 
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)
 
static cl_int cl::UnloadCompiler ()
 
static cl_int cl::WaitForEvents (const VECTOR_CLASS< Event > &events)
 
LocalSpaceArg cl::__local (::size_t size)
 

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.

Macro Definition Documentation

#define __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 935 of file cl.hpp.

View newest version in sPHENIX GitHub at line 935 of file cl.hpp

#define __ERR_STR (   x)    NULL

Definition at line 247 of file cl.hpp.

View newest version in sPHENIX GitHub at line 247 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 760 of file cl.hpp.

View newest version in sPHENIX GitHub at line 760 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 191 of file cl.hpp.

View newest version in sPHENIX GitHub at line 191 of file cl.hpp

#define __MAX_DEFAULT_VECTOR_SIZE   10

Definition at line 425 of file cl.hpp.

View newest version in sPHENIX GitHub at line 425 of file cl.hpp

#define __PARAM_NAME_INFO_1_0 (   F)

Definition at line 778 of file cl.hpp.

View newest version in sPHENIX GitHub at line 778 of file cl.hpp

#define CL_CALLBACK

Definition at line 165 of file cl.hpp.

View newest version in sPHENIX GitHub at line 165 of file cl.hpp

#define VECTOR_CLASS   std::vector

Definition at line 419 of file cl.hpp.

View newest version in sPHENIX GitHub at line 419 of file cl.hpp