57 #if defined(USE_DX_INTEROP) 58 #include <CL/cl_d3d10.h> 59 #include <CL/cl_dx9_media_sharing.h> 68 #if defined(USE_CL_DEVICE_FISSION) 69 #include <CL/cl_ext.h> 72 #if defined(__APPLE__) || defined(__MACOSX) 73 #include <OpenCL/opencl.h> 75 #include <CL/opencl.h> 78 #if (_MSC_VER >= 1700) || (__cplusplus >= 201103L) 79 #define CL_HPP_RVALUE_REFERENCES_SUPPORTED 80 #define CL_HPP_CPP11_ATOMICS_SUPPORTED 84 #if (__cplusplus >= 201103L) 85 #define CL_HPP_NOEXCEPT noexcept 87 #define CL_HPP_NOEXCEPT 94 #if defined(CL_VERSION_1_2) && !defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 95 #define __CL_EXPLICIT_CONSTRUCTORS explicit 96 #else // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 97 #define __CL_EXPLICIT_CONSTRUCTORS 98 #endif // #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 102 #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) 103 #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED 104 #endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) 105 #if !defined(CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED) 106 #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED 107 #endif // #if !defined(CL_EXT_PREFIX__VERSION_1_1_DEPRECATED) 109 #if !defined(CL_CALLBACK) 117 #if defined(__CL_ENABLE_EXCEPTIONS) 119 #endif // #if defined(__CL_ENABLE_EXCEPTIONS) 121 #if !defined(__NO_STD_VECTOR) 125 #if !defined(__NO_STD_STRING) 129 #if defined(__ANDROID__) || defined(linux) || defined(__APPLE__) || defined(__MACOSX) 148 #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) || (defined(CL_VERSION_1_1) && !defined(CL_VERSION_1_2)) 149 #define __INIT_CL_EXT_FCN_PTR(name) \ 151 pfn_##name = (PFN_##name) \ 152 clGetExtensionFunctionAddress(#name); \ 156 #endif // #if defined(CL_VERSION_1_1) 158 #if defined(CL_VERSION_1_2) 159 #define __INIT_CL_EXT_FCN_PTR_PLATFORM(platform, name) \ 161 pfn_##name = (PFN_##name) \ 162 clGetExtensionFunctionAddressForPlatform(platform, #name); \ 166 #endif // #if defined(CL_VERSION_1_1) 175 #if defined(__CL_ENABLE_EXCEPTIONS) 180 class Error :
public std::exception
184 const char * errStr_;
195 Error(cl_int err,
const char * errStr = NULL) : err_(err), errStr_(errStr)
204 virtual const char * what()
const throw ()
206 if (errStr_ == NULL) {
218 cl_int err(
void)
const {
return err_; }
221 #define __ERR_STR(x) #x 223 #define __ERR_STR(x) NULL 224 #endif // __CL_ENABLE_EXCEPTIONS 229 #if defined(__CL_ENABLE_EXCEPTIONS) 230 static inline cl_int errHandler (
232 const char * errStr = NULL)
234 if (err != CL_SUCCESS) {
235 throw Error(err, errStr);
240 static inline cl_int errHandler (cl_int err,
const char * errStr = NULL)
245 #endif // __CL_ENABLE_EXCEPTIONS 251 #if !defined(__CL_USER_OVERRIDE_ERROR_STRINGS) 252 #define __GET_DEVICE_INFO_ERR __ERR_STR(clGetDeviceInfo) 253 #define __GET_PLATFORM_INFO_ERR __ERR_STR(clGetPlatformInfo) 254 #define __GET_DEVICE_IDS_ERR __ERR_STR(clGetDeviceIDs) 255 #define __GET_PLATFORM_IDS_ERR __ERR_STR(clGetPlatformIDs) 256 #define __GET_CONTEXT_INFO_ERR __ERR_STR(clGetContextInfo) 257 #define __GET_EVENT_INFO_ERR __ERR_STR(clGetEventInfo) 258 #define __GET_EVENT_PROFILE_INFO_ERR __ERR_STR(clGetEventProfileInfo) 259 #define __GET_MEM_OBJECT_INFO_ERR __ERR_STR(clGetMemObjectInfo) 260 #define __GET_IMAGE_INFO_ERR __ERR_STR(clGetImageInfo) 261 #define __GET_SAMPLER_INFO_ERR __ERR_STR(clGetSamplerInfo) 262 #define __GET_KERNEL_INFO_ERR __ERR_STR(clGetKernelInfo) 263 #if defined(CL_VERSION_1_2) 264 #define __GET_KERNEL_ARG_INFO_ERR __ERR_STR(clGetKernelArgInfo) 265 #endif // #if defined(CL_VERSION_1_2) 266 #define __GET_KERNEL_WORK_GROUP_INFO_ERR __ERR_STR(clGetKernelWorkGroupInfo) 267 #define __GET_PROGRAM_INFO_ERR __ERR_STR(clGetProgramInfo) 268 #define __GET_PROGRAM_BUILD_INFO_ERR __ERR_STR(clGetProgramBuildInfo) 269 #define __GET_COMMAND_QUEUE_INFO_ERR __ERR_STR(clGetCommandQueueInfo) 271 #define __CREATE_CONTEXT_ERR __ERR_STR(clCreateContext) 272 #define __CREATE_CONTEXT_FROM_TYPE_ERR __ERR_STR(clCreateContextFromType) 273 #define __GET_SUPPORTED_IMAGE_FORMATS_ERR __ERR_STR(clGetSupportedImageFormats) 275 #define __CREATE_BUFFER_ERR __ERR_STR(clCreateBuffer) 276 #define __COPY_ERR __ERR_STR(cl::copy) 277 #define __CREATE_SUBBUFFER_ERR __ERR_STR(clCreateSubBuffer) 278 #define __CREATE_GL_BUFFER_ERR __ERR_STR(clCreateFromGLBuffer) 279 #define __CREATE_GL_RENDER_BUFFER_ERR __ERR_STR(clCreateFromGLBuffer) 280 #define __GET_GL_OBJECT_INFO_ERR __ERR_STR(clGetGLObjectInfo) 281 #if defined(CL_VERSION_1_2) 282 #define __CREATE_IMAGE_ERR __ERR_STR(clCreateImage) 283 #define __CREATE_GL_TEXTURE_ERR __ERR_STR(clCreateFromGLTexture) 284 #define __IMAGE_DIMENSION_ERR __ERR_STR(Incorrect image dimensions) 285 #endif // #if defined(CL_VERSION_1_2) 286 #define __CREATE_SAMPLER_ERR __ERR_STR(clCreateSampler) 287 #define __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR __ERR_STR(clSetMemObjectDestructorCallback) 289 #define __CREATE_USER_EVENT_ERR __ERR_STR(clCreateUserEvent) 290 #define __SET_USER_EVENT_STATUS_ERR __ERR_STR(clSetUserEventStatus) 291 #define __SET_EVENT_CALLBACK_ERR __ERR_STR(clSetEventCallback) 292 #define __WAIT_FOR_EVENTS_ERR __ERR_STR(clWaitForEvents) 294 #define __CREATE_KERNEL_ERR __ERR_STR(clCreateKernel) 295 #define __SET_KERNEL_ARGS_ERR __ERR_STR(clSetKernelArg) 296 #define __CREATE_PROGRAM_WITH_SOURCE_ERR __ERR_STR(clCreateProgramWithSource) 297 #define __CREATE_PROGRAM_WITH_BINARY_ERR __ERR_STR(clCreateProgramWithBinary) 298 #if defined(CL_VERSION_1_2) 299 #define __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR __ERR_STR(clCreateProgramWithBuiltInKernels) 300 #endif // #if defined(CL_VERSION_1_2) 301 #define __BUILD_PROGRAM_ERR __ERR_STR(clBuildProgram) 302 #if defined(CL_VERSION_1_2) 303 #define __COMPILE_PROGRAM_ERR __ERR_STR(clCompileProgram) 304 #define __LINK_PROGRAM_ERR __ERR_STR(clLinkProgram) 305 #endif // #if defined(CL_VERSION_1_2) 306 #define __CREATE_KERNELS_IN_PROGRAM_ERR __ERR_STR(clCreateKernelsInProgram) 308 #define __CREATE_COMMAND_QUEUE_ERR __ERR_STR(clCreateCommandQueue) 309 #define __SET_COMMAND_QUEUE_PROPERTY_ERR __ERR_STR(clSetCommandQueueProperty) 310 #define __ENQUEUE_READ_BUFFER_ERR __ERR_STR(clEnqueueReadBuffer) 311 #define __ENQUEUE_READ_BUFFER_RECT_ERR __ERR_STR(clEnqueueReadBufferRect) 312 #define __ENQUEUE_WRITE_BUFFER_ERR __ERR_STR(clEnqueueWriteBuffer) 313 #define __ENQUEUE_WRITE_BUFFER_RECT_ERR __ERR_STR(clEnqueueWriteBufferRect) 314 #define __ENQEUE_COPY_BUFFER_ERR __ERR_STR(clEnqueueCopyBuffer) 315 #define __ENQEUE_COPY_BUFFER_RECT_ERR __ERR_STR(clEnqueueCopyBufferRect) 316 #define __ENQUEUE_FILL_BUFFER_ERR __ERR_STR(clEnqueueFillBuffer) 317 #define __ENQUEUE_READ_IMAGE_ERR __ERR_STR(clEnqueueReadImage) 318 #define __ENQUEUE_WRITE_IMAGE_ERR __ERR_STR(clEnqueueWriteImage) 319 #define __ENQUEUE_COPY_IMAGE_ERR __ERR_STR(clEnqueueCopyImage) 320 #define __ENQUEUE_FILL_IMAGE_ERR __ERR_STR(clEnqueueFillImage) 321 #define __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR __ERR_STR(clEnqueueCopyImageToBuffer) 322 #define __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR __ERR_STR(clEnqueueCopyBufferToImage) 323 #define __ENQUEUE_MAP_BUFFER_ERR __ERR_STR(clEnqueueMapBuffer) 324 #define __ENQUEUE_MAP_IMAGE_ERR __ERR_STR(clEnqueueMapImage) 325 #define __ENQUEUE_UNMAP_MEM_OBJECT_ERR __ERR_STR(clEnqueueUnMapMemObject) 326 #define __ENQUEUE_NDRANGE_KERNEL_ERR __ERR_STR(clEnqueueNDRangeKernel) 327 #define __ENQUEUE_TASK_ERR __ERR_STR(clEnqueueTask) 328 #define __ENQUEUE_NATIVE_KERNEL __ERR_STR(clEnqueueNativeKernel) 329 #if defined(CL_VERSION_1_2) 330 #define __ENQUEUE_MIGRATE_MEM_OBJECTS_ERR __ERR_STR(clEnqueueMigrateMemObjects) 331 #endif // #if defined(CL_VERSION_1_2) 333 #define __ENQUEUE_ACQUIRE_GL_ERR __ERR_STR(clEnqueueAcquireGLObjects) 334 #define __ENQUEUE_RELEASE_GL_ERR __ERR_STR(clEnqueueReleaseGLObjects) 337 #define __RETAIN_ERR __ERR_STR(Retain Object) 338 #define __RELEASE_ERR __ERR_STR(Release Object) 339 #define __FLUSH_ERR __ERR_STR(clFlush) 340 #define __FINISH_ERR __ERR_STR(clFinish) 341 #define __VECTOR_CAPACITY_ERR __ERR_STR(Vector capacity error) 346 #if defined(CL_VERSION_1_2) 347 #define __CREATE_SUB_DEVICES __ERR_STR(clCreateSubDevices) 349 #define __CREATE_SUB_DEVICES __ERR_STR(clCreateSubDevicesEXT) 350 #endif // #if defined(CL_VERSION_1_2) 355 #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) || (defined(CL_VERSION_1_1) && !defined(CL_VERSION_1_2)) 356 #define __ENQUEUE_MARKER_ERR __ERR_STR(clEnqueueMarker) 357 #define __ENQUEUE_WAIT_FOR_EVENTS_ERR __ERR_STR(clEnqueueWaitForEvents) 358 #define __ENQUEUE_BARRIER_ERR __ERR_STR(clEnqueueBarrier) 359 #define __UNLOAD_COMPILER_ERR __ERR_STR(clUnloadCompiler) 360 #define __CREATE_GL_TEXTURE_2D_ERR __ERR_STR(clCreateFromGLTexture2D) 361 #define __CREATE_GL_TEXTURE_3D_ERR __ERR_STR(clCreateFromGLTexture3D) 362 #define __CREATE_IMAGE2D_ERR __ERR_STR(clCreateImage2D) 363 #define __CREATE_IMAGE3D_ERR __ERR_STR(clCreateImage3D) 364 #endif // #if defined(CL_VERSION_1_1) 366 #endif // __CL_USER_OVERRIDE_ERROR_STRINGS 372 #if defined(CL_VERSION_1_2) 373 #define __ENQUEUE_MARKER_WAIT_LIST_ERR __ERR_STR(clEnqueueMarkerWithWaitList) 374 #define __ENQUEUE_BARRIER_WAIT_LIST_ERR __ERR_STR(clEnqueueBarrierWithWaitList) 375 #endif // #if defined(CL_VERSION_1_2) 377 #if !defined(__USE_DEV_STRING) && !defined(__NO_STD_STRING) 379 #elif !defined(__USE_DEV_STRING) 396 string(
void) : size_(0), str_(NULL)
411 string(
const char * str, ::
size_t size) :
416 str_ =
new char[size_+1];
418 memcpy(str_, str, size_ *
sizeof(
char));
432 string(
const char * str) :
437 size_= ::strlen(str);
440 str_ =
new char[size_ + 1];
442 memcpy(str_, str, (size_ + 1) *
sizeof(
char));
447 void resize( ::
size_t n )
460 char *newString =
new char[n + 1];
468 memcpy(newString, str_, (copySize + 1) *
sizeof(
char));
470 if( copySize < size_ ) {
471 memset(newString + copySize, 0, size_ - copySize);
473 newString[size_] =
'\0';
480 const char& operator[] ( ::
size_t pos )
const 485 char& operator[] ( ::
size_t pos )
496 string& operator=(
const string& rhs)
508 if (rhs.size_ == 0 || rhs.str_ == NULL) {
513 str_ =
new char[rhs.size_ + 1];
517 memcpy(str_, rhs.str_, (size_ + 1) *
sizeof(
char));
531 string(
const string& rhs) :
546 ::size_t size(
void)
const {
return size_; }
549 ::size_t length(
void)
const {
return size(); }
554 const char * c_str(
void)
const {
return (str_) ? str_ :
"";}
557 #endif // #elif !defined(__USE_DEV_STRING) 559 #if !defined(__USE_DEV_VECTOR) && !defined(__NO_STD_VECTOR) 560 #define VECTOR_CLASS std::vector 561 #elif !defined(__USE_DEV_VECTOR) 562 #define VECTOR_CLASS cl::vector 564 #if !defined(__MAX_DEFAULT_VECTOR_SIZE) 565 #define __MAX_DEFAULT_VECTOR_SIZE 10 590 template <
typename T,
unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
600 size_(static_cast<unsigned int>(0))
610 unsigned int size(
void)
const 631 void push_back (
const T& x)
634 new (&data_[size_]) T(x);
637 detail::errHandler(CL_MEM_OBJECT_ALLOCATION_FAILURE, __VECTOR_CAPACITY_ERR);
651 detail::errHandler(CL_MEM_OBJECT_ALLOCATION_FAILURE, __VECTOR_CAPACITY_ERR);
659 vector(
const vector<T, N>& vec) :
663 assign(vec.begin(), vec.end());
673 vector(
unsigned int size,
const T& val = T()) :
676 for (
unsigned int i = 0; i < size; i++) {
688 vector<T, N>& operator=(
const vector<T, N>& rhs)
694 if (rhs.size_ != 0) {
695 assign(rhs.begin(), rhs.end());
709 if (size() != vec.size()) {
713 for(
unsigned int i = 0; i < size(); ++i ) {
714 if(
operator[](i) != vec[i] ) {
722 operator T* () {
return data_; }
725 operator const T* ()
const {
return data_; }
728 bool empty (
void)
const 734 unsigned int max_size (
void)
const 740 unsigned int capacity ()
const 746 void resize(
unsigned int newSize, T fill = T())
750 detail::errHandler(CL_MEM_OBJECT_ALLOCATION_FAILURE, __VECTOR_CAPACITY_ERR);
754 while (size_ < newSize)
756 new (&data_[size_]) T(fill);
759 while (size_ > newSize)
773 T& operator[](
int index)
785 const T& operator[](
int index)
const 799 void assign(I start, I end)
802 while(start != end) {
814 const vector<T,N> *vec_;
822 iterator (
const vector<T,N> &vec,
int index) :
839 iterator(
const iterator& rhs) :
847 static iterator begin(
const cl::vector<T,N> &vec)
854 static iterator end(
const cl::vector<T,N> &vec)
856 iterator i(vec, vec.size());
863 return ((vec_ == i.vec_) &&
864 (index_ == i.index_));
869 return (!(*
this==i));
872 iterator& operator++()
878 iterator operator++(
int)
880 iterator retVal(*
this);
885 iterator& operator--()
891 iterator operator--(
int)
893 iterator retVal(*
this);
900 return (*vec_)[index_];
906 return iterator::begin(*
this);
909 iterator begin(
void)
const 911 return iterator::begin(*
this);
916 return iterator::end(*
this);
919 iterator end(
void)
const 921 return iterator::end(*
this);
934 const T& front(
void)
const 939 const T& back(
void)
const 941 return data_[size_-1];
944 #endif // #if !defined(__USE_DEV_VECTOR) && !defined(__NO_STD_VECTOR) 951 #define __DEFAULT_NOT_INITIALIZED 1 952 #define __DEFAULT_BEING_INITIALIZED 2 953 #define __DEFAULT_INITIALIZED 4 959 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 960 inline int compare_exchange(std::atomic<int> * dest,
int exchange,
int comparand)
961 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 963 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 965 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 966 std::atomic_compare_exchange_strong(dest, &comparand, exchange);
969 return (
int)(_InterlockedCompareExchange(
970 (
volatile long*)dest,
973 #else // !_MSC_VER && !CL_HPP_CPP11_ATOMICS_SUPPORTED 974 return (__sync_val_compare_and_swap(
978 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 982 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 983 std::atomic_thread_fence(std::memory_order_seq_cst);
984 #elif _MSC_VER // !CL_HPP_CPP11_ATOMICS_SUPPORTED 986 #else // !_MSC_VER && !CL_HPP_CPP11_ATOMICS_SUPPORTED 987 __sync_synchronize();
988 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 1007 for(
int i = 0; i < N; ++i ) {
1014 return data_[index];
1019 return data_[index];
1023 operator ::size_t* () {
return data_; }
1026 operator const ::size_t* ()
const {
return data_; }
1035 template<
typename Functor,
typename T>
1038 return f(name,
sizeof(T), param, NULL);
1042 template <
typename Func,
typename T>
1046 cl_int err = f(name, 0, NULL, &required);
1047 if (err != CL_SUCCESS) {
1051 T* value = (T*) alloca(required);
1052 err = f(name, required, value, NULL);
1053 if (err != CL_SUCCESS) {
1057 param->assign(&value[0], &value[required/
sizeof(T)]);
1067 template <
typename Func,
typename T>
1068 inline cl_int
getInfoHelper(Func f, cl_uint name, VECTOR_CLASS<T>* param,
int,
typename T::cl_type = 0)
1071 cl_int err = f(name, 0, NULL, &required);
1072 if (err != CL_SUCCESS) {
1076 typename T::cl_type * value = (
typename T::cl_type *) alloca(required);
1077 err = f(name, required, value, NULL);
1078 if (err != CL_SUCCESS) {
1082 ::size_t elements = required /
sizeof(
typename T::cl_type);
1083 param->assign(&value[0], &value[elements]);
1084 for (::
size_t i = 0; i < elements; i++)
1086 if (value[i] != NULL)
1088 err = (*param)[i].retain();
1089 if (err != CL_SUCCESS) {
1098 template <
typename Func>
1099 inline cl_int
getInfoHelper(Func f, cl_uint name, VECTOR_CLASS<char *>* param,
int)
1101 cl_int err = f(name, param->size() *
sizeof(
char *), &(*param)[0], NULL);
1103 if (err != CL_SUCCESS) {
1111 template <
typename Func>
1115 cl_int err = f(name, 0, NULL, &required);
1116 if (err != CL_SUCCESS) {
1122 VECTOR_CLASS<char> value(required);
1123 err = f(name, required, value.data(), NULL);
1124 if (err != CL_SUCCESS) {
1128 param->assign(value.begin(), value.end());
1134 template <
typename Func, ::
size_t N>
1138 cl_int err = f(name, 0, NULL, &required);
1139 if (err != CL_SUCCESS) {
1144 err = f(name, required, value, NULL);
1145 if (err != CL_SUCCESS) {
1149 for(
int i = 0; i < N; ++i) {
1150 (*param)[i] = value[i];
1164 template<
typename Func,
typename T>
1165 inline cl_int
getInfoHelper(Func f, cl_uint name, T* param,
int,
typename T::cl_type = 0)
1167 typename T::cl_type value;
1168 cl_int err = f(name,
sizeof(value), &value, NULL);
1169 if (err != CL_SUCCESS) {
1175 err = param->retain();
1176 if (err != CL_SUCCESS) {
1183 #define __PARAM_NAME_INFO_1_0(F) \ 1184 F(cl_platform_info, CL_PLATFORM_PROFILE, STRING_CLASS) \ 1185 F(cl_platform_info, CL_PLATFORM_VERSION, STRING_CLASS) \ 1186 F(cl_platform_info, CL_PLATFORM_NAME, STRING_CLASS) \ 1187 F(cl_platform_info, CL_PLATFORM_VENDOR, STRING_CLASS) \ 1188 F(cl_platform_info, CL_PLATFORM_EXTENSIONS, STRING_CLASS) \ 1190 F(cl_device_info, CL_DEVICE_TYPE, cl_device_type) \ 1191 F(cl_device_info, CL_DEVICE_VENDOR_ID, cl_uint) \ 1192 F(cl_device_info, CL_DEVICE_MAX_COMPUTE_UNITS, cl_uint) \ 1193 F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, cl_uint) \ 1194 F(cl_device_info, CL_DEVICE_MAX_WORK_GROUP_SIZE, ::size_t) \ 1195 F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_SIZES, VECTOR_CLASS< ::size_t>) \ 1196 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, cl_uint) \ 1197 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, cl_uint) \ 1198 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, cl_uint) \ 1199 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, cl_uint) \ 1200 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, cl_uint) \ 1201 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, cl_uint) \ 1202 F(cl_device_info, CL_DEVICE_MAX_CLOCK_FREQUENCY, cl_uint) \ 1203 F(cl_device_info, CL_DEVICE_ADDRESS_BITS, cl_uint) \ 1204 F(cl_device_info, CL_DEVICE_MAX_READ_IMAGE_ARGS, cl_uint) \ 1205 F(cl_device_info, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, cl_uint) \ 1206 F(cl_device_info, CL_DEVICE_MAX_MEM_ALLOC_SIZE, cl_ulong) \ 1207 F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_WIDTH, ::size_t) \ 1208 F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_HEIGHT, ::size_t) \ 1209 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_WIDTH, ::size_t) \ 1210 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_HEIGHT, ::size_t) \ 1211 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_DEPTH, ::size_t) \ 1212 F(cl_device_info, CL_DEVICE_IMAGE_SUPPORT, cl_bool) \ 1213 F(cl_device_info, CL_DEVICE_MAX_PARAMETER_SIZE, ::size_t) \ 1214 F(cl_device_info, CL_DEVICE_MAX_SAMPLERS, cl_uint) \ 1215 F(cl_device_info, CL_DEVICE_MEM_BASE_ADDR_ALIGN, cl_uint) \ 1216 F(cl_device_info, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, cl_uint) \ 1217 F(cl_device_info, CL_DEVICE_SINGLE_FP_CONFIG, cl_device_fp_config) \ 1218 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, cl_device_mem_cache_type) \ 1219 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, cl_uint)\ 1220 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, cl_ulong) \ 1221 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_SIZE, cl_ulong) \ 1222 F(cl_device_info, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, cl_ulong) \ 1223 F(cl_device_info, CL_DEVICE_MAX_CONSTANT_ARGS, cl_uint) \ 1224 F(cl_device_info, CL_DEVICE_LOCAL_MEM_TYPE, cl_device_local_mem_type) \ 1225 F(cl_device_info, CL_DEVICE_LOCAL_MEM_SIZE, cl_ulong) \ 1226 F(cl_device_info, CL_DEVICE_ERROR_CORRECTION_SUPPORT, cl_bool) \ 1227 F(cl_device_info, CL_DEVICE_PROFILING_TIMER_RESOLUTION, ::size_t) \ 1228 F(cl_device_info, CL_DEVICE_ENDIAN_LITTLE, cl_bool) \ 1229 F(cl_device_info, CL_DEVICE_AVAILABLE, cl_bool) \ 1230 F(cl_device_info, CL_DEVICE_COMPILER_AVAILABLE, cl_bool) \ 1231 F(cl_device_info, CL_DEVICE_EXECUTION_CAPABILITIES, cl_device_exec_capabilities) \ 1232 F(cl_device_info, CL_DEVICE_QUEUE_PROPERTIES, cl_command_queue_properties) \ 1233 F(cl_device_info, CL_DEVICE_PLATFORM, cl_platform_id) \ 1234 F(cl_device_info, CL_DEVICE_NAME, STRING_CLASS) \ 1235 F(cl_device_info, CL_DEVICE_VENDOR, STRING_CLASS) \ 1236 F(cl_device_info, CL_DRIVER_VERSION, STRING_CLASS) \ 1237 F(cl_device_info, CL_DEVICE_PROFILE, STRING_CLASS) \ 1238 F(cl_device_info, CL_DEVICE_VERSION, STRING_CLASS) \ 1239 F(cl_device_info, CL_DEVICE_EXTENSIONS, STRING_CLASS) \ 1241 F(cl_context_info, CL_CONTEXT_REFERENCE_COUNT, cl_uint) \ 1242 F(cl_context_info, CL_CONTEXT_DEVICES, VECTOR_CLASS<Device>) \ 1243 F(cl_context_info, CL_CONTEXT_PROPERTIES, VECTOR_CLASS<cl_context_properties>) \ 1245 F(cl_event_info, CL_EVENT_COMMAND_QUEUE, cl::CommandQueue) \ 1246 F(cl_event_info, CL_EVENT_COMMAND_TYPE, cl_command_type) \ 1247 F(cl_event_info, CL_EVENT_REFERENCE_COUNT, cl_uint) \ 1248 F(cl_event_info, CL_EVENT_COMMAND_EXECUTION_STATUS, cl_int) \ 1250 F(cl_profiling_info, CL_PROFILING_COMMAND_QUEUED, cl_ulong) \ 1251 F(cl_profiling_info, CL_PROFILING_COMMAND_SUBMIT, cl_ulong) \ 1252 F(cl_profiling_info, CL_PROFILING_COMMAND_START, cl_ulong) \ 1253 F(cl_profiling_info, CL_PROFILING_COMMAND_END, cl_ulong) \ 1255 F(cl_mem_info, CL_MEM_TYPE, cl_mem_object_type) \ 1256 F(cl_mem_info, CL_MEM_FLAGS, cl_mem_flags) \ 1257 F(cl_mem_info, CL_MEM_SIZE, ::size_t) \ 1258 F(cl_mem_info, CL_MEM_HOST_PTR, void*) \ 1259 F(cl_mem_info, CL_MEM_MAP_COUNT, cl_uint) \ 1260 F(cl_mem_info, CL_MEM_REFERENCE_COUNT, cl_uint) \ 1261 F(cl_mem_info, CL_MEM_CONTEXT, cl::Context) \ 1263 F(cl_image_info, CL_IMAGE_FORMAT, cl_image_format) \ 1264 F(cl_image_info, CL_IMAGE_ELEMENT_SIZE, ::size_t) \ 1265 F(cl_image_info, CL_IMAGE_ROW_PITCH, ::size_t) \ 1266 F(cl_image_info, CL_IMAGE_SLICE_PITCH, ::size_t) \ 1267 F(cl_image_info, CL_IMAGE_WIDTH, ::size_t) \ 1268 F(cl_image_info, CL_IMAGE_HEIGHT, ::size_t) \ 1269 F(cl_image_info, CL_IMAGE_DEPTH, ::size_t) \ 1271 F(cl_sampler_info, CL_SAMPLER_REFERENCE_COUNT, cl_uint) \ 1272 F(cl_sampler_info, CL_SAMPLER_CONTEXT, cl::Context) \ 1273 F(cl_sampler_info, CL_SAMPLER_NORMALIZED_COORDS, cl_addressing_mode) \ 1274 F(cl_sampler_info, CL_SAMPLER_ADDRESSING_MODE, cl_filter_mode) \ 1275 F(cl_sampler_info, CL_SAMPLER_FILTER_MODE, cl_bool) \ 1277 F(cl_program_info, CL_PROGRAM_REFERENCE_COUNT, cl_uint) \ 1278 F(cl_program_info, CL_PROGRAM_CONTEXT, cl::Context) \ 1279 F(cl_program_info, CL_PROGRAM_NUM_DEVICES, cl_uint) \ 1280 F(cl_program_info, CL_PROGRAM_DEVICES, VECTOR_CLASS<Device>) \ 1281 F(cl_program_info, CL_PROGRAM_SOURCE, STRING_CLASS) \ 1282 F(cl_program_info, CL_PROGRAM_BINARY_SIZES, VECTOR_CLASS< ::size_t>) \ 1283 F(cl_program_info, CL_PROGRAM_BINARIES, VECTOR_CLASS<char *>) \ 1285 F(cl_program_build_info, CL_PROGRAM_BUILD_STATUS, cl_build_status) \ 1286 F(cl_program_build_info, CL_PROGRAM_BUILD_OPTIONS, STRING_CLASS) \ 1287 F(cl_program_build_info, CL_PROGRAM_BUILD_LOG, STRING_CLASS) \ 1289 F(cl_kernel_info, CL_KERNEL_FUNCTION_NAME, STRING_CLASS) \ 1290 F(cl_kernel_info, CL_KERNEL_NUM_ARGS, cl_uint) \ 1291 F(cl_kernel_info, CL_KERNEL_REFERENCE_COUNT, cl_uint) \ 1292 F(cl_kernel_info, CL_KERNEL_CONTEXT, cl::Context) \ 1293 F(cl_kernel_info, CL_KERNEL_PROGRAM, cl::Program) \ 1295 F(cl_kernel_work_group_info, CL_KERNEL_WORK_GROUP_SIZE, ::size_t) \ 1296 F(cl_kernel_work_group_info, CL_KERNEL_COMPILE_WORK_GROUP_SIZE, cl::size_t<3>) \ 1297 F(cl_kernel_work_group_info, CL_KERNEL_LOCAL_MEM_SIZE, cl_ulong) \ 1299 F(cl_command_queue_info, CL_QUEUE_CONTEXT, cl::Context) \ 1300 F(cl_command_queue_info, CL_QUEUE_DEVICE, cl::Device) \ 1301 F(cl_command_queue_info, CL_QUEUE_REFERENCE_COUNT, cl_uint) \ 1302 F(cl_command_queue_info, CL_QUEUE_PROPERTIES, cl_command_queue_properties) 1304 #if defined(CL_VERSION_1_1) 1305 #define __PARAM_NAME_INFO_1_1(F) \ 1306 F(cl_context_info, CL_CONTEXT_NUM_DEVICES, cl_uint)\ 1307 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, cl_uint) \ 1308 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, cl_uint) \ 1309 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, cl_uint) \ 1310 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, cl_uint) \ 1311 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, cl_uint) \ 1312 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, cl_uint) \ 1313 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, cl_uint) \ 1314 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, cl_uint) \ 1315 F(cl_device_info, CL_DEVICE_DOUBLE_FP_CONFIG, cl_device_fp_config) \ 1316 F(cl_device_info, CL_DEVICE_HALF_FP_CONFIG, cl_device_fp_config) \ 1317 F(cl_device_info, CL_DEVICE_HOST_UNIFIED_MEMORY, cl_bool) \ 1318 F(cl_device_info, CL_DEVICE_OPENCL_C_VERSION, STRING_CLASS) \ 1320 F(cl_mem_info, CL_MEM_ASSOCIATED_MEMOBJECT, cl::Memory) \ 1321 F(cl_mem_info, CL_MEM_OFFSET, ::size_t) \ 1323 F(cl_kernel_work_group_info, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, ::size_t) \ 1324 F(cl_kernel_work_group_info, CL_KERNEL_PRIVATE_MEM_SIZE, cl_ulong) \ 1326 F(cl_event_info, CL_EVENT_CONTEXT, cl::Context) 1327 #endif // CL_VERSION_1_1 1330 #if defined(CL_VERSION_1_2) 1331 #define __PARAM_NAME_INFO_1_2(F) \ 1332 F(cl_image_info, CL_IMAGE_BUFFER, cl::Buffer) \ 1334 F(cl_program_info, CL_PROGRAM_NUM_KERNELS, ::size_t) \ 1335 F(cl_program_info, CL_PROGRAM_KERNEL_NAMES, STRING_CLASS) \ 1337 F(cl_program_build_info, CL_PROGRAM_BINARY_TYPE, cl_program_binary_type) \ 1339 F(cl_kernel_info, CL_KERNEL_ATTRIBUTES, STRING_CLASS) \ 1341 F(cl_kernel_arg_info, CL_KERNEL_ARG_ADDRESS_QUALIFIER, cl_kernel_arg_address_qualifier) \ 1342 F(cl_kernel_arg_info, CL_KERNEL_ARG_ACCESS_QUALIFIER, cl_kernel_arg_access_qualifier) \ 1343 F(cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_NAME, STRING_CLASS) \ 1344 F(cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS) \ 1346 F(cl_device_info, CL_DEVICE_PARENT_DEVICE, cl_device_id) \ 1347 F(cl_device_info, CL_DEVICE_PARTITION_PROPERTIES, VECTOR_CLASS<cl_device_partition_property>) \ 1348 F(cl_device_info, CL_DEVICE_PARTITION_TYPE, VECTOR_CLASS<cl_device_partition_property>) \ 1349 F(cl_device_info, CL_DEVICE_REFERENCE_COUNT, cl_uint) \ 1350 F(cl_device_info, CL_DEVICE_PREFERRED_INTEROP_USER_SYNC, ::size_t) \ 1351 F(cl_device_info, CL_DEVICE_PARTITION_AFFINITY_DOMAIN, cl_device_affinity_domain) \ 1352 F(cl_device_info, CL_DEVICE_BUILT_IN_KERNELS, STRING_CLASS) 1353 #endif // #if defined(CL_VERSION_1_2) 1355 #if defined(USE_CL_DEVICE_FISSION) 1356 #define __PARAM_NAME_DEVICE_FISSION(F) \ 1357 F(cl_device_info, CL_DEVICE_PARENT_DEVICE_EXT, cl_device_id) \ 1358 F(cl_device_info, CL_DEVICE_PARTITION_TYPES_EXT, VECTOR_CLASS<cl_device_partition_property_ext>) \ 1359 F(cl_device_info, CL_DEVICE_AFFINITY_DOMAINS_EXT, VECTOR_CLASS<cl_device_partition_property_ext>) \ 1360 F(cl_device_info, CL_DEVICE_REFERENCE_COUNT_EXT , cl_uint) \ 1361 F(cl_device_info, CL_DEVICE_PARTITION_STYLE_EXT, VECTOR_CLASS<cl_device_partition_property_ext>) 1362 #endif // USE_CL_DEVICE_FISSION 1364 template <
typename enum_type, cl_
int Name>
1367 #define __CL_DECLARE_PARAM_TRAITS(token, param_name, T) \ 1370 struct param_traits<detail:: token,param_name> \ 1372 enum { value = param_name }; \ 1373 typedef T param_type; \ 1377 #if defined(CL_VERSION_1_1) 1379 #endif // CL_VERSION_1_1 1380 #if defined(CL_VERSION_1_2) 1382 #endif // CL_VERSION_1_1 1384 #if defined(USE_CL_DEVICE_FISSION) 1386 #endif // USE_CL_DEVICE_FISSION 1388 #ifdef CL_PLATFORM_ICD_SUFFIX_KHR 1392 #ifdef CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 1396 #ifdef CL_DEVICE_GLOBAL_FREE_MEMORY_AMD 1399 #ifdef CL_DEVICE_SIMD_PER_COMPUTE_UNIT_AMD 1402 #ifdef CL_DEVICE_SIMD_WIDTH_AMD 1405 #ifdef CL_DEVICE_SIMD_INSTRUCTION_WIDTH_AMD 1408 #ifdef CL_DEVICE_WAVEFRONT_WIDTH_AMD 1411 #ifdef CL_DEVICE_GLOBAL_MEM_CHANNELS_AMD 1414 #ifdef CL_DEVICE_GLOBAL_MEM_CHANNEL_BANKS_AMD 1417 #ifdef CL_DEVICE_GLOBAL_MEM_CHANNEL_BANK_WIDTH_AMD 1420 #ifdef CL_DEVICE_LOCAL_MEM_SIZE_PER_COMPUTE_UNIT_AMD 1423 #ifdef CL_DEVICE_LOCAL_MEM_BANKS_AMD 1427 #ifdef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 1430 #ifdef CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 1433 #ifdef CL_DEVICE_REGISTERS_PER_BLOCK_NV 1436 #ifdef CL_DEVICE_WARP_SIZE_NV 1439 #ifdef CL_DEVICE_GPU_OVERLAP_NV 1442 #ifdef CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 1445 #ifdef CL_DEVICE_INTEGRATED_MEMORY_NV 1451 template <
typename Func,
typename T>
1458 template <
typename Func,
typename Arg0>
1463 cl_uint param, ::
size_t size,
void* value, ::
size_t* size_ret)
1464 {
return f_(
arg0_, param, size, value, size_ret); }
1467 template <
typename Func,
typename Arg0,
typename Arg1>
1472 cl_uint param, ::
size_t size,
void* value, ::
size_t* size_ret)
1473 {
return f_(
arg0_,
arg1_, param, size, value, size_ret); }
1476 template <
typename Func,
typename Arg0,
typename T>
1478 getInfo(Func f,
const Arg0& arg0, cl_uint name, T* param)
1484 template <
typename Func,
typename Arg0,
typename Arg1,
typename T>
1486 getInfo(Func f,
const Arg0& arg0,
const Arg1& arg1, cl_uint name, T* param)
1492 template<
typename T>
1493 struct ReferenceHandler
1496 #if defined(CL_VERSION_1_2) 1501 struct ReferenceHandler<cl_device_id>
1512 static cl_int retain(cl_device_id device)
1513 { return ::clRetainDevice(device); }
1523 static cl_int release(cl_device_id device)
1524 { return ::clReleaseDevice(device); }
1526 #else // #if defined(CL_VERSION_1_2) 1535 {
return CL_SUCCESS; }
1538 {
return CL_SUCCESS; }
1540 #endif // #if defined(CL_VERSION_1_2) 1547 {
return CL_SUCCESS; }
1550 {
return CL_SUCCESS; }
1557 { return ::clRetainContext(context); }
1559 { return ::clReleaseContext(context); }
1566 { return ::clRetainCommandQueue(queue); }
1568 { return ::clReleaseCommandQueue(queue); }
1575 { return ::clRetainMemObject(memory); }
1577 { return ::clReleaseMemObject(memory); }
1584 { return ::clRetainSampler(sampler); }
1586 { return ::clReleaseSampler(sampler); }
1593 { return ::clRetainProgram(program); }
1595 { return ::clReleaseProgram(program); }
1602 { return ::clRetainKernel(kernel); }
1604 { return ::clReleaseKernel(kernel); }
1611 { return ::clRetainEvent(event); }
1613 { return ::clReleaseEvent(event); }
1618 static cl_uint getVersion(
const char *versionInfo)
1620 int highVersion = 0;
1623 while(versionInfo[index] !=
'.' ) {
1625 highVersion += versionInfo[index]-
'0';
1629 while(versionInfo[index] !=
' ' && versionInfo[index] !=
'\0') {
1631 lowVersion += versionInfo[index]-
'0';
1634 return (highVersion << 16) | lowVersion;
1637 static cl_uint getPlatformVersion(cl_platform_id platform)
1640 clGetPlatformInfo(platform, CL_PLATFORM_VERSION, 0, NULL, &size);
1641 char *versionInfo = (
char *) alloca(size);
1642 clGetPlatformInfo(platform, CL_PLATFORM_VERSION, size, &versionInfo[0], &size);
1643 return getVersion(versionInfo);
1646 static cl_uint getDevicePlatformVersion(cl_device_id device)
1648 cl_platform_id platform;
1649 clGetDeviceInfo(device, CL_DEVICE_PLATFORM,
sizeof(platform), &platform, NULL);
1650 return getPlatformVersion(platform);
1653 #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 1654 static cl_uint getContextPlatformVersion(cl_context context)
1659 clGetContextInfo(context, CL_CONTEXT_DEVICES, 0, NULL, &size);
1662 cl_device_id *devices = (cl_device_id *) alloca(size);
1663 clGetContextInfo(context, CL_CONTEXT_DEVICES, size, devices, NULL);
1664 return getDevicePlatformVersion(devices[0]);
1666 #endif // #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 1668 template <
typename T>
1690 if (
object_ != NULL) { detail::errHandler(
retain(), __RETAIN_ERR); }
1693 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1704 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1706 if (
object_ != NULL) { detail::errHandler(
retain(), __RETAIN_ERR); }
1711 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1715 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1725 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1735 template<
typename Func,
typename U>
1736 friend inline cl_int
getInfoHelper(Func, cl_uint, U*,
int,
typename U::cl_type);
1761 bool retVal =
false;
1762 if (device != NULL) {
1763 int version = getDevicePlatformVersion(device);
1764 if(version > ((1 << 16) + 1)) {
1778 referenceCountable_ = isReferenceCountable(obj);
1789 referenceCountable_ = isReferenceCountable(
object_);
1790 if (
object_ != NULL) { detail::errHandler(
retain(), __RETAIN_ERR); }
1793 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1797 referenceCountable_ = rhs.referenceCountable_;
1799 rhs.referenceCountable_ =
false;
1806 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1808 referenceCountable_ = rhs.referenceCountable_;
1809 if (
object_ != NULL) { detail::errHandler(
retain(), __RETAIN_ERR); }
1814 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1818 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1820 referenceCountable_ = rhs.referenceCountable_;
1822 rhs.referenceCountable_ =
false;
1830 if (
object_ != NULL) { detail::errHandler(
release(), __RELEASE_ERR); }
1832 referenceCountable_ = isReferenceCountable(
object_);
1841 template<
typename Func,
typename U>
1842 friend inline cl_int
getInfoHelper(Func, cl_uint, U*,
int,
typename U::cl_type);
1844 template<
typename Func,
typename U>
1845 friend inline cl_int
getInfoHelper(Func, cl_uint, VECTOR_CLASS<U>*,
int,
typename U::cl_type);
1849 if( referenceCountable_ ) {
1859 if( referenceCountable_ ) {
1884 image_channel_order = order;
1885 image_channel_data_type =
type;
1892 this->image_channel_data_type = rhs.image_channel_data_type;
1893 this->image_channel_order = rhs.image_channel_order;
1948 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1962 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 1965 template <
typename T>
1966 cl_int
getInfo(cl_device_info name, T* param)
const 1968 return detail::errHandler(
1970 __GET_DEVICE_INFO_ERR);
1974 template <cl_
int name>
typename 1979 detail::cl_device_info, name>::param_type param;
1980 cl_int result =
getInfo(name, ¶m);
1990 #if defined(CL_VERSION_1_2) 1991 cl_int createSubDevices(
1993 const cl_device_partition_property * properties,
1994 VECTOR_CLASS<Device>* devices)
1997 cl_int err = clCreateSubDevices(
object_, properties, 0, NULL, &n);
1998 if (err != CL_SUCCESS) {
1999 return detail::errHandler(err, __CREATE_SUB_DEVICES);
2002 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
2003 err = clCreateSubDevices(
object_, properties, n, ids, NULL);
2004 if (err != CL_SUCCESS) {
2005 return detail::errHandler(err, __CREATE_SUB_DEVICES);
2008 devices->assign(&ids[0], &ids[n]);
2011 #endif // #if defined(CL_VERSION_1_2) 2016 #if defined(CL_VERSION_1_1) 2017 #if defined(USE_CL_DEVICE_FISSION) 2018 cl_int createSubDevices(
2019 const cl_device_partition_property_ext * properties,
2020 VECTOR_CLASS<Device>* devices)
2022 typedef CL_API_ENTRY cl_int
2023 ( CL_API_CALL * PFN_clCreateSubDevicesEXT)(
2025 const cl_device_partition_property_ext * ,
2028 cl_uint * ) CL_EXT_SUFFIX__VERSION_1_1;
2030 static PFN_clCreateSubDevicesEXT pfn_clCreateSubDevicesEXT = NULL;
2031 __INIT_CL_EXT_FCN_PTR(clCreateSubDevicesEXT);
2034 cl_int err = pfn_clCreateSubDevicesEXT(
object_, properties, 0, NULL, &n);
2035 if (err != CL_SUCCESS) {
2036 return detail::errHandler(err, __CREATE_SUB_DEVICES);
2039 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
2040 err = pfn_clCreateSubDevicesEXT(
object_, properties, n, ids, NULL);
2041 if (err != CL_SUCCESS) {
2042 return detail::errHandler(err, __CREATE_SUB_DEVICES);
2045 devices->assign(&ids[0], &ids[n]);
2048 #endif // #if defined(USE_CL_DEVICE_FISSION) 2049 #endif // #if defined(CL_VERSION_1_1) 2084 return detail::errHandler(
2086 __GET_PLATFORM_INFO_ERR);
2090 template <cl_
int name>
typename 2095 detail::cl_platform_info, name>::param_type param;
2096 cl_int result =
getInfo(name, ¶m);
2108 cl_device_type
type,
2109 VECTOR_CLASS<Device>* devices)
const 2112 if( devices == NULL ) {
2113 return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_DEVICE_IDS_ERR);
2115 cl_int err = ::clGetDeviceIDs(
object_,
type, 0, NULL, &n);
2116 if (err != CL_SUCCESS) {
2117 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
2120 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
2121 err = ::clGetDeviceIDs(
object_,
type, n, ids, NULL);
2122 if (err != CL_SUCCESS) {
2123 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
2126 devices->assign(&ids[0], &ids[n]);
2130 #if defined(USE_DX_INTEROP) 2155 cl_d3d10_device_source_khr d3d_device_source,
2157 cl_d3d10_device_set_khr d3d_device_set,
2158 VECTOR_CLASS<Device>* devices)
const 2160 typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clGetDeviceIDsFromD3D10KHR)(
2161 cl_platform_id platform,
2162 cl_d3d10_device_source_khr d3d_device_source,
2164 cl_d3d10_device_set_khr d3d_device_set,
2165 cl_uint num_entries,
2166 cl_device_id * devices,
2167 cl_uint* num_devices);
2169 if( devices == NULL ) {
2170 return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_DEVICE_IDS_ERR);
2173 static PFN_clGetDeviceIDsFromD3D10KHR pfn_clGetDeviceIDsFromD3D10KHR = NULL;
2174 __INIT_CL_EXT_FCN_PTR_PLATFORM(
object_, clGetDeviceIDsFromD3D10KHR);
2177 cl_int err = pfn_clGetDeviceIDsFromD3D10KHR(
2185 if (err != CL_SUCCESS) {
2186 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
2189 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
2190 err = pfn_clGetDeviceIDsFromD3D10KHR(
2198 if (err != CL_SUCCESS) {
2199 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
2202 devices->assign(&ids[0], &ids[n]);
2212 VECTOR_CLASS<Platform>* platforms)
2216 if( platforms == NULL ) {
2217 return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_PLATFORM_IDS_ERR);
2220 cl_int err = ::clGetPlatformIDs(0, NULL, &n);
2221 if (err != CL_SUCCESS) {
2222 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2225 cl_platform_id* ids = (cl_platform_id*) alloca(
2226 n *
sizeof(cl_platform_id));
2227 err = ::clGetPlatformIDs(n, ids, NULL);
2228 if (err != CL_SUCCESS) {
2229 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2232 platforms->assign(&ids[0], &ids[n]);
2245 if( platform == NULL ) {
2246 return detail::errHandler(CL_INVALID_ARG_VALUE, __GET_PLATFORM_IDS_ERR);
2249 cl_int err = ::clGetPlatformIDs(0, NULL, &n);
2250 if (err != CL_SUCCESS) {
2251 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2254 cl_platform_id* ids = (cl_platform_id*) alloca(
2255 n *
sizeof(cl_platform_id));
2256 err = ::clGetPlatformIDs(n, ids, NULL);
2257 if (err != CL_SUCCESS) {
2258 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2270 cl_int * errResult = NULL)
2274 cl_int err = ::clGetPlatformIDs(0, NULL, &n);
2275 if (err != CL_SUCCESS) {
2276 detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2277 if (errResult != NULL) {
2283 cl_platform_id* ids = (cl_platform_id*) alloca(
2284 n *
sizeof(cl_platform_id));
2285 err = ::clGetPlatformIDs(n, ids, NULL);
2287 if (err != CL_SUCCESS) {
2288 detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
2289 if (errResult != NULL) {
2300 cl_int *errResult = NULL )
2302 return get(errResult);
2306 #if defined(CL_VERSION_1_2) 2311 return ::clUnloadPlatformCompiler(
object_);
2313 #endif // #if defined(CL_VERSION_1_2) 2319 #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) || (defined(CL_VERSION_1_1) && !defined(CL_VERSION_1_2)) 2329 return ::clUnloadCompiler();
2331 #endif // #if defined(CL_VERSION_1_1) 2346 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 2347 static std::atomic<int> default_initialized_;
2348 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2349 static volatile int default_initialized_;
2350 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2352 static volatile cl_int default_error_;
2359 const VECTOR_CLASS<Device>& devices,
2360 cl_context_properties* properties = NULL,
2371 ::size_t numDevices = devices.size();
2372 cl_device_id* deviceIDs = (cl_device_id*) alloca(numDevices *
sizeof(cl_device_id));
2373 for( ::
size_t deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) {
2374 deviceIDs[deviceIndex] = (devices[deviceIndex])();
2378 properties, (cl_uint) numDevices,
2380 notifyFptr, data, &error);
2382 detail::errHandler(error, __CREATE_CONTEXT_ERR);
2390 cl_context_properties* properties = NULL,
2401 cl_device_id deviceID = device();
2406 notifyFptr, data, &error);
2408 detail::errHandler(error, __CREATE_CONTEXT_ERR);
2419 cl_device_type
type,
2420 cl_context_properties* properties = NULL,
2431 #if !defined(__APPLE__) && !defined(__MACOS) 2432 cl_context_properties prop[4] = {CL_CONTEXT_PLATFORM, 0, 0, 0 };
2434 if (properties == NULL) {
2436 VECTOR_CLASS<Platform> platforms;
2438 if (error != CL_SUCCESS) {
2439 detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR);
2447 cl_context_properties platform_id = 0;
2448 for (
unsigned int i = 0; i < platforms.size(); i++) {
2450 VECTOR_CLASS<Device> devices;
2452 #if defined(__CL_ENABLE_EXCEPTIONS) 2456 error = platforms[i].getDevices(
type, &devices);
2458 #if defined(__CL_ENABLE_EXCEPTIONS) 2465 if (error != CL_SUCCESS && error != CL_DEVICE_NOT_FOUND) {
2466 detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR);
2472 if (devices.size() > 0) {
2473 platform_id = (cl_context_properties)platforms[i]();
2478 if (platform_id == 0) {
2479 detail::errHandler(CL_DEVICE_NOT_FOUND, __CREATE_CONTEXT_FROM_TYPE_ERR);
2481 *err = CL_DEVICE_NOT_FOUND;
2486 prop[1] = platform_id;
2487 properties = &prop[0];
2490 object_ = ::clCreateContextFromType(
2491 properties,
type, notifyFptr, data, &error);
2493 detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR);
2513 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 2527 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 2536 &default_initialized_,
2541 *err = default_error_;
2553 *err = default_error_;
2560 CL_DEVICE_TYPE_DEFAULT,
2568 default_error_ = error;
2575 *err = default_error_;
2603 template <
typename T>
2604 cl_int
getInfo(cl_context_info name, T* param)
const 2606 return detail::errHandler(
2608 __GET_CONTEXT_INFO_ERR);
2612 template <cl_
int name>
typename 2617 detail::cl_context_info, name>::param_type param;
2618 cl_int result =
getInfo(name, ¶m);
2631 cl_mem_object_type
type,
2632 VECTOR_CLASS<ImageFormat>* formats)
const 2635 cl_int err = ::clGetSupportedImageFormats(
2642 if (err != CL_SUCCESS) {
2643 return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
2648 err = ::clGetSupportedImageFormats(
2653 (cl_image_format*) value,
2655 if (err != CL_SUCCESS) {
2656 return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
2659 formats->assign(&value[0], &value[numEntries]);
2670 detail::errHandler(error, __CREATE_CONTEXT_ERR);
2672 if (error != CL_SUCCESS) {
2678 device = context.
getInfo<CL_CONTEXT_DEVICES>()[0];
2689 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 2690 __declspec(selectany) std::atomic<int> Context::default_initialized_;
2691 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2693 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2694 __declspec(selectany)
Context Context::default_;
2695 __declspec(selectany)
volatile cl_int Context::default_error_ = CL_SUCCESS;
2697 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 2698 __attribute__((weak)) std::atomic<int> Context::default_initialized_;
2699 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2701 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 2702 __attribute__((weak))
Context Context::default_;
2703 __attribute__((weak))
volatile cl_int Context::default_error_ = CL_SUCCESS;
2739 template <
typename T>
2740 cl_int
getInfo(cl_event_info name, T* param)
const 2742 return detail::errHandler(
2744 __GET_EVENT_INFO_ERR);
2748 template <cl_
int name>
typename 2753 detail::cl_event_info, name>::param_type param;
2754 cl_int result =
getInfo(name, ¶m);
2762 template <
typename T>
2766 &::clGetEventProfilingInfo,
object_, name, param),
2767 __GET_EVENT_PROFILE_INFO_ERR);
2771 template <cl_
int name>
typename 2776 detail::cl_profiling_info, name>::param_type param;
2790 return detail::errHandler(
2791 ::clWaitForEvents(1, &
object_),
2792 __WAIT_FOR_EVENTS_ERR);
2795 #if defined(CL_VERSION_1_1) 2802 void (
CL_CALLBACK * pfn_notify)(cl_event, cl_int,
void *),
2803 void * user_data = NULL)
2805 return detail::errHandler(
2806 ::clSetEventCallback(
2811 __SET_EVENT_CALLBACK_ERR);
2822 return detail::errHandler(
2824 (cl_uint) events.size(), (events.size() > 0) ? (cl_event*)&events.front() : NULL),
2825 __WAIT_FOR_EVENTS_ERR);
2829 #if defined(CL_VERSION_1_1) 2834 class UserEvent :
public Event
2842 const Context& context,
2843 cl_int * err = NULL)
2846 object_ = ::clCreateUserEvent(
2850 detail::errHandler(error, __CREATE_USER_EVENT_ERR);
2857 UserEvent() : Event() { }
2863 cl_int setStatus(cl_int status)
2865 return detail::errHandler(
2866 ::clSetUserEventStatus(object_,status),
2867 __SET_USER_EVENT_STATUS_ERR);
2876 inline static cl_int
2877 WaitForEvents(
const VECTOR_CLASS<Event>& events)
2879 return detail::errHandler(
2881 (cl_uint) events.size(), (events.size() > 0) ? (cl_event*)&events.front() : NULL),
2882 __WAIT_FOR_EVENTS_ERR);
2931 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 2945 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 2948 template <
typename T>
2951 return detail::errHandler(
2953 __GET_MEM_OBJECT_INFO_ERR);
2957 template <cl_
int name>
typename 2962 detail::cl_mem_info, name>::param_type param;
2963 cl_int result =
getInfo(name, ¶m);
2970 #if defined(CL_VERSION_1_1) 2984 cl_int setDestructorCallback(
2986 void * user_data = NULL)
2988 return detail::errHandler(
2989 ::clSetMemObjectDestructorCallback(
2993 __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR);
3001 template<
typename IteratorType >
3002 cl_int
copy( IteratorType startIterator, IteratorType endIterator,
cl::Buffer &buffer );
3003 template<
typename IteratorType >
3004 cl_int
copy(
const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator );
3005 template<
typename IteratorType >
3007 template<
typename IteratorType >
3032 void* host_ptr = NULL,
3036 object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error);
3038 detail::errHandler(error, __CREATE_BUFFER_ERR);
3056 void* host_ptr = NULL,
3063 object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error);
3065 detail::errHandler(error, __CREATE_BUFFER_ERR);
3076 template<
typename IteratorType >
3078 IteratorType startIterator,
3079 IteratorType endIterator,
3081 bool useHostPtr =
false,
3084 typedef typename std::iterator_traits<IteratorType>::value_type DataType;
3087 cl_mem_flags flags = 0;
3089 flags |= CL_MEM_READ_ONLY;
3092 flags |= CL_MEM_READ_WRITE;
3095 flags |= CL_MEM_USE_HOST_PTR;
3098 ::size_t size =
sizeof(DataType)*(endIterator - startIterator);
3103 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
3105 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);
3108 detail::errHandler(error, __CREATE_BUFFER_ERR);
3114 error =
cl::copy(startIterator, endIterator, *
this);
3115 detail::errHandler(error, __CREATE_BUFFER_ERR);
3127 template<
typename IteratorType >
3128 Buffer(
const Context &context, IteratorType startIterator, IteratorType endIterator,
3129 bool readOnly,
bool useHostPtr =
false, cl_int* err = NULL);
3135 template<
typename IteratorType >
3136 Buffer(
const CommandQueue &queue, IteratorType startIterator, IteratorType endIterator,
3137 bool readOnly,
bool useHostPtr =
false, cl_int* err = NULL);
3172 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3186 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3188 #if defined(CL_VERSION_1_1) 3195 cl_buffer_create_type buffer_create_type,
3196 const void * buffer_create_info,
3197 cl_int * err = NULL)
3201 result.object_ = ::clCreateSubBuffer(
3208 detail::errHandler(error, __CREATE_SUBBUFFER_ERR);
3218 #if defined (USE_DX_INTEROP) 3227 class BufferD3D10 :
public Buffer
3230 typedef CL_API_ENTRY cl_mem (CL_API_CALL *PFN_clCreateFromD3D10BufferKHR)(
3231 cl_context context, cl_mem_flags flags, ID3D10Buffer* buffer,
3232 cl_int* errcode_ret);
3240 const Context& context,
3242 ID3D10Buffer* bufobj,
3243 cl_int * err = NULL)
3245 static PFN_clCreateFromD3D10BufferKHR pfn_clCreateFromD3D10BufferKHR = NULL;
3247 #if defined(CL_VERSION_1_2) 3248 vector<cl_context_properties> props = context.getInfo<CL_CONTEXT_PROPERTIES>();
3249 cl_platform platform = -1;
3250 for(
int i = 0; i < props.size(); ++i ) {
3251 if( props[i] == CL_CONTEXT_PLATFORM ) {
3252 platform = props[i+1];
3255 __INIT_CL_EXT_FCN_PTR_PLATFORM(platform, clCreateFromD3D10BufferKHR);
3257 #if defined(CL_VERSION_1_1) 3258 __INIT_CL_EXT_FCN_PTR(clCreateFromD3D10BufferKHR);
3262 object_ = pfn_clCreateFromD3D10BufferKHR(
3268 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
3275 BufferD3D10() : Buffer() { }
3287 BufferD3D10& operator = (
const cl_mem& rhs)
3296 BufferD3D10(
const BufferD3D10& buf) : Buffer(buf) {}
3301 BufferD3D10& operator = (
const BufferD3D10 &buf)
3307 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3311 BufferD3D10(BufferD3D10&& buf)
CL_HPP_NOEXCEPT : Buffer(std::move(buf)) {}
3316 BufferD3D10& operator = (BufferD3D10 &&buf)
3321 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3345 cl_int * err = NULL)
3348 object_ = ::clCreateFromGLBuffer(
3354 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
3393 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3407 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3411 cl_gl_object_type *
type,
3412 cl_GLuint * gl_object_name)
3414 return detail::errHandler(
3416 __GET_GL_OBJECT_INFO_ERR);
3462 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3476 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3480 template <
typename T>
3483 return detail::errHandler(
3485 __GET_IMAGE_INFO_ERR);
3489 template <cl_
int name>
typename 3494 detail::cl_image_info, name>::param_type param;
3503 #if defined(CL_VERSION_1_2) 3510 class Image1D :
public Image
3518 const Context& context,
3522 void* host_ptr = NULL,
3526 cl_image_desc desc =
3528 CL_MEM_OBJECT_IMAGE1D,
3530 0, 0, 0, 0, 0, 0, 0, 0
3532 object_ = ::clCreateImage(
3540 detail::errHandler(error, __CREATE_IMAGE_ERR);
3559 Image1D& operator = (
const cl_mem& rhs)
3568 Image1D(
const Image1D& img) : Image(img) {}
3573 Image1D& operator = (
const Image1D &img)
3579 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3588 Image1D& operator = (Image1D &&img)
3593 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3599 class Image1DBuffer :
public Image
3603 const Context& context,
3607 const Buffer &buffer,
3611 cl_image_desc desc =
3613 CL_MEM_OBJECT_IMAGE1D_BUFFER,
3615 0, 0, 0, 0, 0, 0, 0,
3618 object_ = ::clCreateImage(
3626 detail::errHandler(error, __CREATE_IMAGE_ERR);
3636 Image1DBuffer& operator = (
const cl_mem& rhs)
3645 Image1DBuffer(
const Image1DBuffer& img) : Image(img) {}
3650 Image1DBuffer& operator = (
const Image1DBuffer &img)
3656 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3660 Image1DBuffer(Image1DBuffer&& img)
CL_HPP_NOEXCEPT : Image(std::move(img)) {}
3665 Image1DBuffer& operator = (Image1DBuffer &&img)
3670 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3676 class Image1DArray :
public Image
3680 const Context& context,
3686 void* host_ptr = NULL,
3690 cl_image_desc desc =
3692 CL_MEM_OBJECT_IMAGE1D_ARRAY,
3699 object_ = ::clCreateImage(
3707 detail::errHandler(error, __CREATE_IMAGE_ERR);
3717 Image1DArray& operator = (
const cl_mem& rhs)
3726 Image1DArray(
const Image1DArray& img) : Image(img) {}
3731 Image1DArray& operator = (
const Image1DArray &img)
3737 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3741 Image1DArray(Image1DArray&& img)
CL_HPP_NOEXCEPT : Image(std::move(img)) {}
3746 Image1DArray& operator = (Image1DArray &&img)
3751 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3753 #endif // #if defined(CL_VERSION_1_2) 3775 ::
size_t row_pitch = 0,
3776 void* host_ptr = NULL,
3780 bool useCreateImage;
3782 #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 3785 cl_uint version = detail::getContextPlatformVersion(context());
3786 useCreateImage = (version >= 0x10002);
3788 #elif defined(CL_VERSION_1_2) 3789 useCreateImage =
true;
3791 useCreateImage =
false;
3794 #if defined(CL_VERSION_1_2) 3797 cl_image_desc desc =
3799 CL_MEM_OBJECT_IMAGE2D,
3814 detail::errHandler(error, __CREATE_IMAGE_ERR);
3819 #endif // #if defined(CL_VERSION_1_2) 3820 #if !defined(CL_VERSION_1_2) || defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 3821 if (!useCreateImage)
3824 context(), flags,&format, width, height, row_pitch, host_ptr, &error);
3826 detail::errHandler(error, __CREATE_IMAGE2D_ERR);
3831 #endif // #if !defined(CL_VERSION_1_2) || defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 3867 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3881 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3885 #if !defined(CL_VERSION_1_2) 3909 cl_int * err = NULL)
3912 object_ = ::clCreateFromGLTexture2D(
3920 detail::errHandler(error, __CREATE_GL_TEXTURE_2D_ERR);
3940 Image2DGL& operator = (
const cl_mem& rhs)
3954 Image2DGL& operator = (
const Image2DGL &img)
3960 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3969 Image2DGL& operator = (Image2DGL &&img)
3974 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 3976 #endif // #if !defined(CL_VERSION_1_2) 3978 #if defined(CL_VERSION_1_2) 3982 class Image2DArray :
public Image
3986 const Context& context,
3993 ::
size_t slicePitch,
3994 void* host_ptr = NULL,
3998 cl_image_desc desc =
4000 CL_MEM_OBJECT_IMAGE2D_ARRAY,
4009 object_ = ::clCreateImage(
4017 detail::errHandler(error, __CREATE_IMAGE_ERR);
4027 Image2DArray& operator = (
const cl_mem& rhs)
4036 Image2DArray(
const Image2DArray& img) : Image(img) {}
4041 Image2DArray& operator = (
const Image2DArray &img)
4047 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4051 Image2DArray(Image2DArray&& img)
CL_HPP_NOEXCEPT : Image(std::move(img)) {}
4056 Image2DArray& operator = (Image2DArray &&img)
4061 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4063 #endif // #if defined(CL_VERSION_1_2) 4085 ::
size_t row_pitch = 0,
4086 ::
size_t slice_pitch = 0,
4087 void* host_ptr = NULL,
4091 bool useCreateImage;
4093 #if defined(CL_VERSION_1_2) && defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 4096 cl_uint version = detail::getContextPlatformVersion(context());
4097 useCreateImage = (version >= 0x10002);
4099 #elif defined(CL_VERSION_1_2) 4100 useCreateImage =
true;
4102 useCreateImage =
false;
4105 #if defined(CL_VERSION_1_2) 4108 cl_image_desc desc =
4110 CL_MEM_OBJECT_IMAGE3D,
4127 detail::errHandler(error, __CREATE_IMAGE_ERR);
4132 #endif // #if defined(CL_VERSION_1_2) 4133 #if !defined(CL_VERSION_1_2) || defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 4134 if (!useCreateImage)
4137 context(), flags, &format, width, height, depth, row_pitch,
4138 slice_pitch, host_ptr, &error);
4140 detail::errHandler(error, __CREATE_IMAGE3D_ERR);
4145 #endif // #if !defined(CL_VERSION_1_2) || defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) 4181 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4195 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4198 #if !defined(CL_VERSION_1_2) 4221 cl_int * err = NULL)
4224 object_ = ::clCreateFromGLTexture3D(
4232 detail::errHandler(error, __CREATE_GL_TEXTURE_3D_ERR);
4271 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4285 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4287 #endif // #if !defined(CL_VERSION_1_2) 4289 #if defined(CL_VERSION_1_2) 4296 class ImageGL :
public Image
4300 const Context& context,
4305 cl_int * err = NULL)
4308 object_ = ::clCreateFromGLTexture(
4316 detail::errHandler(error, __CREATE_GL_TEXTURE_ERR);
4322 ImageGL() : Image() { }
4326 ImageGL& operator = (
const cl_mem& rhs)
4335 ImageGL(
const ImageGL& img) : Image(img) {}
4340 ImageGL& operator = (
const ImageGL &img)
4346 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4355 ImageGL& operator = (ImageGL &&img)
4360 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4362 #endif // #if defined(CL_VERSION_1_2) 4373 #if defined(CL_VERSION_1_2) 4375 #else // #if defined(CL_VERSION_1_2) 4377 #endif //#if defined(CL_VERSION_1_2) 4389 cl_int * err = NULL)
4392 object_ = ::clCreateFromGLRenderbuffer(
4398 detail::errHandler(error, __CREATE_GL_RENDER_BUFFER_ERR);
4405 #if defined(CL_VERSION_1_2) 4407 #else // #if defined(CL_VERSION_1_2) 4409 #endif //#if defined(CL_VERSION_1_2) 4415 #if defined(CL_VERSION_1_2) 4417 #else // #if defined(CL_VERSION_1_2) 4419 #endif //#if defined(CL_VERSION_1_2) 4428 #if defined(CL_VERSION_1_2) 4429 ImageGL::operator=(rhs);
4430 #else // #if defined(CL_VERSION_1_2) 4431 Image2DGL::operator=(rhs);
4432 #endif //#if defined(CL_VERSION_1_2) 4440 #if defined(CL_VERSION_1_2) 4442 #else // #if defined(CL_VERSION_1_2) 4444 #endif //#if defined(CL_VERSION_1_2) 4451 #if defined(CL_VERSION_1_2) 4452 ImageGL::operator=(rhs);
4453 #else // #if defined(CL_VERSION_1_2) 4454 Image2DGL::operator=(rhs);
4455 #endif //#if defined(CL_VERSION_1_2) 4459 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4463 #if defined(CL_VERSION_1_2) 4465 #else // #if defined(CL_VERSION_1_2) 4467 #endif //#if defined(CL_VERSION_1_2) 4475 #if defined(CL_VERSION_1_2) 4476 ImageGL::operator=(std::move(buf));
4477 #else // #if defined(CL_VERSION_1_2) 4478 Image2DGL::operator=(std::move(buf));
4479 #endif //#if defined(CL_VERSION_1_2) 4483 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4487 cl_gl_object_type *
type,
4488 cl_GLuint * gl_object_name)
4490 return detail::errHandler(
4491 ::clGetGLObjectInfo(object_,
type, gl_object_name),
4492 __GET_GL_OBJECT_INFO_ERR);
4516 cl_bool normalized_coords,
4517 cl_addressing_mode addressing_mode,
4518 cl_filter_mode filter_mode,
4529 detail::errHandler(error, __CREATE_SAMPLER_ERR);
4567 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4581 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4584 template <
typename T>
4585 cl_int
getInfo(cl_sampler_info name, T* param)
const 4587 return detail::errHandler(
4589 __GET_SAMPLER_INFO_ERR);
4593 template <cl_
int name>
typename 4598 detail::cl_sampler_info, name>::param_type param;
4599 cl_int result =
getInfo(name, ¶m);
4616 cl_uint dimensions_;
4640 NDRange(::
size_t size0, ::
size_t size1, ::
size_t size2)
4652 operator const ::size_t*()
const {
4653 return (const ::size_t*) sizes_;
4661 static const NDRange NullRange;
4671 template <
typename T>
4674 static ::size_t
size(
const T&) {
return sizeof(T); }
4675 static const T*
ptr(
const T& value) {
return &value; }
4694 inline LocalSpaceArg
4704 inline LocalSpaceArg
4724 inline Kernel(
const Program& program,
const char* name, cl_int* err = NULL);
4761 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4775 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 4777 template <
typename T>
4778 cl_int
getInfo(cl_kernel_info name, T* param)
const 4780 return detail::errHandler(
4782 __GET_KERNEL_INFO_ERR);
4785 template <cl_
int name>
typename 4790 detail::cl_kernel_info, name>::param_type param;
4791 cl_int result =
getInfo(name, ¶m);
4798 #if defined(CL_VERSION_1_2) 4799 template <
typename T>
4800 cl_int getArgInfo(cl_uint argIndex, cl_kernel_arg_info name, T* param)
const 4802 return detail::errHandler(
4804 __GET_KERNEL_ARG_INFO_ERR);
4807 template <cl_
int name>
typename 4808 detail::param_traits<detail::cl_kernel_arg_info, name>::param_type
4809 getArgInfo(cl_uint argIndex, cl_int* err = NULL)
const 4811 typename detail::param_traits<
4812 detail::cl_kernel_arg_info, name>::param_type param;
4813 cl_int result = getArgInfo(argIndex, name, ¶m);
4819 #endif // #if defined(CL_VERSION_1_2) 4821 template <
typename T>
4823 const Device& device, cl_kernel_work_group_info name, T* param)
const 4825 return detail::errHandler(
4827 &::clGetKernelWorkGroupInfo,
object_, device(), name, param),
4828 __GET_KERNEL_WORK_GROUP_INFO_ERR);
4831 template <cl_
int name>
typename 4836 detail::cl_kernel_work_group_info, name>::param_type param;
4844 template <
typename T>
4847 return detail::errHandler(
4853 __SET_KERNEL_ARGS_ERR);
4856 cl_int
setArg(cl_uint index, ::
size_t size,
const void* argPtr)
4858 return detail::errHandler(
4859 ::clSetKernelArg(
object_, index, size, argPtr),
4860 __SET_KERNEL_ARGS_ERR);
4870 typedef VECTOR_CLASS<std::pair<const void*, ::size_t> >
Binaries;
4871 typedef VECTOR_CLASS<std::pair<const char*, ::size_t> >
Sources;
4880 const char * strings = source.c_str();
4881 const ::size_t length = source.size();
4885 object_ = ::clCreateProgramWithSource(
4886 context(), (cl_uint)1, &strings, &length, &error);
4888 detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR);
4890 if (error == CL_SUCCESS &&
build) {
4892 error = ::clBuildProgram(
4900 detail::errHandler(error, __BUILD_PROGRAM_ERR);
4916 const char * strings = source.c_str();
4917 const ::size_t length = source.size();
4919 object_ = ::clCreateProgramWithSource(
4920 context(), (cl_uint)1, &strings, &length, &error);
4922 detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR);
4924 if (error == CL_SUCCESS &&
build) {
4926 error = ::clBuildProgram(
4934 detail::errHandler(error, __BUILD_PROGRAM_ERR);
4949 const ::size_t n = (
::size_t)sources.size();
4951 const char** strings = (
const char**) alloca(n *
sizeof(
const char*));
4953 for (::
size_t i = 0; i < n; ++i) {
4954 strings[i] = sources[(int)i].first;
4955 lengths[i] = sources[(int)i].second;
4958 object_ = ::clCreateProgramWithSource(
4959 context(), (cl_uint)n, strings, lengths, &error);
4961 detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR);
4988 const VECTOR_CLASS<Device>& devices,
4990 VECTOR_CLASS<cl_int>* binaryStatus = NULL,
4995 const ::size_t numDevices = devices.size();
4998 if(binaries.size() != numDevices) {
4999 error = CL_INVALID_VALUE;
5000 detail::errHandler(error, __CREATE_PROGRAM_WITH_BINARY_ERR);
5008 const unsigned char** images = (
const unsigned char**) alloca(numDevices *
sizeof(
const unsigned char**));
5010 for (::
size_t i = 0; i < numDevices; ++i) {
5011 images[i] = (
const unsigned char*)binaries[i].first;
5012 lengths[i] = binaries[(int)i].second;
5015 cl_device_id* deviceIDs = (cl_device_id*) alloca(numDevices *
sizeof(cl_device_id));
5016 for( ::
size_t deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) {
5017 deviceIDs[deviceIndex] = (devices[deviceIndex])();
5021 binaryStatus->resize(numDevices);
5024 object_ = ::clCreateProgramWithBinary(
5025 context(), (cl_uint) devices.size(),
5027 lengths, images, (binaryStatus != NULL && numDevices > 0)
5028 ? &binaryStatus->front()
5031 detail::errHandler(error, __CREATE_PROGRAM_WITH_BINARY_ERR);
5038 #if defined(CL_VERSION_1_2) 5045 const VECTOR_CLASS<Device>& devices,
5052 ::size_t numDevices = devices.size();
5053 cl_device_id* deviceIDs = (cl_device_id*) alloca(numDevices *
sizeof(cl_device_id));
5054 for( ::
size_t deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) {
5055 deviceIDs[deviceIndex] = (devices[deviceIndex])();
5058 object_ = ::clCreateProgramWithBuiltInKernels(
5060 (cl_uint) devices.size(),
5062 kernelNames.c_str(),
5065 detail::errHandler(error, __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR);
5070 #endif // #if defined(CL_VERSION_1_2) 5096 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 5110 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 5113 const VECTOR_CLASS<Device>& devices,
5114 const char* options = NULL,
5115 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
5116 void* data = NULL)
const 5118 ::size_t numDevices = devices.size();
5119 cl_device_id* deviceIDs = (cl_device_id*) alloca(numDevices *
sizeof(cl_device_id));
5120 for( ::
size_t deviceIndex = 0; deviceIndex < numDevices; ++deviceIndex ) {
5121 deviceIDs[deviceIndex] = (devices[deviceIndex])();
5124 return detail::errHandler(
5133 __BUILD_PROGRAM_ERR);
5137 const char* options = NULL,
5138 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
5139 void* data = NULL)
const 5141 return detail::errHandler(
5149 __BUILD_PROGRAM_ERR);
5152 #if defined(CL_VERSION_1_2) 5154 const char* options = NULL,
5155 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
5156 void* data = NULL)
const 5158 return detail::errHandler(
5169 __COMPILE_PROGRAM_ERR);
5173 template <
typename T>
5174 cl_int
getInfo(cl_program_info name, T* param)
const 5176 return detail::errHandler(
5178 __GET_PROGRAM_INFO_ERR);
5181 template <cl_
int name>
typename 5186 detail::cl_program_info, name>::param_type param;
5187 cl_int result =
getInfo(name, ¶m);
5194 template <
typename T>
5196 const Device& device, cl_program_build_info name, T* param)
const 5198 return detail::errHandler(
5200 &::clGetProgramBuildInfo,
object_, device(), name, param),
5201 __GET_PROGRAM_BUILD_INFO_ERR);
5204 template <cl_
int name>
typename 5209 detail::cl_program_build_info, name>::param_type param;
5220 cl_int err = ::clCreateKernelsInProgram(
object_, 0, NULL, &numKernels);
5221 if (err != CL_SUCCESS) {
5222 return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR);
5226 err = ::clCreateKernelsInProgram(
5227 object_, numKernels, (cl_kernel*) value, NULL);
5228 if (err != CL_SUCCESS) {
5229 return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR);
5232 kernels->assign(&value[0], &value[numKernels]);
5237 #if defined(CL_VERSION_1_2) 5238 inline Program linkProgram(
5241 const char* options = NULL,
5242 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
5246 cl_int error_local = CL_SUCCESS;
5248 cl_program programs[2] = { input1(), input2() };
5250 Context ctx = input1.getInfo<CL_PROGRAM_CONTEXT>(&error_local);
5251 if(error_local!=CL_SUCCESS) {
5252 detail::errHandler(error_local, __LINK_PROGRAM_ERR);
5255 cl_program prog = ::clLinkProgram(
5266 detail::errHandler(error_local,__COMPILE_PROGRAM_ERR);
5271 return Program(prog);
5274 inline Program linkProgram(
5275 VECTOR_CLASS<Program> inputPrograms,
5276 const char* options = NULL,
5277 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
5281 cl_int error_local = CL_SUCCESS;
5283 cl_program * programs = (cl_program*) alloca(inputPrograms.size() *
sizeof(cl_program));
5285 if (programs != NULL) {
5286 for (
unsigned int i = 0; i < inputPrograms.size(); i++) {
5287 programs[i] = inputPrograms[i]();
5292 if(inputPrograms.size() > 0) {
5293 ctx = inputPrograms[0].getInfo<CL_PROGRAM_CONTEXT>(&error_local);
5294 if(error_local!=CL_SUCCESS) {
5295 detail::errHandler(error_local, __LINK_PROGRAM_ERR);
5298 cl_program prog = ::clLinkProgram(
5303 (cl_uint)inputPrograms.size(),
5309 detail::errHandler(error_local,__COMPILE_PROGRAM_ERR);
5314 return Program(prog);
5319 inline VECTOR_CLASS<char *> cl::Program::getInfo<CL_PROGRAM_BINARIES>(cl_int* err)
const 5321 VECTOR_CLASS< ::size_t> sizes = getInfo<CL_PROGRAM_BINARY_SIZES>();
5322 VECTOR_CLASS<char *> binaries;
5323 for (VECTOR_CLASS< ::size_t>::iterator s = sizes.begin(); s != sizes.end(); ++s)
5328 binaries.push_back(ptr);
5331 cl_int result =
getInfo(CL_PROGRAM_BINARIES, &binaries);
5342 object_ = ::clCreateKernel(program(), name, &error);
5343 detail::errHandler(error, __CREATE_KERNEL_ERR);
5357 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 5358 static std::atomic<int> default_initialized_;
5359 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 5360 static volatile int default_initialized_;
5361 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 5363 static volatile cl_int default_error_;
5366 cl_command_queue_properties properties,
5372 detail::errHandler(error, __CREATE_CONTEXT_ERR);
5374 if (error != CL_SUCCESS) {
5382 object_ = ::clCreateCommandQueue(
5383 context(), device(), properties, &error);
5385 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
5396 cl_command_queue_properties properties = 0,
5400 VECTOR_CLASS<cl::Device> devices;
5401 error = context.
getInfo(CL_CONTEXT_DEVICES, &devices);
5403 detail::errHandler(error, __CREATE_CONTEXT_ERR);
5405 if (error != CL_SUCCESS)
5413 object_ = ::clCreateCommandQueue(context(), devices[0](), properties, &error);
5415 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
5426 cl_command_queue_properties properties = 0,
5430 object_ = ::clCreateCommandQueue(
5431 context(), device(), properties, &error);
5433 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
5453 #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 5467 #endif // #if defined(CL_HPP_RVALUE_REFERENCES_SUPPORTED) 5472 &default_initialized_,
5477 *err = default_error_;
5489 *err = default_error_;
5497 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
5499 if (error != CL_SUCCESS) {
5509 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
5517 default_error_ = error;
5524 *err = default_error_;
5540 template <
typename T>
5541 cl_int
getInfo(cl_command_queue_info name, T* param)
const 5543 return detail::errHandler(
5545 &::clGetCommandQueueInfo,
object_, name, param),
5546 __GET_COMMAND_QUEUE_INFO_ERR);
5549 template <cl_
int name>
typename 5554 detail::cl_command_queue_info, name>::param_type param;
5555 cl_int result =
getInfo(name, ¶m);
5568 const VECTOR_CLASS<Event>* events = NULL,
5569 Event* event = NULL)
const 5572 cl_int err = detail::errHandler(
5573 ::clEnqueueReadBuffer(
5576 (events != NULL) ? (cl_uint) events->size() : 0,
5577 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5578 (
event != NULL) ? &tmp : NULL),
5579 __ENQUEUE_READ_BUFFER_ERR);
5581 if (event != NULL && err == CL_SUCCESS)
5593 const VECTOR_CLASS<Event>* events = NULL,
5594 Event* event = NULL)
const 5597 cl_int err = detail::errHandler(
5598 ::clEnqueueWriteBuffer(
5601 (events != NULL) ? (cl_uint) events->size() : 0,
5602 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5603 (
event != NULL) ? &tmp : NULL),
5604 __ENQUEUE_WRITE_BUFFER_ERR);
5606 if (event != NULL && err == CL_SUCCESS)
5615 ::
size_t src_offset,
5616 ::
size_t dst_offset,
5618 const VECTOR_CLASS<Event>* events = NULL,
5619 Event* event = NULL)
const 5622 cl_int err = detail::errHandler(
5623 ::clEnqueueCopyBuffer(
5624 object_, src(), dst(), src_offset, dst_offset, size,
5625 (events != NULL) ? (cl_uint) events->size() : 0,
5626 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5627 (
event != NULL) ? &tmp : NULL),
5628 __ENQEUE_COPY_BUFFER_ERR);
5630 if (event != NULL && err == CL_SUCCESS)
5642 ::
size_t buffer_row_pitch,
5643 ::
size_t buffer_slice_pitch,
5644 ::
size_t host_row_pitch,
5645 ::
size_t host_slice_pitch,
5647 const VECTOR_CLASS<Event>* events = NULL,
5648 Event* event = NULL)
const 5651 cl_int err = detail::errHandler(
5652 ::clEnqueueReadBufferRect(
5656 (const ::size_t *)buffer_offset,
5657 (const ::size_t *)host_offset,
5658 (const ::size_t *)region,
5664 (events != NULL) ? (cl_uint) events->size() : 0,
5665 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5666 (
event != NULL) ? &tmp : NULL),
5667 __ENQUEUE_READ_BUFFER_RECT_ERR);
5669 if (event != NULL && err == CL_SUCCESS)
5681 ::
size_t buffer_row_pitch,
5682 ::
size_t buffer_slice_pitch,
5683 ::
size_t host_row_pitch,
5684 ::
size_t host_slice_pitch,
5686 const VECTOR_CLASS<Event>* events = NULL,
5687 Event* event = NULL)
const 5690 cl_int err = detail::errHandler(
5691 ::clEnqueueWriteBufferRect(
5695 (const ::size_t *)buffer_offset,
5696 (const ::size_t *)host_offset,
5697 (const ::size_t *)region,
5703 (events != NULL) ? (cl_uint) events->size() : 0,
5704 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5705 (
event != NULL) ? &tmp : NULL),
5706 __ENQUEUE_WRITE_BUFFER_RECT_ERR);
5708 if (event != NULL && err == CL_SUCCESS)
5720 ::
size_t src_row_pitch,
5721 ::
size_t src_slice_pitch,
5722 ::
size_t dst_row_pitch,
5723 ::
size_t dst_slice_pitch,
5724 const VECTOR_CLASS<Event>* events = NULL,
5725 Event* event = NULL)
const 5728 cl_int err = detail::errHandler(
5729 ::clEnqueueCopyBufferRect(
5733 (const ::size_t *)src_origin,
5734 (const ::size_t *)dst_origin,
5735 (const ::size_t *)region,
5740 (events != NULL) ? (cl_uint) events->size() : 0,
5741 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5742 (
event != NULL) ? &tmp : NULL),
5743 __ENQEUE_COPY_BUFFER_RECT_ERR);
5745 if (event != NULL && err == CL_SUCCESS)
5751 #if defined(CL_VERSION_1_2) 5758 template<
typename PatternType>
5759 cl_int enqueueFillBuffer(
5761 PatternType pattern,
5764 const VECTOR_CLASS<Event>* events = NULL,
5765 Event* event = NULL)
const 5768 cl_int err = detail::errHandler(
5769 ::clEnqueueFillBuffer(
5772 static_cast<void*>(&pattern),
5773 sizeof(PatternType),
5776 (events != NULL) ? (cl_uint) events->size() : 0,
5777 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5778 (
event != NULL) ? &tmp : NULL),
5779 __ENQUEUE_FILL_BUFFER_ERR);
5781 if (event != NULL && err == CL_SUCCESS)
5786 #endif // #if defined(CL_VERSION_1_2) 5794 ::
size_t slice_pitch,
5796 const VECTOR_CLASS<Event>* events = NULL,
5797 Event* event = NULL)
const 5800 cl_int err = detail::errHandler(
5801 ::clEnqueueReadImage(
5802 object_, image(), blocking, (const ::size_t *) origin,
5803 (const ::size_t *) region, row_pitch, slice_pitch, ptr,
5804 (events != NULL) ? (cl_uint) events->size() : 0,
5805 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5806 (
event != NULL) ? &tmp : NULL),
5807 __ENQUEUE_READ_IMAGE_ERR);
5809 if (event != NULL && err == CL_SUCCESS)
5821 ::
size_t slice_pitch,
5823 const VECTOR_CLASS<Event>* events = NULL,
5824 Event* event = NULL)
const 5827 cl_int err = detail::errHandler(
5828 ::clEnqueueWriteImage(
5829 object_, image(), blocking, (const ::size_t *) origin,
5830 (const ::size_t *) region, row_pitch, slice_pitch, ptr,
5831 (events != NULL) ? (cl_uint) events->size() : 0,
5832 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5833 (
event != NULL) ? &tmp : NULL),
5834 __ENQUEUE_WRITE_IMAGE_ERR);
5836 if (event != NULL && err == CL_SUCCESS)
5848 const VECTOR_CLASS<Event>* events = NULL,
5849 Event* event = NULL)
const 5852 cl_int err = detail::errHandler(
5853 ::clEnqueueCopyImage(
5854 object_, src(), dst(), (const ::size_t *) src_origin,
5855 (const ::size_t *)dst_origin, (const ::size_t *) region,
5856 (events != NULL) ? (cl_uint) events->size() : 0,
5857 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5858 (
event != NULL) ? &tmp : NULL),
5859 __ENQUEUE_COPY_IMAGE_ERR);
5861 if (event != NULL && err == CL_SUCCESS)
5867 #if defined(CL_VERSION_1_2) 5875 cl_int enqueueFillImage(
5877 cl_float4 fillColor,
5880 const VECTOR_CLASS<Event>* events = NULL,
5881 Event* event = NULL)
const 5884 cl_int err = detail::errHandler(
5885 ::clEnqueueFillImage(
5888 static_cast<void*>(&fillColor),
5889 (const ::size_t *) origin,
5890 (const ::size_t *) region,
5891 (events != NULL) ? (cl_uint) events->size() : 0,
5892 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5893 (
event != NULL) ? &tmp : NULL),
5894 __ENQUEUE_FILL_IMAGE_ERR);
5896 if (event != NULL && err == CL_SUCCESS)
5909 cl_int enqueueFillImage(
5912 const size_t<3>& origin,
5913 const size_t<3>& region,
5914 const VECTOR_CLASS<Event>* events = NULL,
5915 Event* event = NULL)
const 5918 cl_int err = detail::errHandler(
5919 ::clEnqueueFillImage(
5922 static_cast<void*>(&fillColor),
5923 (const ::size_t *) origin,
5924 (const ::size_t *) region,
5925 (events != NULL) ? (cl_uint) events->size() : 0,
5926 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5927 (
event != NULL) ? &tmp : NULL),
5928 __ENQUEUE_FILL_IMAGE_ERR);
5930 if (event != NULL && err == CL_SUCCESS)
5943 cl_int enqueueFillImage(
5946 const size_t<3>& origin,
5947 const size_t<3>& region,
5948 const VECTOR_CLASS<Event>* events = NULL,
5949 Event* event = NULL)
const 5952 cl_int err = detail::errHandler(
5953 ::clEnqueueFillImage(
5956 static_cast<void*>(&fillColor),
5957 (const ::size_t *) origin,
5958 (const ::size_t *) region,
5959 (events != NULL) ? (cl_uint) events->size() : 0,
5960 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5961 (
event != NULL) ? &tmp : NULL),
5962 __ENQUEUE_FILL_IMAGE_ERR);
5964 if (event != NULL && err == CL_SUCCESS)
5969 #endif // #if defined(CL_VERSION_1_2) 5976 ::
size_t dst_offset,
5977 const VECTOR_CLASS<Event>* events = NULL,
5978 Event* event = NULL)
const 5981 cl_int err = detail::errHandler(
5982 ::clEnqueueCopyImageToBuffer(
5983 object_, src(), dst(), (const ::size_t *) src_origin,
5984 (const ::size_t *) region, dst_offset,
5985 (events != NULL) ? (cl_uint) events->size() : 0,
5986 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
5987 (
event != NULL) ? &tmp : NULL),
5988 __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR);
5990 if (event != NULL && err == CL_SUCCESS)
5999 ::
size_t src_offset,
6002 const VECTOR_CLASS<Event>* events = NULL,
6003 Event* event = NULL)
const 6006 cl_int err = detail::errHandler(
6007 ::clEnqueueCopyBufferToImage(
6008 object_, src(), dst(), src_offset,
6009 (const ::size_t *) dst_origin, (const ::size_t *) region,
6010 (events != NULL) ? (cl_uint) events->size() : 0,
6011 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6012 (
event != NULL) ? &tmp : NULL),
6013 __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR);
6015 if (event != NULL && err == CL_SUCCESS)
6027 const VECTOR_CLASS<Event>* events = NULL,
6028 Event* event = NULL,
6029 cl_int* err = NULL)
const 6033 void * result = ::clEnqueueMapBuffer(
6035 (events != NULL) ? (cl_uint) events->size() : 0,
6036 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6037 (
event != NULL) ? &tmp : NULL,
6040 detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR);
6044 if (event != NULL && error == CL_SUCCESS)
6051 const Image& buffer,
6056 ::
size_t * row_pitch,
6057 ::
size_t * slice_pitch,
6058 const VECTOR_CLASS<Event>* events = NULL,
6059 Event* event = NULL,
6060 cl_int* err = NULL)
const 6064 void * result = ::clEnqueueMapImage(
6065 object_, buffer(), blocking, flags,
6066 (const ::size_t *) origin, (const ::size_t *) region,
6067 row_pitch, slice_pitch,
6068 (events != NULL) ? (cl_uint) events->size() : 0,
6069 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6070 (
event != NULL) ? &tmp : NULL,
6073 detail::errHandler(error, __ENQUEUE_MAP_IMAGE_ERR);
6077 if (event != NULL && error == CL_SUCCESS)
6085 const VECTOR_CLASS<Event>* events = NULL,
6086 Event* event = NULL)
const 6089 cl_int err = detail::errHandler(
6090 ::clEnqueueUnmapMemObject(
6091 object_, memory(), mapped_ptr,
6092 (events != NULL) ? (cl_uint) events->size() : 0,
6093 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6094 (
event != NULL) ? &tmp : NULL),
6095 __ENQUEUE_UNMAP_MEM_OBJECT_ERR);
6097 if (event != NULL && err == CL_SUCCESS)
6103 #if defined(CL_VERSION_1_2) 6115 cl_int enqueueMarkerWithWaitList(
6116 const VECTOR_CLASS<Event> *events = 0,
6120 cl_int err = detail::errHandler(
6121 ::clEnqueueMarkerWithWaitList(
6123 (events != NULL) ? (cl_uint) events->size() : 0,
6124 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6125 (
event != NULL) ? &tmp : NULL),
6126 __ENQUEUE_MARKER_WAIT_LIST_ERR);
6128 if (event != NULL && err == CL_SUCCESS)
6145 cl_int enqueueBarrierWithWaitList(
6146 const VECTOR_CLASS<Event> *events = 0,
6150 cl_int err = detail::errHandler(
6151 ::clEnqueueBarrierWithWaitList(
6153 (events != NULL) ? (cl_uint) events->size() : 0,
6154 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6155 (
event != NULL) ? &tmp : NULL),
6156 __ENQUEUE_BARRIER_WAIT_LIST_ERR);
6158 if (event != NULL && err == CL_SUCCESS)
6168 cl_int enqueueMigrateMemObjects(
6169 const VECTOR_CLASS<Memory> &memObjects,
6170 cl_mem_migration_flags flags,
6171 const VECTOR_CLASS<Event>* events = NULL,
6177 cl_mem* localMemObjects = static_cast<cl_mem*>(alloca(memObjects.size() *
sizeof(cl_mem)));
6178 for(
int i = 0; i < (int)memObjects.size(); ++i ) {
6179 localMemObjects[i] = memObjects[i]();
6183 cl_int err = detail::errHandler(
6184 ::clEnqueueMigrateMemObjects(
6186 (cl_uint)memObjects.size(),
6187 static_cast<const cl_mem*>(localMemObjects),
6189 (events != NULL) ? (cl_uint) events->size() : 0,
6190 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6191 (
event != NULL) ? &tmp : NULL),
6192 __ENQUEUE_UNMAP_MEM_OBJECT_ERR);
6194 if (event != NULL && err == CL_SUCCESS)
6199 #endif // #if defined(CL_VERSION_1_2) 6205 const NDRange& local = NullRange,
6206 const VECTOR_CLASS<Event>* events = NULL,
6207 Event* event = NULL)
const 6210 cl_int err = detail::errHandler(
6211 ::clEnqueueNDRangeKernel(
6213 offset.dimensions() != 0 ? (const ::size_t*)
offset : NULL,
6214 (const ::size_t*) global,
6215 local.
dimensions() != 0 ? (const ::size_t*) local : NULL,
6216 (events != NULL) ? (cl_uint) events->size() : 0,
6217 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6218 (
event != NULL) ? &tmp : NULL),
6219 __ENQUEUE_NDRANGE_KERNEL_ERR);
6221 if (event != NULL && err == CL_SUCCESS)
6229 const VECTOR_CLASS<Event>* events = NULL,
6230 Event* event = NULL)
const 6233 cl_int err = detail::errHandler(
6236 (events != NULL) ? (cl_uint) events->size() : 0,
6237 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6238 (
event != NULL) ? &tmp : NULL),
6239 __ENQUEUE_TASK_ERR);
6241 if (event != NULL && err == CL_SUCCESS)
6249 std::pair<void*, ::size_t> args,
6250 const VECTOR_CLASS<Memory>* mem_objects = NULL,
6251 const VECTOR_CLASS<const void*>* mem_locs = NULL,
6252 const VECTOR_CLASS<Event>* events = NULL,
6253 Event* event = NULL)
const 6255 cl_mem * mems = (mem_objects != NULL && mem_objects->size() > 0)
6256 ? (cl_mem*) alloca(mem_objects->size() *
sizeof(cl_mem))
6260 for (
unsigned int i = 0; i < mem_objects->size(); i++) {
6261 mems[i] = ((*mem_objects)[i])();
6266 cl_int err = detail::errHandler(
6267 ::clEnqueueNativeKernel(
6268 object_, userFptr, args.first, args.second,
6269 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
6271 (mem_locs != NULL && mem_locs->size() > 0) ? (
const void **) &mem_locs->front() : NULL,
6272 (events != NULL) ? (cl_uint) events->size() : 0,
6273 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6274 (
event != NULL) ? &tmp : NULL),
6275 __ENQUEUE_NATIVE_KERNEL);
6277 if (event != NULL && err == CL_SUCCESS)
6286 #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) || (defined(CL_VERSION_1_1) && !defined(CL_VERSION_1_2)) 6291 cl_int err = detail::errHandler(
6294 (event != NULL) ? &tmp : NULL),
6295 __ENQUEUE_MARKER_ERR);
6297 if (event != NULL && err == CL_SUCCESS)
6306 return detail::errHandler(
6307 ::clEnqueueWaitForEvents(
6309 (cl_uint) events.size(),
6310 events.size() > 0 ? (
const cl_event*) &events.front() : NULL),
6311 __ENQUEUE_WAIT_FOR_EVENTS_ERR);
6313 #endif // #if defined(CL_VERSION_1_1) 6316 const VECTOR_CLASS<Memory>* mem_objects = NULL,
6317 const VECTOR_CLASS<Event>* events = NULL,
6318 Event* event = NULL)
const 6321 cl_int err = detail::errHandler(
6322 ::clEnqueueAcquireGLObjects(
6324 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
6325 (mem_objects != NULL && mem_objects->size() > 0) ? (
const cl_mem *) &mem_objects->front(): NULL,
6326 (events != NULL) ? (cl_uint) events->size() : 0,
6327 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6328 (
event != NULL) ? &tmp : NULL),
6329 __ENQUEUE_ACQUIRE_GL_ERR);
6331 if (event != NULL && err == CL_SUCCESS)
6338 const VECTOR_CLASS<Memory>* mem_objects = NULL,
6339 const VECTOR_CLASS<Event>* events = NULL,
6340 Event* event = NULL)
const 6343 cl_int err = detail::errHandler(
6344 ::clEnqueueReleaseGLObjects(
6346 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
6347 (mem_objects != NULL && mem_objects->size() > 0) ? (
const cl_mem *) &mem_objects->front(): NULL,
6348 (events != NULL) ? (cl_uint) events->size() : 0,
6349 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6350 (
event != NULL) ? &tmp : NULL),
6351 __ENQUEUE_RELEASE_GL_ERR);
6353 if (event != NULL && err == CL_SUCCESS)
6359 #if defined (USE_DX_INTEROP) 6360 typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clEnqueueAcquireD3D10ObjectsKHR)(
6361 cl_command_queue command_queue, cl_uint num_objects,
6362 const cl_mem* mem_objects, cl_uint num_events_in_wait_list,
6363 const cl_event* event_wait_list, cl_event* event);
6364 typedef CL_API_ENTRY cl_int (CL_API_CALL *PFN_clEnqueueReleaseD3D10ObjectsKHR)(
6365 cl_command_queue command_queue, cl_uint num_objects,
6366 const cl_mem* mem_objects, cl_uint num_events_in_wait_list,
6367 const cl_event* event_wait_list, cl_event* event);
6369 cl_int enqueueAcquireD3D10Objects(
6370 const VECTOR_CLASS<Memory>* mem_objects = NULL,
6371 const VECTOR_CLASS<Event>* events = NULL,
6372 Event* event = NULL)
const 6374 static PFN_clEnqueueAcquireD3D10ObjectsKHR pfn_clEnqueueAcquireD3D10ObjectsKHR = NULL;
6375 #if defined(CL_VERSION_1_2) 6376 cl_context context = getInfo<CL_QUEUE_CONTEXT>();
6377 cl::Device device(getInfo<CL_QUEUE_DEVICE>());
6378 cl_platform_id platform = device.
getInfo<CL_DEVICE_PLATFORM>();
6379 __INIT_CL_EXT_FCN_PTR_PLATFORM(platform, clEnqueueAcquireD3D10ObjectsKHR);
6381 #if defined(CL_VERSION_1_1) 6382 __INIT_CL_EXT_FCN_PTR(clEnqueueAcquireD3D10ObjectsKHR);
6386 cl_int err = detail::errHandler(
6387 pfn_clEnqueueAcquireD3D10ObjectsKHR(
6389 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
6390 (mem_objects != NULL && mem_objects->size() > 0) ? (
const cl_mem *) &mem_objects->front(): NULL,
6391 (events != NULL) ? (cl_uint) events->size() : 0,
6392 (events != NULL) ? (cl_event*) &events->front() : NULL,
6393 (
event != NULL) ? &tmp : NULL),
6394 __ENQUEUE_ACQUIRE_GL_ERR);
6396 if (event != NULL && err == CL_SUCCESS)
6402 cl_int enqueueReleaseD3D10Objects(
6403 const VECTOR_CLASS<Memory>* mem_objects = NULL,
6404 const VECTOR_CLASS<Event>* events = NULL,
6405 Event* event = NULL)
const 6407 static PFN_clEnqueueReleaseD3D10ObjectsKHR pfn_clEnqueueReleaseD3D10ObjectsKHR = NULL;
6408 #if defined(CL_VERSION_1_2) 6409 cl_context context = getInfo<CL_QUEUE_CONTEXT>();
6410 cl::Device device(getInfo<CL_QUEUE_DEVICE>());
6411 cl_platform_id platform = device.
getInfo<CL_DEVICE_PLATFORM>();
6412 __INIT_CL_EXT_FCN_PTR_PLATFORM(platform, clEnqueueReleaseD3D10ObjectsKHR);
6413 #endif // #if defined(CL_VERSION_1_2) 6414 #if defined(CL_VERSION_1_1) 6415 __INIT_CL_EXT_FCN_PTR(clEnqueueReleaseD3D10ObjectsKHR);
6416 #endif // #if defined(CL_VERSION_1_1) 6419 cl_int err = detail::errHandler(
6420 pfn_clEnqueueReleaseD3D10ObjectsKHR(
6422 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
6423 (mem_objects != NULL && mem_objects->size() > 0) ? (
const cl_mem *) &mem_objects->front(): NULL,
6424 (events != NULL) ? (cl_uint) events->size() : 0,
6425 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6426 (
event != NULL) ? &tmp : NULL),
6427 __ENQUEUE_RELEASE_GL_ERR);
6429 if (event != NULL && err == CL_SUCCESS)
6439 #if defined(CL_USE_DEPRECATED_OPENCL_1_1_APIS) || (defined(CL_VERSION_1_1) && !defined(CL_VERSION_1_2)) 6443 return detail::errHandler(
6445 __ENQUEUE_BARRIER_ERR);
6447 #endif // #if defined(CL_VERSION_1_1) 6451 return detail::errHandler(::clFlush(
object_), __FLUSH_ERR);
6456 return detail::errHandler(::clFinish(
object_), __FINISH_ERR);
6461 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 6462 __declspec(selectany) std::atomic<int> CommandQueue::default_initialized_;
6463 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 6465 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 6466 __declspec(selectany)
CommandQueue CommandQueue::default_;
6467 __declspec(selectany)
volatile cl_int CommandQueue::default_error_ = CL_SUCCESS;
6469 #ifdef CL_HPP_CPP11_ATOMICS_SUPPORTED 6470 __attribute__((weak)) std::atomic<int> CommandQueue::default_initialized_;
6471 #else // !CL_HPP_CPP11_ATOMICS_SUPPORTED 6473 #endif // !CL_HPP_CPP11_ATOMICS_SUPPORTED 6474 __attribute__((weak))
CommandQueue CommandQueue::default_;
6475 __attribute__((weak))
volatile cl_int CommandQueue::default_error_ = CL_SUCCESS;
6478 template<
typename IteratorType >
6480 const Context &context,
6481 IteratorType startIterator,
6482 IteratorType endIterator,
6487 typedef typename std::iterator_traits<IteratorType>::value_type DataType;
6490 cl_mem_flags flags = 0;
6492 flags |= CL_MEM_READ_ONLY;
6495 flags |= CL_MEM_READ_WRITE;
6498 flags |= CL_MEM_USE_HOST_PTR;
6501 ::size_t size =
sizeof(DataType)*(endIterator - startIterator);
6504 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
6506 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);
6509 detail::errHandler(error, __CREATE_BUFFER_ERR);
6516 detail::errHandler(error, __CREATE_BUFFER_ERR);
6521 error =
cl::copy(queue, startIterator, endIterator, *
this);
6522 detail::errHandler(error, __CREATE_BUFFER_ERR);
6529 template<
typename IteratorType >
6532 IteratorType startIterator,
6533 IteratorType endIterator,
6538 typedef typename std::iterator_traits<IteratorType>::value_type DataType;
6541 cl_mem_flags flags = 0;
6543 flags |= CL_MEM_READ_ONLY;
6546 flags |= CL_MEM_READ_WRITE;
6549 flags |= CL_MEM_USE_HOST_PTR;
6552 ::size_t size =
sizeof(DataType)*(endIterator - startIterator);
6557 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
6560 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);
6563 detail::errHandler(error, __CREATE_BUFFER_ERR);
6569 error =
cl::copy(queue, startIterator, endIterator, *
this);
6570 detail::errHandler(error, __CREATE_BUFFER_ERR);
6583 const VECTOR_CLASS<Event>* events = NULL,
6584 Event* event = NULL)
6589 if (error != CL_SUCCESS) {
6602 const VECTOR_CLASS<Event>* events = NULL,
6603 Event* event = NULL)
6608 if (error != CL_SUCCESS) {
6621 const VECTOR_CLASS<Event>* events = NULL,
6622 Event* event = NULL,
6627 detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR);
6632 void * result = ::clEnqueueMapBuffer(
6633 queue(), buffer(), blocking, flags,
offset, size,
6634 (events != NULL) ? (cl_uint) events->size() : 0,
6635 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6639 detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR);
6649 const VECTOR_CLASS<Event>* events = NULL,
6650 Event* event = NULL)
6654 detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR);
6655 if (error != CL_SUCCESS) {
6660 cl_int err = detail::errHandler(
6661 ::clEnqueueUnmapMemObject(
6662 queue(), memory(), mapped_ptr,
6663 (events != NULL) ? (cl_uint) events->size() : 0,
6664 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
6665 (
event != NULL) ? &tmp : NULL),
6666 __ENQUEUE_UNMAP_MEM_OBJECT_ERR);
6668 if (event != NULL && err == CL_SUCCESS)
6677 ::
size_t src_offset,
6678 ::
size_t dst_offset,
6680 const VECTOR_CLASS<Event>* events = NULL,
6681 Event* event = NULL)
6686 if (error != CL_SUCCESS) {
6690 return queue.
enqueueCopyBuffer(src, dst, src_offset, dst_offset, size, events, event);
6698 template<
typename IteratorType >
6699 inline cl_int
copy( IteratorType startIterator, IteratorType endIterator,
cl::Buffer &buffer )
6703 if (error != CL_SUCCESS)
6706 return cl::copy(queue, startIterator, endIterator, buffer);
6714 template<
typename IteratorType >
6715 inline cl_int
copy(
const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator )
6719 if (error != CL_SUCCESS)
6722 return cl::copy(queue, buffer, startIterator, endIterator);
6730 template<
typename IteratorType >
6733 typedef typename std::iterator_traits<IteratorType>::value_type DataType;
6736 ::size_t length = endIterator-startIterator;
6737 ::size_t byteLength = length*
sizeof(DataType);
6740 static_cast<DataType*>(queue.
enqueueMapBuffer(buffer, CL_TRUE, CL_MAP_WRITE, 0, byteLength, 0, 0, &error));
6742 if( error != CL_SUCCESS ) {
6745 #if defined(_MSC_VER) 6749 stdext::checked_array_iterator<DataType*>(
6752 std::copy(startIterator, endIterator, pointer);
6757 if( error != CL_SUCCESS ) {
6769 template<
typename IteratorType >
6772 typedef typename std::iterator_traits<IteratorType>::value_type DataType;
6775 ::size_t length = endIterator-startIterator;
6776 ::size_t byteLength = length*
sizeof(DataType);
6779 static_cast<DataType*>(queue.
enqueueMapBuffer(buffer, CL_TRUE, CL_MAP_READ, 0, byteLength, 0, 0, &error));
6781 if( error != CL_SUCCESS ) {
6784 std::copy(pointer, pointer + length, startIterator);
6788 if( error != CL_SUCCESS ) {
6795 #if defined(CL_VERSION_1_1) 6796 inline cl_int enqueueReadBufferRect(
6797 const Buffer& buffer,
6799 const size_t<3>& buffer_offset,
6800 const size_t<3>& host_offset,
6801 const size_t<3>& region,
6802 ::
size_t buffer_row_pitch,
6803 ::
size_t buffer_slice_pitch,
6804 ::
size_t host_row_pitch,
6805 ::
size_t host_slice_pitch,
6807 const VECTOR_CLASS<Event>* events = NULL,
6808 Event* event = NULL)
6813 if (error != CL_SUCCESS) {
6817 return queue.enqueueReadBufferRect(
6832 inline cl_int enqueueWriteBufferRect(
6833 const Buffer& buffer,
6835 const size_t<3>& buffer_offset,
6836 const size_t<3>& host_offset,
6837 const size_t<3>& region,
6838 ::
size_t buffer_row_pitch,
6839 ::
size_t buffer_slice_pitch,
6840 ::
size_t host_row_pitch,
6841 ::
size_t host_slice_pitch,
6843 const VECTOR_CLASS<Event>* events = NULL,
6844 Event* event = NULL)
6849 if (error != CL_SUCCESS) {
6853 return queue.enqueueWriteBufferRect(
6868 inline cl_int enqueueCopyBufferRect(
6871 const size_t<3>& src_origin,
6872 const size_t<3>& dst_origin,
6873 const size_t<3>& region,
6874 ::
size_t src_row_pitch,
6875 ::
size_t src_slice_pitch,
6876 ::
size_t dst_row_pitch,
6877 ::
size_t dst_slice_pitch,
6878 const VECTOR_CLASS<Event>* events = NULL,
6879 Event* event = NULL)
6884 if (error != CL_SUCCESS) {
6888 return queue.enqueueCopyBufferRect(
6909 ::
size_t slice_pitch,
6911 const VECTOR_CLASS<Event>* events = NULL,
6912 Event* event = NULL)
6917 if (error != CL_SUCCESS) {
6939 ::
size_t slice_pitch,
6941 const VECTOR_CLASS<Event>* events = NULL,
6942 Event* event = NULL)
6947 if (error != CL_SUCCESS) {
6969 const VECTOR_CLASS<Event>* events = NULL,
6970 Event* event = NULL)
6975 if (error != CL_SUCCESS) {
6994 ::
size_t dst_offset,
6995 const VECTOR_CLASS<Event>* events = NULL,
6996 Event* event = NULL)
7001 if (error != CL_SUCCESS) {
7018 ::
size_t src_offset,
7021 const VECTOR_CLASS<Event>* events = NULL,
7022 Event* event = NULL)
7027 if (error != CL_SUCCESS) {
7047 if (error != CL_SUCCESS) {
7051 return queue.
flush();
7059 if (error != CL_SUCCESS) {
7253 template<
int index,
typename T0>
7258 kernel.
setArg(index, arg);
7271 typename T0,
typename T1,
typename T2,
typename T3,
7272 typename T4,
typename T5,
typename T6,
typename T7,
7273 typename T8,
typename T9,
typename T10,
typename T11,
7274 typename T12,
typename T13,
typename T14,
typename T15,
7275 typename T16,
typename T17,
typename T18,
typename T19,
7276 typename T20,
typename T21,
typename T22,
typename T23,
7277 typename T24,
typename T25,
typename T26,
typename T27,
7278 typename T28,
typename T29,
typename T30,
typename T31
7294 cl_int * err = NULL) :
7295 kernel_(program, name.c_str(), err)
7459 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 32)) 7461 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
7685 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 31)) 7687 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
7907 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 30)) 7909 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
8125 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 29)) 8127 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
8339 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 28)) 8341 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
8549 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 27)) 8551 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
8755 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 26)) 8757 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
8957 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 25)) 8959 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
9155 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 24)) 9157 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
9349 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 23)) 9351 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
9539 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 22)) 9541 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
9725 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 21)) 9727 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
9907 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 20)) 9909 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10085 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 19)) 10087 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10259 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 18)) 10261 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10429 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 17)) 10431 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10595 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 16)) 10597 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10757 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 15)) 10759 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
10915 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 14)) 10917 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11069 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 13)) 11071 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11219 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 12)) 11221 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11365 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 11)) 11367 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11507 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 10)) 11509 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11645 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 9)) 11647 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11779 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 8)) 11781 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
11909 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 7)) 11911 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12035 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 6)) 12037 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12157 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 5)) 12159 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12275 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 4)) 12277 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12389 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 3)) 12391 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12499 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 2)) 12501 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12605 #if (defined(_WIN32) && defined(_VARIADIC_MAX) && (_VARIADIC_MAX < 1)) 12607 static_assert(0,
"Visual Studio has a hard limit of argument count for a std::function expansion. Please define _VARIADIC_MAX to be 10. If you need more arguments than that VC12 and below cannot support it.");
12641 typename T0,
typename T1 = detail::NullType,
typename T2 = detail::NullType,
12642 typename T3 = detail::NullType,
typename T4 = detail::NullType,
12643 typename T5 = detail::NullType,
typename T6 = detail::NullType,
12644 typename T7 = detail::NullType,
typename T8 = detail::NullType,
12645 typename T9 = detail::NullType,
typename T10 = detail::NullType,
12646 typename T11 = detail::NullType,
typename T12 = detail::NullType,
12647 typename T13 = detail::NullType,
typename T14 = detail::NullType,
12648 typename T15 = detail::NullType,
typename T16 = detail::NullType,
12649 typename T17 = detail::NullType,
typename T18 = detail::NullType,
12650 typename T19 = detail::NullType,
typename T20 = detail::NullType,
12651 typename T21 = detail::NullType,
typename T22 = detail::NullType,
12652 typename T23 = detail::NullType,
typename T24 = detail::NullType,
12653 typename T25 = detail::NullType,
typename T26 = detail::NullType,
12654 typename T27 = detail::NullType,
typename T28 = detail::NullType,
12655 typename T29 = detail::NullType,
typename T30 = detail::NullType,
12656 typename T31 = detail::NullType
12663 T12, T13, T14, T15,
12664 T16, T17, T18, T19,
12665 T20, T21, T22, T23,
12666 T24, T25, T26, T27,
12675 T12, T13, T14, T15,
12676 T16, T17, T18, T19,
12677 T20, T21, T22, T23,
12678 T24, T25, T26, T27,
12685 cl_int * err = NULL) :
12690 T12, T13, T14, T15,
12691 T16, T17, T18, T19,
12692 T20, T21, T22, T23,
12693 T24, T25, T26, T27,
12705 T12, T13, T14, T15,
12706 T16, T17, T18, T19,
12707 T20, T21, T22, T23,
12708 T24, T25, T26, T27,
12719 #if !defined(__CL_USER_OVERRIDE_ERROR_STRINGS) 12720 #undef __GET_DEVICE_INFO_ERR 12721 #undef __GET_PLATFORM_INFO_ERR 12722 #undef __GET_DEVICE_IDS_ERR 12723 #undef __GET_CONTEXT_INFO_ERR 12724 #undef __GET_EVENT_INFO_ERR 12725 #undef __GET_EVENT_PROFILE_INFO_ERR 12726 #undef __GET_MEM_OBJECT_INFO_ERR 12727 #undef __GET_IMAGE_INFO_ERR 12728 #undef __GET_SAMPLER_INFO_ERR 12729 #undef __GET_KERNEL_INFO_ERR 12730 #undef __GET_KERNEL_ARG_INFO_ERR 12731 #undef __GET_KERNEL_WORK_GROUP_INFO_ERR 12732 #undef __GET_PROGRAM_INFO_ERR 12733 #undef __GET_PROGRAM_BUILD_INFO_ERR 12734 #undef __GET_COMMAND_QUEUE_INFO_ERR 12736 #undef __CREATE_CONTEXT_ERR 12737 #undef __CREATE_CONTEXT_FROM_TYPE_ERR 12738 #undef __GET_SUPPORTED_IMAGE_FORMATS_ERR 12740 #undef __CREATE_BUFFER_ERR 12741 #undef __CREATE_SUBBUFFER_ERR 12742 #undef __CREATE_IMAGE2D_ERR 12743 #undef __CREATE_IMAGE3D_ERR 12744 #undef __CREATE_SAMPLER_ERR 12745 #undef __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR 12747 #undef __CREATE_USER_EVENT_ERR 12748 #undef __SET_USER_EVENT_STATUS_ERR 12749 #undef __SET_EVENT_CALLBACK_ERR 12750 #undef __SET_PRINTF_CALLBACK_ERR 12752 #undef __WAIT_FOR_EVENTS_ERR 12754 #undef __CREATE_KERNEL_ERR 12755 #undef __SET_KERNEL_ARGS_ERR 12756 #undef __CREATE_PROGRAM_WITH_SOURCE_ERR 12757 #undef __CREATE_PROGRAM_WITH_BINARY_ERR 12758 #undef __CREATE_PROGRAM_WITH_BUILT_IN_KERNELS_ERR 12759 #undef __BUILD_PROGRAM_ERR 12760 #undef __CREATE_KERNELS_IN_PROGRAM_ERR 12762 #undef __CREATE_COMMAND_QUEUE_ERR 12763 #undef __SET_COMMAND_QUEUE_PROPERTY_ERR 12764 #undef __ENQUEUE_READ_BUFFER_ERR 12765 #undef __ENQUEUE_WRITE_BUFFER_ERR 12766 #undef __ENQUEUE_READ_BUFFER_RECT_ERR 12767 #undef __ENQUEUE_WRITE_BUFFER_RECT_ERR 12768 #undef __ENQEUE_COPY_BUFFER_ERR 12769 #undef __ENQEUE_COPY_BUFFER_RECT_ERR 12770 #undef __ENQUEUE_READ_IMAGE_ERR 12771 #undef __ENQUEUE_WRITE_IMAGE_ERR 12772 #undef __ENQUEUE_COPY_IMAGE_ERR 12773 #undef __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR 12774 #undef __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR 12775 #undef __ENQUEUE_MAP_BUFFER_ERR 12776 #undef __ENQUEUE_MAP_IMAGE_ERR 12777 #undef __ENQUEUE_UNMAP_MEM_OBJECT_ERR 12778 #undef __ENQUEUE_NDRANGE_KERNEL_ERR 12779 #undef __ENQUEUE_TASK_ERR 12780 #undef __ENQUEUE_NATIVE_KERNEL 12782 #undef __CL_EXPLICIT_CONSTRUCTORS 12784 #undef __UNLOAD_COMPILER_ERR 12785 #endif //__CL_USER_OVERRIDE_ERROR_STRINGS 12787 #undef __CL_FUNCTION_TYPE 12793 #if defined(CL_VERSION_1_1) 12794 #undef __INIT_CL_EXT_FCN_PTR 12795 #endif // #if defined(CL_VERSION_1_1) 12796 #undef __CREATE_SUB_DEVICES 12798 #if defined(USE_CL_DEVICE_FISSION) 12799 #undef __PARAM_NAME_DEVICE_FISSION 12800 #endif // USE_CL_DEVICE_FISSION 12802 #undef __DEFAULT_NOT_INITIALIZED 12803 #undef __DEFAULT_BEING_INITIALIZED 12804 #undef __DEFAULT_INITIALIZED 12806 #undef CL_HPP_RVALUE_REFERENCES_SUPPORTED 12807 #undef CL_HPP_NOEXCEPT 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 >::result_type Event result_type
Return type of the functor.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19)
Function signature of kernel functor with no event dependency.
Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26, T27 arg27, T28 arg28, T29 arg29, T30 arg30, T31 arg31)
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 >::result_type Event result_type
Return type of the functor.
Memory()
Default constructor - initializes to NULL.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::functor_ FunctorType functor_
#define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
Image3D(const Context &context, cl_mem_flags flags, ImageFormat format, ::size_t width, ::size_t height, ::size_t depth, ::size_t row_pitch=0, ::size_t slice_pitch=0, void *host_ptr=NULL, cl_int *err=NULL)
Constructs a 3D Image in a specified context.
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 >::functor_ FunctorType functor_
cl_int getInfoHelper(Functor f, cl_uint name, T *param, long)
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 >::result_type Event result_type
Return type of the functor.
cl_int enqueueWriteBufferRect(const Buffer &buffer, cl_bool blocking, const size_t< 3 > &buffer_offset, const size_t< 3 > &host_offset, const size_t< 3 > ®ion, ::size_t buffer_row_pitch, ::size_t buffer_slice_pitch, ::size_t host_row_pitch, ::size_t host_slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::FunctorType 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, NullType, NullType, NullType, NullType, NullType, NullType, NullType > FunctorType
Image2DGL(const Image2DGL &img)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
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 >::FunctorType 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, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType > FunctorType
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 >::FunctorType 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, NullType > FunctorType
Context(const Device &device, cl_context_properties *properties=NULL, void(CL_CALLBACK *notifyFptr)(const char *, const void *, ::size_t, void *)=NULL, void *data=NULL, cl_int *err=NULL)
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 >::functor_ FunctorType functor_
static cl_int retain(cl_sampler sampler)
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 >::result_type Event result_type
Return type of the functor.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::result_type Event result_type
Return type of the functor.
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 >::result_type Event result_type
Return type of the functor.
cl_int getInfo(cl_context_info name, T *param) const
Wrapper for clGetContextInfo().
EnqueueArgs(CommandQueue &queue, NDRange offset, NDRange global, NDRange local)
cl_int enqueueNDRangeKernel(const Kernel &kernel, const NDRange &offset, const NDRange &global, const NDRange &local=NullRange, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9)
Image & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
Buffer(const Context &context, cl_mem_flags flags, ::size_t size, void *host_ptr=NULL, cl_int *err=NULL)
Constructs a Buffer in a specified context.
Image3D(const Image3D &img)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::result_type Event result_type
Return type of the functor.
friend cl_int getInfoHelper(Func, cl_uint, U *, int, typename U::cl_type)
__CL_EXPLICIT_CONSTRUCTORS Context(const cl_context &context)
Constructor from cl_context - takes ownership.
__CL_EXPLICIT_CONSTRUCTORS Kernel(const cl_kernel &kernel)
Constructor from cl_kernel - takes ownership.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16)
cl_int enqueueUnmapMemObject(const Memory &memory, void *mapped_ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
__CL_EXPLICIT_CONSTRUCTORS Image2DGL(const cl_mem &image)
Constructor from cl_mem - takes ownership.
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 >::functor_ FunctorType functor_
static const void * ptr(const LocalSpaceArg &)
static cl_int release(cl_kernel kernel)
cl_int getSupportedImageFormats(cl_mem_flags flags, cl_mem_object_type type, VECTOR_CLASS< ImageFormat > *formats) const
Gets a list of supported image formats.
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 >::functor_ FunctorType functor_
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21)
Function signature of kernel functor with no event dependency.
__CL_EXPLICIT_CONSTRUCTORS Program(const cl_program &program)
EnqueueArgs(NDRange offset, NDRange global, NDRange local)
static cl_int retain(cl_command_queue queue)
LocalSpaceArg Local(::size_t size)
Helper function for generating LocalSpaceArg objects.
Image2D & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
The OpenCL C++ bindings are defined within this namespace.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)
Function signature of kernel functor with no event dependency.
detail::param_traits< detail::cl_device_info, name >::param_type getInfo(cl_int *err=NULL) const
Wrapper for clGetDeviceInfo() that returns by value.
Context(const Context &ctx)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
Local address wrapper for use with Kernel::setArg.
Class interface for GL 3D Image Memory objects.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
EnqueueArgs(CommandQueue &queue, const VECTOR_CLASS< Event > &events, NDRange global)
void * 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) const
detail::param_traits< detail::cl_program_info, name >::param_type getInfo(cl_int *err=NULL) const
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
cl_int enqueueCopyImageToBuffer(const Image &src, const Buffer &dst, const size_t< 3 > &src_origin, const size_t< 3 > ®ion, ::size_t dst_offset, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED LocalSpaceArg __local(::size_t size) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
Helper function for generating LocalSpaceArg objects. Deprecated. Replaced with Local.
static cl_int release(cl_mem memory)
Buffer(IteratorType startIterator, IteratorType endIterator, bool readOnly, bool useHostPtr=false, cl_int *err=NULL)
Construct a Buffer from a host container via iterators. IteratorType must be random access....
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
::size_t size(const LocalSpaceArg &value)
cl_int getWorkGroupInfo(const Device &device, cl_kernel_work_group_info name, T *param) const
cl_int enqueueUnmapMemObject(const Memory &memory, void *mapped_ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
Context(cl_device_type type, cl_context_properties *properties=NULL, void(CL_CALLBACK *notifyFptr)(const char *, const void *, ::size_t, void *)=NULL, void *data=NULL, cl_int *err=NULL)
Constructs a context including all or a subset of devices of a specified type.
Class interface for cl_mem.
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 >::functor_ FunctorType functor_
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26, T27 arg27)
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16)
Function signature of kernel functor with no event dependency.
Device(const Device &dev)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::result_type Event result_type
Return type of the functor.
detail::param_traits< detail::cl_image_info, name >::param_type getImageInfo(cl_int *err=NULL) const
Wrapper for clGetImageInfo() that returns by value.
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 >::result_type Event result_type
Return type of the functor.
Context & operator=(const Context &ctx)
Copy assignment to forward copy to the superclass correctly. Required for MSVC.
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
Event operator()(const EnqueueArgs &args, T0 t0, T1 t1=NullType(), T2 t2=NullType(), T3 t3=NullType(), T4 t4=NullType(), T5 t5=NullType(), T6 t6=NullType(), T7 t7=NullType(), T8 t8=NullType(), T9 t9=NullType(), T10 t10=NullType(), T11 t11=NullType(), T12 t12=NullType(), T13 t13=NullType(), T14 t14=NullType(), T15 t15=NullType(), T16 t16=NullType(), T17 t17=NullType(), T18 t18=NullType(), T19 t19=NullType(), T20 t20=NullType(), T21 t21=NullType(), T22 t22=NullType(), T23 t23=NullType(), T24 t24=NullType(), T25 t25=NullType(), T26 t26=NullType(), T27 t27=NullType(), T28 t28=NullType(), T29 t29=NullType(), T30 t30=NullType(), T31 t31=NullType())
class used to interface between C++ and OpenCL C calls that require arrays of size_t values,...
BufferRenderGL()
Default constructor - initializes to NULL.
Image(const Image &img)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2)
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 >::result_type Event result_type
Return type of the functor.
size_t()
Initialize size_t to all 0s.
__CL_EXPLICIT_CONSTRUCTORS Image3DGL(const cl_mem &image)
Constructor from cl_mem - takes ownership.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26, T27 arg27, T28 arg28, T29 arg29, T30 arg30)
Kernel(const Kernel &kernel)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
EnqueueArgs(const VECTOR_CLASS< Event > &events, NDRange global, NDRange local)
KernelFunctorGlobal(const Program &program, const STRING_CLASS name, cl_int *err=NULL)
std::shared_ptr< cl::CommandQueue > CommandQueue
CommandQueue(const Context &context, cl_command_queue_properties properties=0, cl_int *err=NULL)
Constructs a CommandQueue for an implementation defined device in the given context.
functionImplementation_(const FunctorType &functor)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8)
static cl_int retain(cl_device_id)
detail::param_traits< detail::cl_kernel_info, name >::param_type getInfo(cl_int *err=NULL) const
__CL_EXPLICIT_CONSTRUCTORS Image(const cl_mem &image)
Constructor from cl_mem - takes ownership.
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 >::result_type Event result_type
Return type of the functor.
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 >::functor_ FunctorType functor_
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 >::FunctorType 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, NullType, NullType, NullType, NullType, NullType, NullType > FunctorType
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 >::functor_ FunctorType functor_
Sampler(const Sampler &sam)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)
Function signature of kernel functor with no event dependency.
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 >::result_type Event result_type
Return type of the functor.
cl_int enqueueReadImage(const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > ®ion, ::size_t row_pitch, ::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
const ::size_t & operator[](int index) const
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
Event()
Default constructor - initializes to NULL.
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 >::result_type Event result_type
Return type of the functor.
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 >::type_ Event type_(const EnqueueArgs &, T0)
Function signature of kernel functor with no event dependency.
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
VECTOR_CLASS< std::pair< const void *, ::size_t > > Binaries
Wrapper(const Wrapper< cl_type > &rhs)
cl_int enqueueCopyImage(const Image &src, const Image &dst, const size_t< 3 > &src_origin, const size_t< 3 > &dst_origin, const size_t< 3 > ®ion, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::result_type Event result_type
Return type of the functor.
detail::param_traits< detail::cl_profiling_info, name >::param_type getProfilingInfo(cl_int *err=NULL) const
Wrapper for clGetEventProfilingInfo() that returns by value.
BufferRenderGL(const BufferRenderGL &buf)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
cl_int 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::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 >::functor_ FunctorType functor_
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23)
Image3D()
Default constructor - initializes to NULL.
CommandQueue(const Context &context, const Device &device, cl_command_queue_properties properties=0, cl_int *err=NULL)
#define __DEFAULT_INITIALIZED
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
Class interface for GL 2D Image Memory objects.
cl_int getInfo(cl_sampler_info name, T *param) const
Wrapper for clGetSamplerInfo().
cl_int enqueueReadBufferRect(const Buffer &buffer, cl_bool blocking, const size_t< 3 > &buffer_offset, const size_t< 3 > &host_offset, const size_t< 3 > ®ion, ::size_t buffer_row_pitch, ::size_t buffer_slice_pitch, ::size_t host_row_pitch, ::size_t host_slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
Kernel()
Default constructor - initializes to NULL.
cl_int enqueueCopyBufferRect(const Buffer &src, const Buffer &dst, const size_t< 3 > &src_origin, const size_t< 3 > &dst_origin, const size_t< 3 > ®ion, ::size_t src_row_pitch, ::size_t src_slice_pitch, ::size_t dst_row_pitch, ::size_t dst_slice_pitch, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::result_type Event result_type
Return type of the functor.
static cl_int release(cl_sampler sampler)
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2)
Function signature of kernel functor with no event dependency.
static cl_int release(cl_program program)
Sampler()
Default constructor - initializes to NULL.
EnqueueArgs(const VECTOR_CLASS< Event > &events, NDRange offset, NDRange global, NDRange local)
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 >::functor_ FunctorType functor_
#define __CL_EXPLICIT_CONSTRUCTORS
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
make_kernel(const Program &program, const STRING_CLASS name, cl_int *err=NULL)
detail::param_traits< detail::cl_kernel_work_group_info, name >::param_type getWorkGroupInfo(const Device &device, cl_int *err=NULL) const
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
cl_int getInfo(cl_command_queue_info name, T *param) const
cl_int enqueueTask(const Kernel &kernel, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
cl_int getObjectInfo(cl_gl_object_type *type, cl_GLuint *gl_object_name)
Wrapper for clGetGLObjectInfo().
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
bool operator==(const std::vector< T > &vector1, const std::vector< T > &vector2)
Compares two vectors.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14)
NDRange(::size_t size0, ::size_t size1)
Constructs two-dimensional range.
Wrapper(const cl_type &obj)
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 >::type_ Event type_(const EnqueueArgs &, T0, T1)
Function signature of kernel functor with no event dependency.
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17)
Function signature of kernel functor with no event dependency.
Class interface for cl_event.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
Function signature of kernel functor with no event dependency.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24)
Program(const Context &context, const Sources &sources, cl_int *err=NULL)
EnqueueArgs(const VECTOR_CLASS< Event > &events, NDRange global)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11)
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 >::type_ Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
EnqueueArgs(NDRange global)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
Program(const Context &context, const VECTOR_CLASS< Device > &devices, const Binaries &binaries, VECTOR_CLASS< cl_int > *binaryStatus=NULL, cl_int *err=NULL)
Buffer & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functor_ FunctorType functor_
static cl_int retain(cl_program program)
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 >::functor_ FunctorType functor_
detail::param_traits< detail::cl_event_info, name >::param_type getInfo(cl_int *err=NULL) const
Wrapper for clGetEventInfo() that returns by value.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
cl_int enqueueReleaseGLObjects(const VECTOR_CLASS< Memory > *mem_objects=NULL, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
static void set(Kernel, NullType)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
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 >::functor_ FunctorType functor_
cl_int build(const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
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 >::functor_ FunctorType functor_
Image2D(const Context &context, cl_mem_flags flags, ImageFormat format, ::size_t width, ::size_t height, ::size_t row_pitch=0, void *host_ptr=NULL, cl_int *err=NULL)
Constructs a 1D Image in a specified context.
Program & operator=(const cl_program &rhs)
Image2D(const Image2D &img)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
Buffer()
Default constructor - initializes to NULL.
cl_int 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) const
void * 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::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 >::functor_ FunctorType functor_
static cl_int retain(cl_mem memory)
Image3DGL(const Image3DGL &img)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
cl_int copy(IteratorType startIterator, IteratorType endIterator, cl::Buffer &buffer)
EnqueueArgs(CommandQueue &queue, const VECTOR_CLASS< Event > &events, NDRange offset, NDRange global, NDRange local)
cl_int enqueueReadBuffer(const Buffer &buffer, cl_bool blocking, ::size_t offset, ::size_t size, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
static cl_int retain(cl_kernel kernel)
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 >::FunctorType 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, NullType, NullType, NullType > FunctorType
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21)
Image2DGL()
Default constructor - initializes to NULL.
Image()
Default constructor - initializes to NULL.
cl_int 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) const
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 >::result_type Event result_type
Return type of the functor.
Event result_type
Return type of the functor.
cl_int getInfo(cl_device_info name, T *param) const
Wrapper for clGetDeviceInfo().
EnqueueArgs(CommandQueue &queue, Event e, NDRange global, NDRange local)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6)
Function signature of kernel functor with no event dependency.
CommandQueue & operator=(const CommandQueue &queue)
Copy assignment to forward copy to the superclass correctly. Required for MSVC.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3)
Function signature of kernel functor with no event dependency.
#define __DEFAULT_NOT_INITIALIZED
__CL_EXPLICIT_CONSTRUCTORS Image2D(const cl_mem &image2D)
Constructor from cl_mem - takes ownership.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15)
Image3DGL(const Context &context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texobj, cl_int *err=NULL)
Constructs an Image3DGL in a specified context, from a given GL Texture.
Image2D()
Default constructor - initializes to NULL.
Image2DGL(const Context &context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texobj, cl_int *err=NULL)
Constructs an Image2DGL in a specified context, from a given GL Texture.
__CL_EXPLICIT_CONSTRUCTORS CommandQueue(const cl_command_queue &commandQueue)
cl_int 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::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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::result_type Event result_type
Return type of the functor.
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 >::result_type Event result_type
Return type of the functor.
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 >::functor_ FunctorType functor_
cl_int enqueueCopyImage(const Image &src, const Image &dst, const size_t< 3 > &src_origin, const size_t< 3 > &dst_origin, const size_t< 3 > ®ion, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
const Block offset(const Block &bl, int a=1)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5)
Function signature of kernel functor with no event dependency.
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 >::result_type Event result_type
Return type of the functor.
__CL_EXPLICIT_CONSTRUCTORS Event(const cl_event &event)
Constructor from cl_event - takes ownership.
cl_int getInfo(cl_event_info name, T *param) const
Wrapper for clGetEventInfo().
cl_int enqueueCopyBufferToImage(const Buffer &src, const Image &dst, ::size_t src_offset, const size_t< 3 > &dst_origin, const size_t< 3 > ®ion, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 > FunctorType
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 >::functor_ FunctorType functor_
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
EnqueueArgs(Event e, NDRange offset, NDRange global, NDRange local)
EnqueueArgs(CommandQueue &queue, Event e, NDRange global)
make_kernel(const Kernel kernel)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18)
cl_int getInfo(cl_kernel_info name, T *param) const
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)
Function signature of kernel functor with no event dependency.
static bool isReferenceCountable(cl_device_id device)
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 >::functor_ FunctorType functor_
Context(const VECTOR_CLASS< Device > &devices, cl_context_properties *properties=NULL, void(CL_CALLBACK *notifyFptr)(const char *, const void *, ::size_t, void *)=NULL, void *data=NULL, cl_int *err=NULL)
Constructs a context including a list of specified devices.
EnqueueArgs(CommandQueue &queue, const VECTOR_CLASS< Event > &events, NDRange global, NDRange local)
__CL_EXPLICIT_CONSTRUCTORS BufferRenderGL(const cl_mem &buffer)
Constructor from cl_mem - takes ownership.
__CL_EXPLICIT_CONSTRUCTORS Image3D(const cl_mem &image3D)
Constructor from cl_mem - takes ownership.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functor_ FunctorType functor_
CommandQueue(const CommandQueue &queue)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::FunctorType 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, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType, NullType > FunctorType
cl_int enqueueReadBuffer(const Buffer &buffer, cl_bool blocking, ::size_t offset, ::size_t size, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
acl::TypeID type(acl::typeToTypeID< FlT >())
EnqueueArgs(CommandQueue &queue, Event e, NDRange offset, NDRange global, NDRange local)
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 >::functor_ FunctorType functor_
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18)
Function signature of kernel functor with no event dependency.
NDRange()
Default constructor - resulting range has zero dimensions.
BufferGL(const BufferGL &buf)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
EnqueueArgs(Event e, NDRange global, NDRange local)
EnqueueArgs(NDRange global, NDRange local)
Image3D & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
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 >::result_type Event result_type
Return type of the functor.
VECTOR_CLASS< std::pair< const char *, ::size_t > > Sources
cl_int operator()(cl_uint param, ::size_t size, void *value, ::size_t *size_ret)
CommandQueue(cl_command_queue_properties properties, cl_int *err=NULL)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
static void set(Kernel kernel, T0 arg)
Image3DGL & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
cl_int wait() const
Blocks the calling thread until this event completes.
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 >::functor_ FunctorType functor_
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::result_type Event result_type
Return type of the functor.
::size_t & operator[](int index)
Buffer(const Buffer &buf)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
BufferRenderGL & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
cl_int enqueueAcquireGLObjects(const VECTOR_CLASS< Memory > *mem_objects=NULL, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
Memory(const Memory &mem)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
#define __PARAM_NAME_INFO_1_0(F)
Program(const Program &program)
Copy constructor to forward copy to the superclass correctly. Required for MSVC.
Event type_(const EnqueueArgs &, 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)
Function signature of kernel functor with no event dependency.
cl_int getObjectInfo(cl_gl_object_type *type, cl_GLuint *gl_object_name)
Wrapper for clGetGLObjectInfo().
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20)
Function signature of kernel functor with no event dependency.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4)
Function signature of kernel functor with no event dependency.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
EnqueueArgs(CommandQueue &queue, NDRange global)
#define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
cl_int enqueueCopyImageToBuffer(const Image &src, const Buffer &dst, const size_t< 3 > &src_origin, const size_t< 3 > ®ion, ::size_t dst_offset, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22)
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)
Function signature of kernel functor with no event dependency.
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 >::functor_ FunctorType functor_
Image3DGL()
Default constructor - initializes to NULL.
::size_t dimensions() const
Queries the number of dimensions in the range.
cl_type operator()() const
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
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 >::functor_ FunctorType functor_
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
CommandQueue interface for cl_command_queue.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
cl_int getInfo(Func f, cl_uint name, T *param)
cl_int getInfo(Func f, const Arg0 &arg0, const Arg1 &arg1, cl_uint name, T *param)
Sampler(const Context &context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int *err=NULL)
Constructs a Sampler in a specified context.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13)
cl_int enqueueCopyBufferToImage(const Buffer &src, const Image &dst, ::size_t src_offset, const size_t< 3 > &dst_origin, const size_t< 3 > ®ion, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
cl_int getBuildInfo(const Device &device, cl_program_build_info name, T *param) const
Device & operator=(const cl_device_id &rhs)
Assignment operator from cl_device_id.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
__CL_EXPLICIT_CONSTRUCTORS Device(const cl_device_id &device)
Constructor from cl_device_id.
__CL_EXPLICIT_CONSTRUCTORS Buffer(const cl_mem &buffer)
Constructor from cl_mem - takes ownership.
static cl_int release(cl_command_queue queue)
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 > FunctorType
__CL_EXPLICIT_CONSTRUCTORS Sampler(const cl_sampler &sampler)
Constructor from cl_sampler - takes ownership.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7)
Function signature of kernel functor with no event dependency.
Program(const Context &context, const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
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 >::functor_ FunctorType functor_
Wrapper(const cl_type &obj)
detail::param_traits< detail::cl_context_info, name >::param_type getInfo(cl_int *err=NULL) const
Wrapper for clGetContextInfo() that returns by value.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
static CommandQueue getDefault(cl_int *err=NULL)
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 >::functor_ FunctorType functor_
#define __DEFAULT_BEING_INITIALIZED
EnqueueArgs(Event e, NDRange global)
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8)
Function signature of kernel functor with no event dependency.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
Program(const STRING_CLASS &source, bool build=false, cl_int *err=NULL)
cl_int createKernels(VECTOR_CLASS< Kernel > *kernels)
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 >::functor_ FunctorType functor_
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20)
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 >::functor_ FunctorType functor_
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23)
Function signature of kernel functor with no event dependency.
cl_int getProfilingInfo(cl_profiling_info name, T *param) const
Wrapper for clGetEventProfilingInfo().
Kernel & operator=(const cl_kernel &rhs)
Assignment operator from cl_kernel - takes ownership.
Class interface for cl_sampler.
static cl_int retain(cl_event event)
BufferGL & operator=(const cl_mem &rhs)
Assignment from cl_mem - performs shallow copy.
cl_int build(const VECTOR_CLASS< Device > &devices, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
Sampler & operator=(const cl_sampler &rhs)
Assignment operator from cl_sampler - takes ownership.
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)
Function signature of kernel functor with no event dependency.
Wrapper(const Wrapper< cl_type > &rhs)
detail::param_traits< detail::cl_mem_info, name >::param_type getInfo(cl_int *err=NULL) const
Wrapper for clGetMemObjectInfo() that returns by value.
cl_int setArg(cl_uint index, ::size_t size, const void *argPtr)
C++ base class for Image Memory objects.
detail::param_traits< detail::cl_program_build_info, name >::param_type getBuildInfo(const Device &device, cl_int *err=NULL) const
Wrapper< cl_type > & operator=(const Wrapper< cl_type > &rhs)
static cl_int release(cl_event event)
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 >::result_type Event result_type
Return type of the functor.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
Class interface for Buffer Memory Objects.
detail::param_traits< detail::cl_sampler_info, name >::param_type getInfo(cl_int *err=NULL) const
Wrapper for clGetSamplerInfo() that returns by value.
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 >::functor_ FunctorType functor_
Class interface for specifying NDRange values.
Class interface for 2D Image Memory objects.
NDRange(::size_t size0)
Constructs one-dimensional range.
Event & operator=(const cl_event &rhs)
Assignment operator from cl_event - takes ownership.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::result_type Event result_type
Return type of the functor.
Class interface for cl_kernel.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
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 >::result_type Event result_type
Return type of the functor.
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 >::functor_ FunctorType functor_
Class interface for 3D Image Memory objects.
Class interface for GL Render Buffer Memory Objects.
NDRange(::size_t size0, ::size_t size1, ::size_t size2)
Constructs three-dimensional range.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26, T27 arg27, T28 arg28)
static Device getDefault(cl_int *err=NULL)
Returns the first device on the default context.
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 >::result_type Event result_type
Return type of the functor.
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 >::functor_ FunctorType functor_
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 >::FunctorType 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, NullType, NullType, NullType, NullType, NullType > FunctorType
cl_int enqueueWriteImage(const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > ®ion, ::size_t row_pitch, ::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
#define __CL_DECLARE_PARAM_TRAITS(token, param_name, T)
Device()
Default constructor - initializes to NULL.
Context()
Default constructor - initializes to NULL.
Class interface for cl_device_id.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
detail::param_traits< detail::cl_command_queue_info, name >::param_type getInfo(cl_int *err=NULL) const
static Context getDefault(cl_int *err=NULL)
Returns a singleton context including all devices of CL_DEVICE_TYPE_DEFAULT.
cl_int enqueueNativeKernel(void(CL_CALLBACK *userFptr)(void *), std::pair< void *, ::size_t > args, const VECTOR_CLASS< Memory > *mem_objects=NULL, const VECTOR_CLASS< const void * > *mem_locs=NULL, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
static const T * ptr(const T &value)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17)
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 >::FunctorType 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, NullType, NullType > FunctorType
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22)
Function signature of kernel functor with no event dependency.
BufferRenderGL(const Context &context, cl_mem_flags flags, cl_GLuint bufobj, cl_int *err=NULL)
Constructs a BufferRenderGL in a specified context, from a given GL Renderbuffer.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
cl_int getImageInfo(cl_image_info name, T *param) const
Wrapper for clGetImageInfo().
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 >::result_type Event result_type
Return type of the functor.
BufferGL()
Default constructor - initializes to NULL.
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12)
cl_int enqueueReadImage(const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > ®ion, ::size_t row_pitch, ::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL)
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 >::result_type Event result_type
Return type of the functor.
static cl_int waitForEvents(const VECTOR_CLASS< Event > &events)
Blocks the calling thread until every event specified is complete.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
cl_int getInfo(cl_program_info name, T *param) const
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 >::result_type Event result_type
Return type of the functor.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::type_ Event type_(const EnqueueArgs &, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)
Function signature of kernel functor with no event dependency.
Program interface that implements cl_program.
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 >::FunctorType 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, NullType, NullType, NullType, NullType > FunctorType
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 >::result_type Event result_type
Return type of the functor.
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
static cl_int retain(cl_context context)
cl_int setArg(cl_uint index, const T &value)
static cl_int release(cl_device_id)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
cl_int operator()(cl_uint param, ::size_t size, void *value, ::size_t *size_ret)
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 >::result_type Event result_type
Return type of the functor.
EnqueueArgs(CommandQueue &queue, NDRange global, NDRange local)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, T11 arg11, T12 arg12, T13 arg13, T14 arg14, T15 arg15, T16 arg16, T17 arg17, T18 arg18, T19 arg19, T20 arg20, T21 arg21, T22 arg22, T23 arg23, T24 arg24, T25 arg25, T26 arg26, T27 arg27, T28 arg28, T29 arg29)
Class interface for GL Buffer Memory Objects.
cl_int copy(const CommandQueue &queue, const cl::Buffer &buffer, IteratorType startIterator, IteratorType endIterator)
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 >::functionImplementation_ functionImplementation_(const FunctorType &functor)
KernelFunctorGlobal(Kernel kernel)
__CL_EXPLICIT_CONSTRUCTORS Memory(const cl_mem &memory)
Constructor from cl_mem - takes ownership.
Buffer(cl_mem_flags flags, ::size_t size, void *host_ptr=NULL, cl_int *err=NULL)
Constructs a Buffer in the default context.
Class interface for cl_context.
BufferGL(const Context &context, cl_mem_flags flags, cl_GLuint bufobj, cl_int *err=NULL)
Constructs a BufferGL in a specified context, from a given GL buffer.
__CL_EXPLICIT_CONSTRUCTORS BufferGL(const cl_mem &buffer)
Constructor from cl_mem - takes ownership.
static cl_int release(cl_context context)
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 >::functor_ FunctorType functor_
Memory & operator=(const cl_mem &rhs)
Assignment operator from cl_mem - takes ownership.
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 >::FunctorType detail::KernelFunctorGlobal< 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 > FunctorType
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 >::result_type Event result_type
Return type of the functor.
const bool operator!=(const AVec< T > &a, const AVec< T > &b)
cl_int enqueueWriteImage(const Image &image, cl_bool blocking, const size_t< 3 > &origin, const size_t< 3 > ®ion, ::size_t row_pitch, ::size_t slice_pitch, void *ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
Element operator*(Element e1, Element e2)
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 >::operator() Event operator()(const EnqueueArgs &enqueueArgs, T0 arg0, T1 arg1)
void * enqueueMapImage(const Image &buffer, cl_bool blocking, cl_map_flags flags, const size_t< 3 > &origin, const size_t< 3 > ®ion, ::size_t *row_pitch, ::size_t *slice_pitch, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL, cl_int *err=NULL) const
int compare_exchange(volatile int *dest, int exchange, int comparand)
cl_int getInfo(cl_mem_info name, T *param) const
Wrapper for clGetMemObjectInfo().
VECTOR_CLASS< Event > events_