OpenCL C++ Bindings
opencl.hpp File Reference

C++ bindings for OpenCL 1.0, OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, and OpenCL 3.0. More...

Go to the source code of this file.

Classes

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::UserEvent
 Class interface for user events (a subset of cl_event's). More...
 
class  cl::Memory
 Class interface for cl_mem. More...
 
class  cl::detail::SVMTraitNull
 
class  cl::SVMTraitReadWrite< Trait >
 
class  cl::SVMTraitReadOnly< Trait >
 
class  cl::SVMTraitWriteOnly< Trait >
 
class  cl::SVMTraitCoarse< Trait >
 
class  cl::SVMTraitFine< Trait >
 
class  cl::SVMTraitAtomic< Trait >
 
class  cl::SVMAllocator< T, SVMTrait >
 
struct  cl::SVMAllocator< T, SVMTrait >::rebind< U >
 
class  cl::SVMAllocator< void, SVMTrait >
 
struct  cl::SVMAllocator< void, SVMTrait >::rebind< U >
 
class  cl::detail::Deleter< Alloc >
 
class  cl::Buffer
 Class interface for Buffer Memory Objects. More...
 
class  cl::BufferGL
 Class interface for GL Buffer Memory Objects. More...
 
class  cl::BufferRenderGL
 Class interface for GL Render Buffer Memory Objects. More...
 
class  cl::Image
 C++ base class for Image Memory objects. More...
 
class  cl::Image1D
 Class interface for 1D Image Memory objects. More...
 
class  cl::Image1DBuffer
 Image interface for 1D buffer images. More...
 
class  cl::Image1DArray
 Image interface for arrays of 1D images. More...
 
class  cl::Image2D
 Class interface for 2D Image Memory objects. More...
 
class  cl::Image2DGL
 Class interface for GL 2D Image Memory objects. More...
 
class  cl::Image2DArray
 Image interface for arrays of 2D images. 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::ImageGL
 general image interface for GL interop. We abstract the 2D and 3D GL images into a single instance here that wraps all GL sourced images on the grounds that setup information was performed by OpenCL anyway. More...
 
class  cl::Pipe
 Class interface for Pipe 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, typename std::enable_if<!std::is_base_of< cl::Memory, T >::value >::type >
 
struct  cl::detail::KernelArgumentHandler< T, typename std::enable_if< std::is_base_of< cl::Memory, T >::value >::type >
 
struct  cl::detail::KernelArgumentHandler< LocalSpaceArg, void >
 
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...
 
class  cl::DeviceCommandQueue
 DeviceCommandQueue interface for device cl_command_queues. More...
 
struct  cl::detail::KernelArgumentHandler< cl::DeviceCommandQueue, void >
 
class  cl::EnqueueArgs
 
class  cl::KernelFunctor< Ts >
 
struct  cl::compatibility::make_kernel< Ts >
 

Namespaces

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

Macros

#define CL_HPP_TARGET_OPENCL_VERSION   300
 
#define CL_TARGET_OPENCL_VERSION   CL_HPP_TARGET_OPENCL_VERSION
 
#define CL_USE_DEPRECATED_OPENCL_1_0_APIS
 
#define CL_USE_DEPRECATED_OPENCL_1_1_APIS
 
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
 
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS
 
#define CL_USE_DEPRECATED_OPENCL_2_1_APIS
 
#define CL_USE_DEPRECATED_OPENCL_2_2_APIS
 
#define CL_HPP_NOEXCEPT_
 
#define CL_HPP_DEFINE_STATIC_MEMBER_   __attribute__((weak))
 
#define CL_API_PREFIX__VERSION_1_1_DEPRECATED
 
#define CL_API_SUFFIX__VERSION_1_1_DEPRECATED
 
#define CL_API_PREFIX__VERSION_1_2_DEPRECATED
 
#define CL_API_SUFFIX__VERSION_1_2_DEPRECATED
 
#define CL_API_PREFIX__VERSION_2_2_DEPRECATED
 
#define CL_API_SUFFIX__VERSION_2_2_DEPRECATED
 
#define CL_CALLBACK
 
#define CL_HPP_INIT_CL_EXT_FCN_PTR_(name)
 
#define CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_(platform, name)
 
#define CL_HPP_ERR_STR_(x)   NULL
 
#define CL_HPP_PARAM_NAME_INFO_1_0_(F)
 
#define CL_HPP_PARAM_NAME_INFO_1_1_(F)
 
#define CL_HPP_PARAM_NAME_INFO_1_2_(F)
 
#define CL_HPP_PARAM_NAME_INFO_2_0_(F)
 
#define CL_HPP_PARAM_NAME_INFO_SUBGROUP_KHR_(F)
 
#define CL_HPP_PARAM_NAME_INFO_IL_KHR_(F)
 
#define CL_HPP_PARAM_NAME_INFO_2_1_(F)
 
#define CL_HPP_PARAM_NAME_INFO_2_2_(F)
 
#define CL_HPP_PARAM_NAME_DEVICE_FISSION_(F)
 
#define CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_CL3_SHARED_(F)
 
#define CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_KHRONLY_(F)    F(cl_device_info, CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR, cl_version_khr)
 
#define CL_HPP_PARAM_NAME_INFO_3_0_(F)
 
#define CL_HPP_DECLARE_PARAM_TRAITS_(token, param_name, T)
 
#define CL_HPP_PARAM_NAME_INFO_1_0_DEPRECATED_IN_2_0_(F)    F(cl_device_info, CL_DEVICE_QUEUE_PROPERTIES, cl_command_queue_properties)
 
#define CL_HPP_PARAM_NAME_INFO_1_1_DEPRECATED_IN_2_0_(F)    F(cl_device_info, CL_DEVICE_HOST_UNIFIED_MEMORY, cl_bool)
 
#define CL_HPP_PARAM_NAME_INFO_1_2_DEPRECATED_IN_2_0_(F)    F(cl_image_info, CL_IMAGE_BUFFER, cl::Buffer)
 

Typedefs

using cl::size_type = size_t
 
template<class T , class Alloc = std::allocator<T>>
using cl::vector = std::vector< T, Alloc >
 
using cl::string = std::string
 
template<class T , class D >
using cl::pointer = std::unique_ptr< T, D >
 
template<class T , size_type N>
using cl::array = std::array< T, N >
 
using cl::detail::size_t_array = array< size_type, 3 >
 
using cl::BuildLogType = vector< std::pair< cl::Device, typename detail::param_traits< detail::cl_program_build_info, CL_PROGRAM_BUILD_LOG >::param_type > >
 
template<class T >
using cl::coarse_svm_vector = vector< T, cl::SVMAllocator< int, cl::SVMTraitCoarse<> > >
 Vector alias to simplify contruction of coarse-grained SVM containers. More...
 
template<class T >
using cl::fine_svm_vector = vector< T, cl::SVMAllocator< int, cl::SVMTraitFine<> > >
 Vector alias to simplify contruction of fine-grained SVM containers. More...
 
template<class T >
using cl::atomic_svm_vector = vector< T, cl::SVMAllocator< int, cl::SVMTraitAtomic<> > >
 Vector alias to simplify contruction of fine-grained SVM containers that support platform atomics. More...
 

Enumerations

enum class  QueueProperties : cl_command_queue_properties { None = 0 , Profiling = CL_QUEUE_PROFILING_ENABLE , OutOfOrder = CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE }
 
enum class  DeviceQueueProperties : cl_command_queue_properties { None = 0 , Profiling = CL_QUEUE_PROFILING_ENABLE }
 

Functions

template<typename Functor , typename T >
cl_int cl::detail::getInfoHelper (Functor f, cl_uint name, T *param, long)
 
template<typename Func >
cl_int cl::detail::getInfoHelper (Func f, cl_uint name, vector< vector< unsigned char > > *param, int)
 
template<typename Func , typename T >
cl_int cl::detail::getInfoHelper (Func f, cl_uint name, vector< T > *param, long)
 
template<typename Func , typename T >
cl_int cl::detail::getInfoHelper (Func f, cl_uint name, vector< T > *param, int, typename T::cl_type=0)
 
template<typename Func >
cl_int cl::detail::getInfoHelper (Func f, cl_uint name, string *param, long)
 
template<typename Func , size_type N>
cl_int cl::detail::getInfoHelper (Func f, cl_uint name, array< size_type, 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 T >
bool cl::detail::operator== (const Wrapper< T > &lhs, const Wrapper< T > &rhs)
 
template<typename T >
bool cl::detail::operator!= (const Wrapper< T > &lhs, const Wrapper< T > &rhs)
 
CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int cl::UnloadCompiler () CL_API_SUFFIX__VERSION_1_1_DEPRECATED
 
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)
 
template<typename T >
cl_int cl::enqueueMapSVM (T *ptr, cl_bool blocking, cl_map_flags flags, size_type size, const vector< Event > *events=NULL, Event *event=NULL)
 
template<class T , class Alloc , class... Args>
cl::pointer< T, detail::Deleter< Alloc > > cl::allocate_pointer (const Alloc &alloc_, Args &&... args)
 
template<class T , class SVMTrait , class... Args>
cl::pointer< T, detail::Deleter< SVMAllocator< T, SVMTrait > > > cl::allocate_svm (Args... args)
 
template<class T , class SVMTrait , class... Args>
cl::pointer< T, detail::Deleter< SVMAllocator< T, SVMTrait > > > cl::allocate_svm (const cl::Context &c, Args... args)
 
LocalSpaceArg cl::Local (size_type size)
 Helper function for generating LocalSpaceArg objects. More...
 
Program cl::linkProgram (Program input1, Program input2, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL, cl_int *err=NULL)
 
Program cl::linkProgram (vector< Program > inputPrograms, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL, cl_int *err=NULL)
 
QueueProperties cl::operator| (QueueProperties lhs, QueueProperties rhs)
 
QueueProperties cl::operator& (QueueProperties lhs, QueueProperties rhs)
 
DeviceQueueProperties cl::operator| (DeviceQueueProperties lhs, DeviceQueueProperties rhs)
 
cl_int cl::enqueueReadBuffer (const Buffer &buffer, cl_bool blocking, size_type offset, size_type size, void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueWriteBuffer (const Buffer &buffer, cl_bool blocking, size_type offset, size_type size, const void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
void * cl::enqueueMapBuffer (const Buffer &buffer, cl_bool blocking, cl_map_flags flags, size_type offset, size_type size, const vector< Event > *events=NULL, Event *event=NULL, cl_int *err=NULL)
 
template<typename T , class D >
cl_int cl::enqueueMapSVM (cl::pointer< T, D > &ptr, cl_bool blocking, cl_map_flags flags, size_type size, const vector< Event > *events=NULL, Event *event=NULL)
 
template<typename T , class Alloc >
cl_int cl::enqueueMapSVM (cl::vector< T, Alloc > &container, cl_bool blocking, cl_map_flags flags, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueUnmapMemObject (const Memory &memory, void *mapped_ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
template<typename T >
cl_int cl::enqueueUnmapSVM (T *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
template<typename T , class D >
cl_int cl::enqueueUnmapSVM (cl::pointer< T, D > &ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
template<typename T , class Alloc >
cl_int cl::enqueueUnmapSVM (cl::vector< T, Alloc > &container, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueCopyBuffer (const Buffer &src, const Buffer &dst, size_type src_offset, size_type dst_offset, size_type size, const vector< Event > *events=NULL, Event *event=NULL)
 
template<typename T , class Alloc >
cl_int cl::mapSVM (cl::vector< T, Alloc > &container)
 
template<typename T , class Alloc >
cl_int cl::unmapSVM (cl::vector< T, Alloc > &container)
 
cl_int cl::enqueueReadBufferRect (const Buffer &buffer, cl_bool blocking, const array< size_type, 3 > &buffer_offset, const array< size_type, 3 > &host_offset, const array< size_type, 3 > &region, size_type buffer_row_pitch, size_type buffer_slice_pitch, size_type host_row_pitch, size_type host_slice_pitch, void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueWriteBufferRect (const Buffer &buffer, cl_bool blocking, const array< size_type, 3 > &buffer_offset, const array< size_type, 3 > &host_offset, const array< size_type, 3 > &region, size_type buffer_row_pitch, size_type buffer_slice_pitch, size_type host_row_pitch, size_type host_slice_pitch, const void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueCopyBufferRect (const Buffer &src, const Buffer &dst, const array< size_type, 3 > &src_origin, const array< size_type, 3 > &dst_origin, const array< size_type, 3 > &region, size_type src_row_pitch, size_type src_slice_pitch, size_type dst_row_pitch, size_type dst_slice_pitch, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueReadImage (const Image &image, cl_bool blocking, const array< size_type, 3 > &origin, const array< size_type, 3 > &region, size_type row_pitch, size_type slice_pitch, void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueWriteImage (const Image &image, cl_bool blocking, const array< size_type, 3 > &origin, const array< size_type, 3 > &region, size_type row_pitch, size_type slice_pitch, const void *ptr, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueCopyImage (const Image &src, const Image &dst, const array< size_type, 3 > &src_origin, const array< size_type, 3 > &dst_origin, const array< size_type, 3 > &region, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueCopyImageToBuffer (const Image &src, const Buffer &dst, const array< size_type, 3 > &src_origin, const array< size_type, 3 > &region, size_type dst_offset, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::enqueueCopyBufferToImage (const Buffer &src, const Image &dst, size_type src_offset, const array< size_type, 3 > &dst_origin, const array< size_type, 3 > &region, const vector< Event > *events=NULL, Event *event=NULL)
 
cl_int cl::flush (void)
 
cl_int cl::finish (void)
 

Variables

cl::Image2DGL cl::CL_API_SUFFIX__VERSION_1_1_DEPRECATED
 

Detailed Description

C++ bindings for OpenCL 1.0, OpenCL 1.1, OpenCL 1.2, OpenCL 2.0, OpenCL 2.1, OpenCL 2.2, and OpenCL 3.0.

Author
Lee Howes and Bruce Merry

Derived from the OpenCL 1.x C++ bindings written by Benedict R. Gaster, Laurent Morichetti and Lee Howes With 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 James Price, 2015-

Version
2.2.0
Date
2019-09-18

Optional extension support

  cl_ext_device_fission
  #define CL_HPP_USE_CL_DEVICE_FISSION
  cl_khr_d3d10_sharing
  #define CL_HPP_USE_DX_INTEROP
  cl_khr_sub_groups
  #define CL_HPP_USE_CL_SUB_GROUPS_KHR
  cl_khr_image2d_from_buffer
  #define CL_HPP_USE_CL_IMAGE2D_FROM_BUFFER_KHR

Doxygen documentation for this header is available here:

http://khronosgroup.github.io/OpenCL-CLHPP/

The latest version of this header can be found on the GitHub releases page:

https://github.com/KhronosGroup/OpenCL-CLHPP/releases

Bugs and patches can be submitted to the GitHub repository:

https://github.com/KhronosGroup/OpenCL-CLHPP

Definition in file opencl.hpp.

Macro Definition Documentation

◆ CL_API_PREFIX__VERSION_1_1_DEPRECATED

#define CL_API_PREFIX__VERSION_1_1_DEPRECATED

Definition at line 560 of file opencl.hpp.

◆ CL_API_PREFIX__VERSION_1_2_DEPRECATED

#define CL_API_PREFIX__VERSION_1_2_DEPRECATED

Definition at line 567 of file opencl.hpp.

◆ CL_API_PREFIX__VERSION_2_2_DEPRECATED

#define CL_API_PREFIX__VERSION_2_2_DEPRECATED

Definition at line 574 of file opencl.hpp.

◆ CL_API_SUFFIX__VERSION_1_1_DEPRECATED

#define CL_API_SUFFIX__VERSION_1_1_DEPRECATED

Definition at line 563 of file opencl.hpp.

◆ CL_API_SUFFIX__VERSION_1_2_DEPRECATED

#define CL_API_SUFFIX__VERSION_1_2_DEPRECATED

Definition at line 570 of file opencl.hpp.

◆ CL_API_SUFFIX__VERSION_2_2_DEPRECATED

#define CL_API_SUFFIX__VERSION_2_2_DEPRECATED

Definition at line 577 of file opencl.hpp.

◆ CL_CALLBACK

#define CL_CALLBACK

Definition at line 581 of file opencl.hpp.

◆ CL_HPP_DECLARE_PARAM_TRAITS_

#define CL_HPP_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 1454 of file opencl.hpp.

◆ CL_HPP_DEFINE_STATIC_MEMBER_

#define CL_HPP_DEFINE_STATIC_MEMBER_   __attribute__((weak))

Definition at line 554 of file opencl.hpp.

◆ CL_HPP_ERR_STR_

#define CL_HPP_ERR_STR_ (   x)    NULL

Definition at line 795 of file opencl.hpp.

◆ CL_HPP_INIT_CL_EXT_FCN_PTR_

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

Definition at line 723 of file opencl.hpp.

◆ CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_

#define CL_HPP_INIT_CL_EXT_FCN_PTR_PLATFORM_ (   platform,
  name 
)
Value:
if (!pfn_##name) { \
pfn_##name = (PFN_##name) \
clGetExtensionFunctionAddressForPlatform(platform, #name); \
if (!pfn_##name) { \
} \
}

Definition at line 731 of file opencl.hpp.

◆ CL_HPP_NOEXCEPT_

#define CL_HPP_NOEXCEPT_

Definition at line 544 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_CL3_SHARED_

#define CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_CL3_SHARED_ (   F)
Value:
F(cl_platform_info, CL_PLATFORM_NUMERIC_VERSION_KHR, cl_version_khr) \
F(cl_platform_info, CL_PLATFORM_EXTENSIONS_WITH_VERSION_KHR, cl::vector<cl_name_version_khr>) \
\
F(cl_device_info, CL_DEVICE_NUMERIC_VERSION_KHR, cl_version_khr) \
F(cl_device_info, CL_DEVICE_EXTENSIONS_WITH_VERSION_KHR, cl::vector<cl_name_version_khr>) \
F(cl_device_info, CL_DEVICE_ILS_WITH_VERSION_KHR, cl::vector<cl_name_version_khr>) \
F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION_KHR, cl::vector<cl_name_version_khr>)

Definition at line 1414 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_KHRONLY_

#define CL_HPP_PARAM_NAME_CL_KHR_EXTENDED_VERSIONING_KHRONLY_ (   F)     F(cl_device_info, CL_DEVICE_OPENCL_C_NUMERIC_VERSION_KHR, cl_version_khr)

Definition at line 1423 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_DEVICE_FISSION_

#define CL_HPP_PARAM_NAME_DEVICE_FISSION_ (   F)
Value:
F(cl_device_info, CL_DEVICE_PARENT_DEVICE_EXT, cl_device_id) \
F(cl_device_info, CL_DEVICE_PARTITION_TYPES_EXT, cl::vector<cl_device_partition_property_ext>) \
F(cl_device_info, CL_DEVICE_AFFINITY_DOMAINS_EXT, cl::vector<cl_device_partition_property_ext>) \
F(cl_device_info, CL_DEVICE_REFERENCE_COUNT_EXT , cl_uint) \
F(cl_device_info, CL_DEVICE_PARTITION_STYLE_EXT, cl::vector<cl_device_partition_property_ext>)

Definition at line 1407 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_0_

#define CL_HPP_PARAM_NAME_INFO_1_0_ (   F)

Definition at line 1178 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_0_DEPRECATED_IN_2_0_

#define CL_HPP_PARAM_NAME_INFO_1_0_DEPRECATED_IN_2_0_ (   F)     F(cl_device_info, CL_DEVICE_QUEUE_PROPERTIES, cl_command_queue_properties)

Definition at line 1493 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_1_

#define CL_HPP_PARAM_NAME_INFO_1_1_ (   F)
Value:
F(cl_context_info, CL_CONTEXT_NUM_DEVICES, cl_uint)\
F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, cl_uint) \
F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, cl_uint) \
F(cl_device_info, CL_DEVICE_OPENCL_C_VERSION, string) \
\
F(cl_mem_info, CL_MEM_ASSOCIATED_MEMOBJECT, cl::Memory) \
F(cl_mem_info, CL_MEM_OFFSET, size_type) \
\
F(cl_kernel_work_group_info, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, size_type) \
F(cl_kernel_work_group_info, CL_KERNEL_PRIVATE_MEM_SIZE, cl_ulong) \
\
F(cl_event_info, CL_EVENT_CONTEXT, cl::Context)
Class interface for cl_context.
Definition: opencl.hpp:2839
Class interface for cl_mem.
Definition: opencl.hpp:3434

Definition at line 1301 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_1_DEPRECATED_IN_2_0_

#define CL_HPP_PARAM_NAME_INFO_1_1_DEPRECATED_IN_2_0_ (   F)     F(cl_device_info, CL_DEVICE_HOST_UNIFIED_MEMORY, cl_bool)

Definition at line 1496 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_2_

#define CL_HPP_PARAM_NAME_INFO_1_2_ (   F)

Definition at line 1321 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_1_2_DEPRECATED_IN_2_0_

#define CL_HPP_PARAM_NAME_INFO_1_2_DEPRECATED_IN_2_0_ (   F)     F(cl_image_info, CL_IMAGE_BUFFER, cl::Buffer)

Definition at line 1499 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_2_0_

#define CL_HPP_PARAM_NAME_INFO_2_0_ (   F)
Value:
F(cl_device_info, CL_DEVICE_QUEUE_ON_HOST_PROPERTIES, cl_command_queue_properties) \
F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES, cl_command_queue_properties) \
F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_PREFERRED_SIZE, cl_uint) \
F(cl_device_info, CL_DEVICE_QUEUE_ON_DEVICE_MAX_SIZE, cl_uint) \
F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_QUEUES, cl_uint) \
F(cl_device_info, CL_DEVICE_MAX_ON_DEVICE_EVENTS, cl_uint) \
F(cl_device_info, CL_DEVICE_MAX_PIPE_ARGS, cl_uint) \
F(cl_device_info, CL_DEVICE_PIPE_MAX_ACTIVE_RESERVATIONS, cl_uint) \
F(cl_device_info, CL_DEVICE_PIPE_MAX_PACKET_SIZE, cl_uint) \
F(cl_device_info, CL_DEVICE_SVM_CAPABILITIES, cl_device_svm_capabilities) \
F(cl_device_info, CL_DEVICE_PREFERRED_PLATFORM_ATOMIC_ALIGNMENT, cl_uint) \
F(cl_device_info, CL_DEVICE_PREFERRED_GLOBAL_ATOMIC_ALIGNMENT, cl_uint) \
F(cl_device_info, CL_DEVICE_PREFERRED_LOCAL_ATOMIC_ALIGNMENT, cl_uint) \
F(cl_device_info, CL_DEVICE_IMAGE_PITCH_ALIGNMENT, cl_uint) \
F(cl_device_info, CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT, cl_uint) \
F(cl_device_info, CL_DEVICE_MAX_READ_WRITE_IMAGE_ARGS, cl_uint ) \
F(cl_device_info, CL_DEVICE_MAX_GLOBAL_VARIABLE_SIZE, size_type ) \
F(cl_device_info, CL_DEVICE_GLOBAL_VARIABLE_PREFERRED_TOTAL_SIZE, size_type ) \
F(cl_profiling_info, CL_PROFILING_COMMAND_COMPLETE, cl_ulong) \
F(cl_kernel_exec_info, CL_KERNEL_EXEC_INFO_SVM_FINE_GRAIN_SYSTEM, cl_bool) \
F(cl_kernel_exec_info, CL_KERNEL_EXEC_INFO_SVM_PTRS, void**) \
F(cl_command_queue_info, CL_QUEUE_SIZE, cl_uint) \
F(cl_mem_info, CL_MEM_USES_SVM_POINTER, cl_bool) \
F(cl_program_build_info, CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE, size_type) \
F(cl_pipe_info, CL_PIPE_PACKET_SIZE, cl_uint) \
F(cl_pipe_info, CL_PIPE_MAX_PACKETS, cl_uint)

Definition at line 1354 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_2_1_

#define CL_HPP_PARAM_NAME_INFO_2_1_ (   F)
Value:
F(cl_platform_info, CL_PLATFORM_HOST_TIMER_RESOLUTION, cl_ulong) \
F(cl_program_info, CL_PROGRAM_IL, cl::vector<unsigned char>) \
F(cl_device_info, CL_DEVICE_MAX_NUM_SUB_GROUPS, cl_uint) \
F(cl_device_info, CL_DEVICE_IL_VERSION, string) \
F(cl_device_info, CL_DEVICE_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, cl_bool) \
F(cl_command_queue_info, CL_QUEUE_DEVICE_DEFAULT, cl::DeviceCommandQueue) \
F(cl_kernel_sub_group_info, CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE, size_type) \
F(cl_kernel_sub_group_info, CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE, size_type) \
F(cl_kernel_sub_group_info, CL_KERNEL_LOCAL_SIZE_FOR_SUB_GROUP_COUNT, cl::detail::size_t_array) \
F(cl_kernel_sub_group_info, CL_KERNEL_MAX_NUM_SUB_GROUPS, size_type) \
F(cl_kernel_sub_group_info, CL_KERNEL_COMPILE_NUM_SUB_GROUPS, size_type)
DeviceCommandQueue interface for device cl_command_queues.
Definition: opencl.hpp:8871

Definition at line 1390 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_2_2_

#define CL_HPP_PARAM_NAME_INFO_2_2_ (   F)
Value:
F(cl_program_info, CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT, cl_bool) \
F(cl_program_info, CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT, cl_bool)

Definition at line 1403 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_3_0_

#define CL_HPP_PARAM_NAME_INFO_3_0_ (   F)
Value:
F(cl_platform_info, CL_PLATFORM_NUMERIC_VERSION, cl_version) \
F(cl_platform_info, CL_PLATFORM_EXTENSIONS_WITH_VERSION, cl::vector<cl_name_version>) \
\
F(cl_device_info, CL_DEVICE_NUMERIC_VERSION, cl_version) \
F(cl_device_info, CL_DEVICE_EXTENSIONS_WITH_VERSION, cl::vector<cl_name_version>) \
F(cl_device_info, CL_DEVICE_ILS_WITH_VERSION, cl::vector<cl_name_version>) \
F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS_WITH_VERSION, cl::vector<cl_name_version>) \
F(cl_device_info, CL_DEVICE_ATOMIC_MEMORY_CAPABILITIES, cl_device_atomic_capabilities) \
F(cl_device_info, CL_DEVICE_ATOMIC_FENCE_CAPABILITIES, cl_device_atomic_capabilities) \
F(cl_device_info, CL_DEVICE_NON_UNIFORM_WORK_GROUP_SUPPORT, cl_bool) \
F(cl_device_info, CL_DEVICE_OPENCL_C_ALL_VERSIONS, cl::vector<cl_name_version>) \
F(cl_device_info, CL_DEVICE_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, size_type) \
F(cl_device_info, CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT, cl_bool) \
F(cl_device_info, CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT, cl_bool) \
F(cl_device_info, CL_DEVICE_OPENCL_C_FEATURES, cl::vector<cl_name_version>) \
F(cl_device_info, CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES, cl_device_device_enqueue_capabilities) \
F(cl_device_info, CL_DEVICE_PIPE_SUPPORT, cl_bool) \
F(cl_device_info, CL_DEVICE_LATEST_CONFORMANCE_VERSION_PASSED, string) \
\
F(cl_command_queue_info, CL_QUEUE_PROPERTIES_ARRAY, cl::vector<cl_queue_properties>) \
F(cl_mem_info, CL_MEM_PROPERTIES, cl::vector<cl_mem_properties>) \
F(cl_pipe_info, CL_PIPE_PROPERTIES, cl::vector<cl_pipe_properties>) \
F(cl_sampler_info, CL_SAMPLER_PROPERTIES, cl::vector<cl_sampler_properties>)

Definition at line 1426 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_IL_KHR_

#define CL_HPP_PARAM_NAME_INFO_IL_KHR_ (   F)
Value:
F(cl_device_info, CL_DEVICE_IL_VERSION_KHR, string) \
F(cl_program_info, CL_PROGRAM_IL_KHR, cl::vector<unsigned char>)

Definition at line 1386 of file opencl.hpp.

◆ CL_HPP_PARAM_NAME_INFO_SUBGROUP_KHR_

#define CL_HPP_PARAM_NAME_INFO_SUBGROUP_KHR_ (   F)
Value:
F(cl_kernel_sub_group_info, CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR, size_type) \
F(cl_kernel_sub_group_info, CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR, size_type)

Definition at line 1382 of file opencl.hpp.

◆ CL_HPP_TARGET_OPENCL_VERSION

#define CL_HPP_TARGET_OPENCL_VERSION   300

Definition at line 446 of file opencl.hpp.

◆ CL_TARGET_OPENCL_VERSION

#define CL_TARGET_OPENCL_VERSION   CL_HPP_TARGET_OPENCL_VERSION

Definition at line 468 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_1_0_APIS

#define CL_USE_DEPRECATED_OPENCL_1_0_APIS

Definition at line 490 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_1_1_APIS

#define CL_USE_DEPRECATED_OPENCL_1_1_APIS

Definition at line 493 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_1_2_APIS

#define CL_USE_DEPRECATED_OPENCL_1_2_APIS

Definition at line 496 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_2_0_APIS

#define CL_USE_DEPRECATED_OPENCL_2_0_APIS

Definition at line 499 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_2_1_APIS

#define CL_USE_DEPRECATED_OPENCL_2_1_APIS

Definition at line 502 of file opencl.hpp.

◆ CL_USE_DEPRECATED_OPENCL_2_2_APIS

#define CL_USE_DEPRECATED_OPENCL_2_2_APIS

Definition at line 505 of file opencl.hpp.

Typedef Documentation

◆ size_t_array

using cl::detail::size_t_array = typedef array<size_type, 3>

Definition at line 710 of file opencl.hpp.

Function Documentation

◆ getInfo() [1/3]

template<typename Func , typename T >
cl_int cl::detail::getInfo ( Func  f,
cl_uint  name,
T *  param 
)
inline

Definition at line 1633 of file opencl.hpp.

◆ getInfo() [2/3]

template<typename Func , typename Arg0 , typename T >
cl_int cl::detail::getInfo ( Func  f,
const Arg0 &  arg0,
cl_uint  name,
T *  param 
)
inline

Definition at line 1658 of file opencl.hpp.

◆ getInfo() [3/3]

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 
)
inline

Definition at line 1666 of file opencl.hpp.

◆ getInfoHelper() [1/7]

template<typename Func , size_type N>
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
array< size_type, N > *  param,
long   
)
inline

Definition at line 1123 of file opencl.hpp.

◆ getInfoHelper() [2/7]

template<typename Func >
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
string *  param,
long   
)
inline

Definition at line 1095 of file opencl.hpp.

◆ getInfoHelper() [3/7]

template<typename Func , typename T >
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
T *  param,
int  ,
typename T::cl_type  = 0 
)
inline

Definition at line 1160 of file opencl.hpp.

◆ getInfoHelper() [4/7]

template<typename Func , typename T >
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
vector< T > *  param,
int  ,
typename T::cl_type  = 0 
)
inline

Definition at line 1063 of file opencl.hpp.

◆ getInfoHelper() [5/7]

template<typename Func , typename T >
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
vector< T > *  param,
long   
)
inline

Definition at line 1034 of file opencl.hpp.

◆ getInfoHelper() [6/7]

template<typename Func >
cl_int cl::detail::getInfoHelper ( Func  f,
cl_uint  name,
vector< vector< unsigned char > > *  param,
int   
)
inline

Definition at line 1006 of file opencl.hpp.

◆ getInfoHelper() [7/7]

template<typename Functor , typename T >
cl_int cl::detail::getInfoHelper ( Functor  f,
cl_uint  name,
T *  param,
long   
)
inline

Definition at line 998 of file opencl.hpp.

◆ operator!=()

template<typename T >
bool cl::detail::operator!= ( const Wrapper< T > &  lhs,
const Wrapper< T > &  rhs 
)
inline

Definition at line 2081 of file opencl.hpp.

◆ operator==()

template<typename T >
bool cl::detail::operator== ( const Wrapper< T > &  lhs,
const Wrapper< T > &  rhs 
)
inline

Definition at line 2075 of file opencl.hpp.