148 #if defined(USE_DX_INTEROP)
154 #if defined(USE_CL_DEVICE_FISSION)
158 #if defined(__APPLE__) || defined(__MACOSX)
159 #include <OpenCL/opencl.h>
169 #if !defined(CL_CALLBACK)
175 #if !defined(__NO_STD_VECTOR)
179 #if !defined(__NO_STD_STRING)
183 #if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
190 #if defined(__CL_ENABLE_EXCEPTIONS)
201 #define __INIT_CL_EXT_FCN_PTR(name) \
203 pfn_##name = (PFN_##name) \
204 clGetExtensionFunctionAddress(#name); \
215 #if defined(__CL_ENABLE_EXCEPTIONS)
223 const char * errStr_;
228 Error(
cl_int err,
const char * errStr = NULL) : err_(err), errStr_(errStr)
235 const char * what()
const throw()
override
237 if (errStr_ == NULL) {
249 cl_int err(
void)
const {
return err_; }
252 #define __ERR_STR(x) #x
254 #define __ERR_STR(x) NULL
255 #endif // __CL_ENABLE_EXCEPTIONS
258 #if !defined(__CL_USER_OVERRIDE_ERROR_STRINGS)
259 #define __GET_DEVICE_INFO_ERR __ERR_STR(clGetDeviceInfo)
260 #define __GET_PLATFORM_INFO_ERR __ERR_STR(clGetPlatformInfo)
261 #define __GET_DEVICE_IDS_ERR __ERR_STR(clGetDeviceIDs)
262 #define __GET_PLATFORM_IDS_ERR __ERR_STR(clGetPlatformIDs)
263 #define __GET_CONTEXT_INFO_ERR __ERR_STR(clGetContextInfo)
264 #define __GET_EVENT_INFO_ERR __ERR_STR(clGetEventInfo)
265 #define __GET_EVENT_PROFILE_INFO_ERR __ERR_STR(clGetEventProfileInfo)
266 #define __GET_MEM_OBJECT_INFO_ERR __ERR_STR(clGetMemObjectInfo)
267 #define __GET_IMAGE_INFO_ERR __ERR_STR(clGetImageInfo)
268 #define __GET_SAMPLER_INFO_ERR __ERR_STR(clGetSamplerInfo)
269 #define __GET_KERNEL_INFO_ERR __ERR_STR(clGetKernelInfo)
270 #define __GET_KERNEL_WORK_GROUP_INFO_ERR __ERR_STR(clGetKernelWorkGroupInfo)
271 #define __GET_PROGRAM_INFO_ERR __ERR_STR(clGetProgramInfo)
272 #define __GET_PROGRAM_BUILD_INFO_ERR __ERR_STR(clGetProgramBuildInfo)
273 #define __GET_COMMAND_QUEUE_INFO_ERR __ERR_STR(clGetCommandQueueInfo)
275 #define __CREATE_CONTEXT_ERR __ERR_STR(clCreateContext)
276 #define __CREATE_CONTEXT_FROM_TYPE_ERR __ERR_STR(clCreateContextFromType)
277 #define __GET_SUPPORTED_IMAGE_FORMATS_ERR __ERR_STR(clGetSupportedImageFormats)
279 #define __CREATE_BUFFER_ERR __ERR_STR(clCreateBuffer)
280 #define __CREATE_SUBBUFFER_ERR __ERR_STR(clCreateSubBuffer)
281 #define __CREATE_GL_BUFFER_ERR __ERR_STR(clCreateFromGLBuffer)
282 #define __GET_GL_OBJECT_INFO_ERR __ERR_STR(clGetGLObjectInfo)
283 #define __CREATE_IMAGE2D_ERR __ERR_STR(clCreateImage2D)
284 #define __CREATE_IMAGE3D_ERR __ERR_STR(clCreateImage3D)
285 #define __CREATE_SAMPLER_ERR __ERR_STR(clCreateSampler)
286 #define __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR __ERR_STR(clSetMemObjectDestructorCallback)
288 #define __CREATE_USER_EVENT_ERR __ERR_STR(clCreateUserEvent)
289 #define __SET_USER_EVENT_STATUS_ERR __ERR_STR(clSetUserEventStatus)
290 #define __SET_EVENT_CALLBACK_ERR __ERR_STR(clSetEventCallback)
291 #define __WAIT_FOR_EVENTS_ERR __ERR_STR(clWaitForEvents)
293 #define __CREATE_KERNEL_ERR __ERR_STR(clCreateKernel)
294 #define __SET_KERNEL_ARGS_ERR __ERR_STR(clSetKernelArg)
295 #define __CREATE_PROGRAM_WITH_SOURCE_ERR __ERR_STR(clCreateProgramWithSource)
296 #define __CREATE_PROGRAM_WITH_BINARY_ERR __ERR_STR(clCreateProgramWithBinary)
297 #define __BUILD_PROGRAM_ERR __ERR_STR(clBuildProgram)
298 #define __CREATE_KERNELS_IN_PROGRAM_ERR __ERR_STR(clCreateKernelsInProgram)
300 #define __CREATE_COMMAND_QUEUE_ERR __ERR_STR(clCreateCommandQueue)
301 #define __SET_COMMAND_QUEUE_PROPERTY_ERR __ERR_STR(clSetCommandQueueProperty)
302 #define __ENQUEUE_READ_BUFFER_ERR __ERR_STR(clEnqueueReadBuffer)
303 #define __ENQUEUE_READ_BUFFER_RECT_ERR __ERR_STR(clEnqueueReadBufferRect)
304 #define __ENQUEUE_WRITE_BUFFER_ERR __ERR_STR(clEnqueueWriteBuffer)
305 #define __ENQUEUE_WRITE_BUFFER_RECT_ERR __ERR_STR(clEnqueueWriteBufferRect)
306 #define __ENQEUE_COPY_BUFFER_ERR __ERR_STR(clEnqueueCopyBuffer)
307 #define __ENQEUE_COPY_BUFFER_RECT_ERR __ERR_STR(clEnqueueCopyBufferRect)
308 #define __ENQUEUE_READ_IMAGE_ERR __ERR_STR(clEnqueueReadImage)
309 #define __ENQUEUE_WRITE_IMAGE_ERR __ERR_STR(clEnqueueWriteImage)
310 #define __ENQUEUE_COPY_IMAGE_ERR __ERR_STR(clEnqueueCopyImage)
311 #define __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR __ERR_STR(clEnqueueCopyImageToBuffer)
312 #define __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR __ERR_STR(clEnqueueCopyBufferToImage)
313 #define __ENQUEUE_MAP_BUFFER_ERR __ERR_STR(clEnqueueMapBuffer)
314 #define __ENQUEUE_MAP_IMAGE_ERR __ERR_STR(clEnqueueMapImage)
315 #define __ENQUEUE_UNMAP_MEM_OBJECT_ERR __ERR_STR(clEnqueueUnMapMemObject)
316 #define __ENQUEUE_NDRANGE_KERNEL_ERR __ERR_STR(clEnqueueNDRangeKernel)
317 #define __ENQUEUE_TASK_ERR __ERR_STR(clEnqueueTask)
318 #define __ENQUEUE_NATIVE_KERNEL __ERR_STR(clEnqueueNativeKernel)
319 #define __ENQUEUE_MARKER_ERR __ERR_STR(clEnqueueMarker)
320 #define __ENQUEUE_WAIT_FOR_EVENTS_ERR __ERR_STR(clEnqueueWaitForEvents)
321 #define __ENQUEUE_BARRIER_ERR __ERR_STR(clEnqueueBarrier)
322 #if defined(CL_VERSION_1_2)
323 #define __ENQUEUE_MARKER_WITH_WAIT_LIST_ERR \
324 __ERR_STR(clEnqueueMarkerWithWaitList)
325 #define __ENQUEUE_BARRIER_WITH_WAIT_LIST_ERR \
326 __ERR_STR(clEnqueueBarrierWithWaitList)
329 #define __ENQUEUE_ACQUIRE_GL_ERR __ERR_STR(clEnqueueAcquireGLObjects)
330 #define __ENQUEUE_RELEASE_GL_ERR __ERR_STR(clEnqueueReleaseGLObjects)
332 #define __UNLOAD_COMPILER_ERR __ERR_STR(clUnloadCompiler)
334 #define __FLUSH_ERR __ERR_STR(clFlush)
335 #define __FINISH_ERR __ERR_STR(clFinish)
337 #define __CREATE_SUB_DEVICES __ERR_STR(clCreateSubDevicesEXT)
338 #endif // __CL_USER_OVERRIDE_ERROR_STRINGS
359 str_ =
new char[size_+1];
361 memcpy(str_, str, size_ *
sizeof(
char));
372 size_= ::strlen(str);
373 str_ =
new char[size_ + 1];
375 memcpy(str_, str, (size_ + 1) *
sizeof(
char));
388 if (rhs.size_ == 0 || rhs.str_ == NULL) {
394 str_ =
new char[size_ + 1];
396 memcpy(str_, rhs.str_, (size_ + 1) *
sizeof(
char));
421 const char *
c_str(
void)
const {
return (str_) ? str_ :
"";}
424 #if !defined(__USE_DEV_STRING) && !defined(__NO_STD_STRING)
427 #elif !defined(__USE_DEV_STRING)
431 #if !defined(__USE_DEV_VECTOR) && !defined(__NO_STD_VECTOR)
433 #define VECTOR_CLASS std::vector
434 #elif !defined(__USE_DEV_VECTOR)
435 #define VECTOR_CLASS cl::vector
438 #if !defined(__MAX_DEFAULT_VECTOR_SIZE)
439 #define __MAX_DEFAULT_VECTOR_SIZE 10
446 template <
typename T,
unsigned int N = __MAX_DEFAULT_VECTOR_SIZE>
455 size_(static_cast<unsigned
int>(-1)),
497 memcpy(&data_[0], &vec.data_[0],
size() *
sizeof(
T));
505 for (
unsigned int i = 0; i <
size; i++) {
520 memcpy(&data_[0], &rhs.data_[0], size() *
sizeof(
T));
528 if (empty_ && vec.empty_) {
536 return memcmp(&data_[0], &vec.data_[0], size() *
sizeof(
T)) == 0 ?
true :
false;
539 operator T* () {
return data_; }
540 operator const T* ()
const {
return data_; }
554 return sizeof(
T) *
N;
592 initialized_ =
false;
606 i.initialized_ =
true;
615 i.index_ = vec.
size();
618 i.initialized_ =
true;
624 return ((vec_ == i.vec_) &&
625 (index_ == i.index_) &&
626 (initialized_ == i.initialized_));
631 return (!(*
this==i));
702 template <
typename Functor,
typename T>
713 template <
typename Func,
typename T>
724 T*
value = (
T*) alloca(required);
725 err =
f(
name, required, value, NULL);
730 param->assign(&value[0], &value[required/
sizeof(
T)]);
736 template <
typename Func>
751 binary_sizes = (
::size_t*)alloca(
sizeof(::
size_t)*nDevices);
757 values = (
char **) alloca(
sizeof(
char*)*nDevices);
758 for(
cl_uint i = 0; i < nDevices; i++ )
760 if( binary_sizes[i] != 0 )
762 values[i]= (
char *)malloc(
sizeof(
char)*binary_sizes[i]);
769 err =
f(name,
sizeof(
char *)*nDevices, values, NULL);
774 param->assign(values,values+nDevices);
780 template <
typename Func>
791 char*
value = (
char*) alloca(required);
792 err =
f(
name, required, value, NULL);
802 #define __GET_INFO_HELPER_WITH_RETAIN(CPP_TYPE) \
804 template <typename Func> \
805 struct GetInfoHelper<Func, CPP_TYPE> \
807 static cl_int get(Func f, cl_uint name, CPP_TYPE* param) \
809 cl_uint err = f(name, sizeof(CPP_TYPE), param, NULL); \
810 if (err != CL_SUCCESS) { \
814 return ReferenceHandler<CPP_TYPE::cl_type>::retain((*param)()); \
820 #define __PARAM_NAME_INFO_1_0(F) \
821 F(cl_platform_info, CL_PLATFORM_PROFILE, STRING_CLASS) \
822 F(cl_platform_info, CL_PLATFORM_VERSION, STRING_CLASS) \
823 F(cl_platform_info, CL_PLATFORM_NAME, STRING_CLASS) \
824 F(cl_platform_info, CL_PLATFORM_VENDOR, STRING_CLASS) \
825 F(cl_platform_info, CL_PLATFORM_EXTENSIONS, STRING_CLASS) \
827 F(cl_device_info, CL_DEVICE_TYPE, cl_device_type) \
828 F(cl_device_info, CL_DEVICE_VENDOR_ID, cl_uint) \
829 F(cl_device_info, CL_DEVICE_MAX_COMPUTE_UNITS, cl_uint) \
830 F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS, cl_uint) \
831 F(cl_device_info, CL_DEVICE_MAX_WORK_GROUP_SIZE, ::size_t) \
832 F(cl_device_info, CL_DEVICE_MAX_WORK_ITEM_SIZES, VECTOR_CLASS< ::size_t>) \
833 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR, cl_uint) \
834 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT, cl_uint) \
835 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT, cl_uint) \
836 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG, cl_uint) \
837 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT, cl_uint) \
838 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE, cl_uint) \
839 F(cl_device_info, CL_DEVICE_MAX_CLOCK_FREQUENCY, cl_uint) \
840 F(cl_device_info, CL_DEVICE_ADDRESS_BITS, cl_bitfield) \
841 F(cl_device_info, CL_DEVICE_MAX_READ_IMAGE_ARGS, cl_uint) \
842 F(cl_device_info, CL_DEVICE_MAX_WRITE_IMAGE_ARGS, cl_uint) \
843 F(cl_device_info, CL_DEVICE_MAX_MEM_ALLOC_SIZE, cl_ulong) \
844 F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_WIDTH, ::size_t) \
845 F(cl_device_info, CL_DEVICE_IMAGE2D_MAX_HEIGHT, ::size_t) \
846 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_WIDTH, ::size_t) \
847 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_HEIGHT, ::size_t) \
848 F(cl_device_info, CL_DEVICE_IMAGE3D_MAX_DEPTH, ::size_t) \
849 F(cl_device_info, CL_DEVICE_IMAGE_SUPPORT, cl_bool) \
850 F(cl_device_info, CL_DEVICE_MAX_PARAMETER_SIZE, ::size_t) \
851 F(cl_device_info, CL_DEVICE_MAX_SAMPLERS, cl_uint) \
852 F(cl_device_info, CL_DEVICE_MEM_BASE_ADDR_ALIGN, cl_uint) \
853 F(cl_device_info, CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE, cl_uint) \
854 F(cl_device_info, CL_DEVICE_SINGLE_FP_CONFIG, cl_device_fp_config) \
855 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_TYPE, cl_device_mem_cache_type) \
856 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE, cl_uint)\
857 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_CACHE_SIZE, cl_ulong) \
858 F(cl_device_info, CL_DEVICE_GLOBAL_MEM_SIZE, cl_ulong) \
859 F(cl_device_info, CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE, cl_ulong) \
860 F(cl_device_info, CL_DEVICE_MAX_CONSTANT_ARGS, cl_uint) \
861 F(cl_device_info, CL_DEVICE_LOCAL_MEM_TYPE, cl_device_local_mem_type) \
862 F(cl_device_info, CL_DEVICE_LOCAL_MEM_SIZE, cl_ulong) \
863 F(cl_device_info, CL_DEVICE_ERROR_CORRECTION_SUPPORT, cl_bool) \
864 F(cl_device_info, CL_DEVICE_PROFILING_TIMER_RESOLUTION, ::size_t) \
865 F(cl_device_info, CL_DEVICE_ENDIAN_LITTLE, cl_bool) \
866 F(cl_device_info, CL_DEVICE_AVAILABLE, cl_bool) \
867 F(cl_device_info, CL_DEVICE_COMPILER_AVAILABLE, cl_bool) \
868 F(cl_device_info, CL_DEVICE_EXECUTION_CAPABILITIES, cl_device_exec_capabilities) \
869 F(cl_device_info, CL_DEVICE_QUEUE_PROPERTIES, cl_command_queue_properties) \
870 F(cl_device_info, CL_DEVICE_PLATFORM, cl_platform_id) \
871 F(cl_device_info, CL_DEVICE_NAME, STRING_CLASS) \
872 F(cl_device_info, CL_DEVICE_VENDOR, STRING_CLASS) \
873 F(cl_device_info, CL_DRIVER_VERSION, STRING_CLASS) \
874 F(cl_device_info, CL_DEVICE_PROFILE, STRING_CLASS) \
875 F(cl_device_info, CL_DEVICE_VERSION, STRING_CLASS) \
876 F(cl_device_info, CL_DEVICE_EXTENSIONS, STRING_CLASS) \
878 F(cl_context_info, CL_CONTEXT_REFERENCE_COUNT, cl_uint) \
879 F(cl_context_info, CL_CONTEXT_DEVICES, VECTOR_CLASS<Device>) \
880 F(cl_context_info, CL_CONTEXT_PROPERTIES, VECTOR_CLASS<cl_context_properties>) \
882 F(cl_event_info, CL_EVENT_COMMAND_QUEUE, cl::CommandQueue) \
883 F(cl_event_info, CL_EVENT_COMMAND_TYPE, cl_command_type) \
884 F(cl_event_info, CL_EVENT_REFERENCE_COUNT, cl_uint) \
885 F(cl_event_info, CL_EVENT_COMMAND_EXECUTION_STATUS, cl_uint) \
887 F(cl_profiling_info, CL_PROFILING_COMMAND_QUEUED, cl_ulong) \
888 F(cl_profiling_info, CL_PROFILING_COMMAND_SUBMIT, cl_ulong) \
889 F(cl_profiling_info, CL_PROFILING_COMMAND_START, cl_ulong) \
890 F(cl_profiling_info, CL_PROFILING_COMMAND_END, cl_ulong) \
892 F(cl_mem_info, CL_MEM_TYPE, cl_mem_object_type) \
893 F(cl_mem_info, CL_MEM_FLAGS, cl_mem_flags) \
894 F(cl_mem_info, CL_MEM_SIZE, ::size_t) \
895 F(cl_mem_info, CL_MEM_HOST_PTR, void*) \
896 F(cl_mem_info, CL_MEM_MAP_COUNT, cl_uint) \
897 F(cl_mem_info, CL_MEM_REFERENCE_COUNT, cl_uint) \
898 F(cl_mem_info, CL_MEM_CONTEXT, cl::Context) \
900 F(cl_image_info, CL_IMAGE_FORMAT, cl_image_format) \
901 F(cl_image_info, CL_IMAGE_ELEMENT_SIZE, ::size_t) \
902 F(cl_image_info, CL_IMAGE_ROW_PITCH, ::size_t) \
903 F(cl_image_info, CL_IMAGE_SLICE_PITCH, ::size_t) \
904 F(cl_image_info, CL_IMAGE_WIDTH, ::size_t) \
905 F(cl_image_info, CL_IMAGE_HEIGHT, ::size_t) \
906 F(cl_image_info, CL_IMAGE_DEPTH, ::size_t) \
908 F(cl_sampler_info, CL_SAMPLER_REFERENCE_COUNT, cl_uint) \
909 F(cl_sampler_info, CL_SAMPLER_CONTEXT, cl::Context) \
910 F(cl_sampler_info, CL_SAMPLER_NORMALIZED_COORDS, cl_addressing_mode) \
911 F(cl_sampler_info, CL_SAMPLER_ADDRESSING_MODE, cl_filter_mode) \
912 F(cl_sampler_info, CL_SAMPLER_FILTER_MODE, cl_bool) \
914 F(cl_program_info, CL_PROGRAM_REFERENCE_COUNT, cl_uint) \
915 F(cl_program_info, CL_PROGRAM_CONTEXT, cl::Context) \
916 F(cl_program_info, CL_PROGRAM_NUM_DEVICES, cl_uint) \
917 F(cl_program_info, CL_PROGRAM_DEVICES, VECTOR_CLASS<cl_device_id>) \
918 F(cl_program_info, CL_PROGRAM_SOURCE, STRING_CLASS) \
919 F(cl_program_info, CL_PROGRAM_BINARY_SIZES, VECTOR_CLASS< ::size_t>) \
920 F(cl_program_info, CL_PROGRAM_BINARIES, VECTOR_CLASS<char *>) \
922 F(cl_program_build_info, CL_PROGRAM_BUILD_STATUS, cl_build_status) \
923 F(cl_program_build_info, CL_PROGRAM_BUILD_OPTIONS, STRING_CLASS) \
924 F(cl_program_build_info, CL_PROGRAM_BUILD_LOG, STRING_CLASS) \
926 F(cl_kernel_info, CL_KERNEL_FUNCTION_NAME, STRING_CLASS) \
927 F(cl_kernel_info, CL_KERNEL_NUM_ARGS, cl_uint) \
928 F(cl_kernel_info, CL_KERNEL_REFERENCE_COUNT, cl_uint) \
929 F(cl_kernel_info, CL_KERNEL_CONTEXT, cl::Context) \
930 F(cl_kernel_info, CL_KERNEL_PROGRAM, cl::Program) \
932 F(cl_kernel_work_group_info, CL_KERNEL_WORK_GROUP_SIZE, ::size_t) \
933 F(cl_kernel_work_group_info, CL_KERNEL_COMPILE_WORK_GROUP_SIZE, cl::size_t<3>) \
934 F(cl_kernel_work_group_info, CL_KERNEL_LOCAL_MEM_SIZE, cl_ulong) \
936 F(cl_command_queue_info, CL_QUEUE_CONTEXT, cl::Context) \
937 F(cl_command_queue_info, CL_QUEUE_DEVICE, cl::Device) \
938 F(cl_command_queue_info, CL_QUEUE_REFERENCE_COUNT, cl_uint) \
939 F(cl_command_queue_info, CL_QUEUE_PROPERTIES, cl_command_queue_properties)
941 #if defined(CL_VERSION_1_1)
942 #define __PARAM_NAME_INFO_1_1(F) \
943 F(cl_context_info, CL_CONTEXT_NUM_DEVICES, cl_uint)\
944 F(cl_device_info, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF, cl_uint) \
945 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR, cl_uint) \
946 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT, cl_uint) \
947 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_INT, cl_uint) \
948 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG, cl_uint) \
949 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT, cl_uint) \
950 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE, cl_uint) \
951 F(cl_device_info, CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF, cl_uint) \
952 F(cl_device_info, CL_DEVICE_DOUBLE_FP_CONFIG, cl_device_fp_config) \
953 F(cl_device_info, CL_DEVICE_HALF_FP_CONFIG, cl_device_fp_config) \
954 F(cl_device_info, CL_DEVICE_HOST_UNIFIED_MEMORY, cl_bool) \
955 F(cl_device_info, CL_DEVICE_OPENCL_C_VERSION, STRING_CLASS) \
957 F(cl_mem_info, CL_MEM_ASSOCIATED_MEMOBJECT, cl::Memory) \
958 F(cl_mem_info, CL_MEM_OFFSET, ::size_t) \
960 F(cl_kernel_work_group_info, CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, ::size_t) \
961 F(cl_kernel_work_group_info, CL_KERNEL_PRIVATE_MEM_SIZE, cl_ulong) \
963 F(cl_event_info, CL_EVENT_CONTEXT, cl::Context)
964 #endif // CL_VERSION_1_1
966 #if defined(USE_CL_DEVICE_FISSION)
967 #define __PARAM_NAME_DEVICE_FISSION(F) \
968 F(cl_device_info, CL_DEVICE_PARENT_DEVICE_EXT, cl_device_id) \
969 F(cl_device_info, CL_DEVICE_PARTITION_TYPES_EXT, VECTOR_CLASS<cl_device_partition_property_ext>) \
970 F(cl_device_info, CL_DEVICE_AFFINITY_DOMAINS_EXT, VECTOR_CLASS<cl_device_partition_property_ext>) \
971 F(cl_device_info, CL_DEVICE_REFERENCE_COUNT_EXT , cl_uint) \
972 F(cl_device_info, CL_DEVICE_PARTITION_STYLE_EXT, VECTOR_CLASS<cl_device_partition_property_ext>)
973 #endif // USE_CL_DEVICE_FISSION
975 template <
typename enum_type, cl_
int Name>
978 #define __CL_DECLARE_PARAM_TRAITS(token, param_name, T) \
981 struct param_traits<detail:: token,param_name> \
983 enum { value = param_name }; \
984 typedef T param_type; \
988 #if defined(CL_VERSION_1_1)
990 #endif // CL_VERSION_1_1
992 #if defined(USE_CL_DEVICE_FISSION)
994 #endif // USE_CL_DEVICE_FISSION
996 #ifdef CL_PLATFORM_ICD_SUFFIX_KHR
1000 #ifdef CL_DEVICE_PROFILING_TIMER_OFFSET_AMD
1004 #ifdef CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
1007 #ifdef CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV
1010 #ifdef CL_DEVICE_REGISTERS_PER_BLOCK_NV
1013 #ifdef CL_DEVICE_WARP_SIZE_NV
1016 #ifdef CL_DEVICE_GPU_OVERLAP_NV
1019 #ifdef CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV
1022 #ifdef CL_DEVICE_INTEGRATED_MEMORY_NV
1028 template <
typename Func,
typename T>
1035 template <
typename Func,
typename Arg0>
1041 {
return f_(
arg0_, param, size, value, size_ret); }
1044 template <
typename Func,
typename Arg0,
typename Arg1>
1050 {
return f_(
arg0_,
arg1_, param, size, value, size_ret); }
1053 template <
typename Func,
typename Arg0,
typename T>
1059 ::get(f0, name, param);
1062 template <
typename Func,
typename Arg0,
typename Arg1,
typename T>
1068 ::get(f0, name, param);
1071 template<
typename T>
1160 template <
typename T>
1217 #if defined(__CL_ENABLE_EXCEPTIONS)
1218 static inline cl_int errHandler (
1220 const char * errStr = NULL)
1223 throw Error(err, errStr);
1228 static inline cl_int errHandler (
cl_int err,
const char * errStr = NULL)
1232 #endif // __CL_ENABLE_EXCEPTIONS
1250 #if 0 // Silence -Wdeprecated-copy warnings.
1288 template <
typename T>
1291 return detail::errHandler(
1293 __GET_DEVICE_INFO_ERR);
1296 template <cl_
int name>
typename
1309 #if defined(USE_CL_DEVICE_FISSION)
1312 VECTOR_CLASS<Device>* devices)
1320 cl_uint * ) CL_EXT_SUFFIX__VERSION_1_1;
1322 static PFN_clCreateSubDevicesEXT pfn_clCreateSubDevicesEXT = NULL;
1326 cl_int err = pfn_clCreateSubDevicesEXT(object_, properties, 0, NULL, &n);
1328 return detail::errHandler(err, __CREATE_SUB_DEVICES);
1331 cl_device_id*
ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
1332 err = pfn_clCreateSubDevicesEXT(object_, properties, n, ids, NULL);
1334 return detail::errHandler(err, __CREATE_SUB_DEVICES);
1337 devices->assign(&ids[0], &ids[n]);
1373 return detail::errHandler(
1375 __GET_PLATFORM_INFO_ERR);
1378 template <cl_
int name>
typename
1393 VECTOR_CLASS<Device>* devices)
const
1398 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
1401 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
1404 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
1407 devices->assign(&ids[0], &ids[n]);
1411 #if defined(USE_DX_INTEROP)
1439 VECTOR_CLASS<Device>* devices)
const
1446 cl_uint num_entries,
1447 cl_device_id * devices,
1448 cl_uint* num_devices);
1450 static PFN_clGetDeviceIDsFromD3D10KHR pfn_clGetDeviceIDsFromD3D10KHR = NULL;
1454 cl_int err = pfn_clGetDeviceIDsFromD3D10KHR(
1463 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
1466 cl_device_id* ids = (cl_device_id*) alloca(n *
sizeof(cl_device_id));
1467 err = pfn_clGetDeviceIDsFromD3D10KHR(
1476 return detail::errHandler(err, __GET_DEVICE_IDS_ERR);
1479 devices->assign(&ids[0], &ids[n]);
1485 VECTOR_CLASS<Platform>* platforms)
1490 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
1497 return detail::errHandler(err, __GET_PLATFORM_IDS_ERR);
1500 platforms->assign(&ids[0], &ids[n]);
1505 #if defined(CL_VERSION_1_2)
1509 return ::clUnloadPlatformCompiler(platform);
1523 const VECTOR_CLASS<Device>& devices,
1535 properties, (cl_uint) devices.size(),
1536 (cl_device_id*) &devices.front(),
1537 notifyFptr,
data, &error);
1539 detail::errHandler(error, __CREATE_CONTEXT_ERR);
1558 properties, type, notifyFptr,
data, &error);
1560 detail::errHandler(error, __CREATE_CONTEXT_FROM_TYPE_ERR);
1586 template <
typename T>
1589 return detail::errHandler(
1591 __GET_CONTEXT_INFO_ERR);
1594 template <cl_
int name>
typename
1610 VECTOR_CLASS<ImageFormat>* formats)
const
1621 return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
1634 return detail::errHandler(err, __GET_SUPPORTED_IMAGE_FORMATS_ERR);
1637 formats->assign(&value[0], &value[numEntries]);
1670 template <
typename T>
1673 return detail::errHandler(
1675 __GET_EVENT_INFO_ERR);
1678 template <cl_
int name>
typename
1691 template <
typename T>
1696 __GET_EVENT_PROFILE_INFO_ERR);
1699 template <cl_
int name>
typename
1714 return detail::errHandler(
1716 __WAIT_FOR_EVENTS_ERR);
1719 #if defined(CL_VERSION_1_1)
1723 void * user_data = NULL)
1725 return detail::errHandler(
1726 ::clSetEventCallback(
1731 __SET_EVENT_CALLBACK_ERR);
1738 return detail::errHandler(
1740 (cl_uint) events.size(), (cl_event*)&events.front()),
1741 __WAIT_FOR_EVENTS_ERR);
1747 #if defined(CL_VERSION_1_1)
1751 class CE_API UserEvent :
public Event
1759 object_ = ::clCreateUserEvent(
1763 detail::errHandler(error, __CREATE_USER_EVENT_ERR);
1769 UserEvent() : Event() { }
1771 UserEvent(
const UserEvent&
event) : Event(event) { }
1783 return detail::errHandler(
1784 ::clSetUserEventStatus(object_,status),
1785 __SET_USER_EVENT_STATUS_ERR);
1791 WaitForEvents(
const VECTOR_CLASS<Event>& events)
1793 return detail::errHandler(
1795 (cl_uint) events.size(), (cl_event*)&events.front()),
1796 __WAIT_FOR_EVENTS_ERR);
1825 template <
typename T>
1828 return detail::errHandler(
1830 __GET_MEM_OBJECT_INFO_ERR);
1833 template <cl_
int name>
typename
1846 #if defined(CL_VERSION_1_1)
1847 cl_int setDestructorCallback(
1849 void * user_data = NULL)
1851 return detail::errHandler(
1852 ::clSetMemObjectDestructorCallback(
1856 __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR);
1874 void* host_ptr = NULL,
1880 detail::errHandler(error, __CREATE_BUFFER_ERR);
1906 #if defined(CL_VERSION_1_1)
1909 cl_buffer_create_type buffer_create_type,
1910 const void * buffer_create_info,
1915 result.
object_ = ::clCreateSubBuffer(
1922 detail::errHandler(error, __CREATE_SUBBUFFER_ERR);
1932 #if defined (USE_DX_INTEROP)
1933 class CE_API BufferD3D10 :
public Buffer
1943 ID3D10Buffer* bufobj,
1946 static PFN_clCreateFromD3D10BufferKHR pfn_clCreateFromD3D10BufferKHR = NULL;
1950 object_ = pfn_clCreateFromD3D10BufferKHR(
1956 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
1962 BufferD3D10() : Buffer() { }
1964 BufferD3D10(
const BufferD3D10&
buffer) : Buffer(buffer) { }
1968 BufferD3D10&
operator = (
const BufferD3D10& rhs)
2003 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
2033 return detail::errHandler(
2035 __GET_GL_OBJECT_INFO_ERR);
2058 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
2089 return detail::errHandler(
2091 __GET_GL_OBJECT_INFO_ERR);
2122 template <
typename T>
2125 return detail::errHandler(
2127 __GET_IMAGE_INFO_ERR);
2130 template <cl_
int name>
typename
2156 ::
size_t row_pitch = 0,
2157 void* host_ptr = NULL,
2161 #if defined(CL_VERSION_1_2)
2162 cl_image_desc image_desc;
2163 image_desc.image_width =
width;
2164 image_desc.image_height =
height;
2165 image_desc.image_row_pitch = row_pitch;
2167 object_ = ::clCreateImage(
2168 context(), flags, &format, &image_desc, host_ptr, &error);
2171 context(), flags,&format, width, height, row_pitch, host_ptr, &error);
2174 detail::errHandler(error, __CREATE_IMAGE2D_ERR);
2216 #if defined(CL_VERSION_1_2)
2217 object_ = ::clCreateFromGLTexture(
2234 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
2274 ::
size_t row_pitch = 0,
2275 ::
size_t slice_pitch = 0,
2276 void* host_ptr = NULL,
2280 #if defined(CL_VERSION_1_2)
2281 cl_image_desc image_desc;
2283 image_desc.image_width =
width;
2284 image_desc.image_height =
height;
2285 image_desc.image_depth =
depth;
2286 image_desc.image_array_size = 1;
2287 image_desc.image_row_pitch = row_pitch;
2288 image_desc.image_slice_pitch = slice_pitch;
2289 image_desc.num_mip_levels = 0;
2290 image_desc.num_samples = 0;
2291 image_desc.buffer = NULL;
2293 object_ = ::clCreateImage(
2294 context(), flags, &format, &image_desc, host_ptr, &error);
2297 context(), flags, &format, width, height, depth, row_pitch,
2298 slice_pitch, host_ptr, &error);
2301 detail::errHandler(error, __CREATE_IMAGE3D_ERR);
2343 #if defined(CL_VERSION_1_2)
2344 object_ = ::clCreateFromGLTexture(
2361 detail::errHandler(error, __CREATE_GL_BUFFER_ERR);
2411 detail::errHandler(error, __CREATE_SAMPLER_ERR);
2435 template <
typename T>
2438 return detail::errHandler(
2440 __GET_SAMPLER_INFO_ERR);
2443 template <cl_
int name>
typename
2470 cl_uint dimensions_;
2490 NDRange(::
size_t size0, ::
size_t size1, ::
size_t size2)
2498 operator const ::size_t*()
const {
return (const ::size_t*) sizes_; }
2502 static const NDRange NullRange;
2515 template <
typename T>
2518 static ::size_t
size(
const T&) {
return sizeof(
T); }
2532 inline LocalSpaceArg
2569 template <
typename T>
2572 return detail::errHandler(
2574 __GET_KERNEL_INFO_ERR);
2577 template <cl_
int name>
typename
2590 template <
typename T>
2594 return detail::errHandler(
2597 __GET_KERNEL_WORK_GROUP_INFO_ERR);
2600 template <cl_
int name>
typename
2606 cl_int result = getWorkGroupInfo(device, name, ¶m);
2613 template <
typename T>
2616 return detail::errHandler(
2622 __SET_KERNEL_ARGS_ERR);
2627 return detail::errHandler(
2629 __SET_KERNEL_ARGS_ERR);
2652 typedef VECTOR_CLASS<std::pair<const void*, ::size_t> >
Binaries;
2653 typedef VECTOR_CLASS<std::pair<const char*, ::size_t> >
Sources;
2662 const ::size_t n = (
::size_t)sources.size();
2664 const char**
strings = (
const char**) alloca(n *
sizeof(
const char*));
2666 for (::
size_t i = 0; i <
n; ++i) {
2667 strings[i] = sources[(
int)i].
first;
2668 lengths[i] = sources[(
int)i].second;
2672 context(), (cl_uint)n, strings, lengths, &error);
2674 detail::errHandler(error, __CREATE_PROGRAM_WITH_SOURCE_ERR);
2682 const VECTOR_CLASS<Device>& devices,
2683 const Binaries& binaries,
2684 VECTOR_CLASS<cl_int>* binaryStatus = NULL,
2688 const ::size_t n = binaries.size();
2690 const unsigned char** images = (
const unsigned char**) alloca(n *
sizeof(
const void*));
2692 for (::
size_t i = 0; i <
n; ++i) {
2693 images[i] = (
const unsigned char*)binaries[(
int)i].first;
2694 lengths[i] = binaries[(
int)i].second;
2698 context(), (cl_uint) devices.size(),
2699 (cl_device_id*)&devices.front(),
2700 lengths, images, binaryStatus != NULL
2701 ? (
cl_int*) &binaryStatus->front()
2704 detail::errHandler(error, __CREATE_PROGRAM_WITH_BINARY_ERR);
2731 const VECTOR_CLASS<Device>& devices,
2732 const char* options = NULL,
2733 void (
CL_CALLBACK * notifyFptr)(cl_program,
void *) = NULL,
2734 void*
data = NULL)
const
2736 return detail::errHandler(
2741 (cl_device_id*)&devices.front(),
2745 __BUILD_PROGRAM_ERR);
2748 template <
typename T>
2751 return detail::errHandler(
2753 __GET_PROGRAM_INFO_ERR);
2756 template <cl_
int name>
typename
2769 template <
typename T>
2773 return detail::errHandler(
2776 __GET_PROGRAM_BUILD_INFO_ERR);
2779 template <cl_
int name>
typename
2797 return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR);
2802 object_, numKernels, (
cl_kernel*) value, NULL);
2804 return detail::errHandler(err, __CREATE_KERNELS_IN_PROGRAM_ERR);
2807 kernels->assign(&value[0], &value[numKernels]);
2813 inline VECTOR_CLASS<char *> cl::Program::getInfo<CL_PROGRAM_BINARIES>(
cl_int* err)
const
2815 VECTOR_CLASS< ::size_t>
sizes = getInfo<CL_PROGRAM_BINARY_SIZES>();
2816 VECTOR_CLASS<char *> binaries;
2817 for (VECTOR_CLASS< ::size_t>::iterator
s = sizes.begin();
s != sizes.end(); ++
s)
2822 binaries.push_back(ptr);
2839 detail::errHandler(error, __CREATE_KERNEL_ERR);
2861 context(), device(), properties, &error);
2863 detail::errHandler(error, __CREATE_COMMAND_QUEUE_ERR);
2889 template <
typename T>
2892 return detail::errHandler(
2895 __GET_COMMAND_QUEUE_INFO_ERR);
2898 template <cl_
int name>
typename
2917 const VECTOR_CLASS<Event>* events = NULL,
2921 cl_int err = detail::errHandler(
2923 object_,
buffer(), blocking, offset, size,
2925 (events != NULL) ? (cl_uint) events->
size() : 0,
2926 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
2927 (
event != NULL) ? &tmp : NULL),
2928 __ENQUEUE_READ_BUFFER_ERR);
2942 const VECTOR_CLASS<Event>* events = NULL,
2946 cl_int err = detail::errHandler(
2948 object_,
buffer(), blocking, offset, size,
2950 (events != NULL) ? (cl_uint) events->
size() : 0,
2951 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
2952 (
event != NULL) ? &tmp : NULL),
2953 __ENQUEUE_WRITE_BUFFER_ERR);
2964 ::
size_t src_offset,
2965 ::
size_t dst_offset,
2967 const VECTOR_CLASS<Event>* events = NULL,
2971 cl_int err = detail::errHandler(
2973 object_,
src(),
dst(), src_offset, dst_offset, size,
2974 (events != NULL) ? (cl_uint) events->
size() : 0,
2975 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
2976 (
event != NULL) ? &tmp : NULL),
2977 __ENQEUE_COPY_BUFFER_ERR);
2985 #if defined(CL_VERSION_1_1)
2986 cl_int enqueueReadBufferRect(
2992 ::
size_t buffer_row_pitch,
2993 ::
size_t buffer_slice_pitch,
2994 ::
size_t host_row_pitch,
2995 ::
size_t host_slice_pitch,
2997 const VECTOR_CLASS<Event>* events = NULL,
3001 cl_int err = detail::errHandler(
3002 ::clEnqueueReadBufferRect(
3006 (const ::size_t *)buffer_offset,
3007 (const ::size_t *)host_offset,
3008 (const ::size_t *)region,
3014 (events != NULL) ? (cl_uint) events->
size() : 0,
3015 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3016 (
event != NULL) ? &tmp : NULL),
3017 __ENQUEUE_READ_BUFFER_RECT_ERR);
3026 cl_int enqueueWriteBufferRect(
3027 const Buffer& buffer,
3029 const size_t<3>& buffer_offset,
3030 const size_t<3>& host_offset,
3031 const size_t<3>& region,
3032 ::
size_t buffer_row_pitch,
3033 ::
size_t buffer_slice_pitch,
3034 ::
size_t host_row_pitch,
3035 ::
size_t host_slice_pitch,
3037 const VECTOR_CLASS<Event>* events = NULL,
3038 Event*
event = NULL)
const
3041 cl_int err = detail::errHandler(
3042 ::clEnqueueWriteBufferRect(
3046 (const ::size_t *)buffer_offset,
3047 (const ::size_t *)host_offset,
3048 (const ::size_t *)region,
3054 (events != NULL) ? (cl_uint) events->size() : 0,
3055 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3056 (
event != NULL) ? &tmp : NULL),
3057 __ENQUEUE_WRITE_BUFFER_RECT_ERR);
3065 cl_int enqueueCopyBufferRect(
3068 const size_t<3>& src_origin,
3069 const size_t<3>& dst_origin,
3070 const size_t<3>& region,
3071 ::
size_t src_row_pitch,
3072 ::
size_t src_slice_pitch,
3073 ::
size_t dst_row_pitch,
3074 ::
size_t dst_slice_pitch,
3075 const VECTOR_CLASS<Event>* events = NULL,
3076 Event*
event = NULL)
const
3079 cl_int err = detail::errHandler(
3080 ::clEnqueueCopyBufferRect(
3084 (const ::size_t *)src_origin,
3085 (const ::size_t *)dst_origin,
3086 (const ::size_t *)region,
3091 (events != NULL) ? (cl_uint) events->size() : 0,
3092 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3093 (
event != NULL) ? &tmp : NULL),
3094 __ENQEUE_COPY_BUFFER_RECT_ERR);
3109 ::
size_t slice_pitch,
3111 const VECTOR_CLASS<Event>* events = NULL,
3115 cl_int err = detail::errHandler(
3117 object_,
image(), blocking, (const ::size_t *) origin,
3118 (const ::size_t *) region, row_pitch, slice_pitch, ptr,
3119 (events != NULL) ? (cl_uint) events->
size() : 0,
3120 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3121 (
event != NULL) ? &tmp : NULL),
3122 __ENQUEUE_READ_IMAGE_ERR);
3136 ::
size_t slice_pitch,
3138 const VECTOR_CLASS<Event>* events = NULL,
3142 cl_int err = detail::errHandler(
3144 object_,
image(), blocking, (const ::size_t *) origin,
3145 (const ::size_t *) region, row_pitch, slice_pitch, ptr,
3146 (events != NULL) ? (cl_uint) events->
size() : 0,
3147 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3148 (
event != NULL) ? &tmp : NULL),
3149 __ENQUEUE_WRITE_IMAGE_ERR);
3163 const VECTOR_CLASS<Event>* events = NULL,
3167 cl_int err = detail::errHandler(
3169 object_,
src(),
dst(), (const ::size_t *) src_origin,
3170 (const ::size_t *)dst_origin, (const ::size_t *) region,
3171 (events != NULL) ? (cl_uint) events->
size() : 0,
3172 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3173 (
event != NULL) ? &tmp : NULL),
3174 __ENQUEUE_COPY_IMAGE_ERR);
3187 ::
size_t dst_offset,
3188 const VECTOR_CLASS<Event>* events = NULL,
3192 cl_int err = detail::errHandler(
3194 object_,
src(),
dst(), (const ::size_t *) src_origin,
3195 (const ::size_t *) region, dst_offset,
3196 (events != NULL) ? (cl_uint) events->
size() : 0,
3197 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3198 (
event != NULL) ? &tmp : NULL),
3199 __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR);
3210 ::
size_t src_offset,
3213 const VECTOR_CLASS<Event>* events = NULL,
3217 cl_int err = detail::errHandler(
3219 object_,
src(),
dst(), src_offset,
3220 (const ::size_t *) dst_origin, (const ::size_t *) region,
3221 (events != NULL) ? (cl_uint) events->
size() : 0,
3222 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3223 (
event != NULL) ? &tmp : NULL),
3224 __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR);
3238 const VECTOR_CLASS<Event>* events = NULL,
3240 cl_int* err = NULL)
const
3244 object_,
buffer(), blocking, flags, offset, size,
3245 (events != NULL) ? (cl_uint) events->
size() : 0,
3246 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3250 detail::errHandler(error, __ENQUEUE_MAP_BUFFER_ERR);
3258 const Image& buffer,
3263 ::
size_t * row_pitch,
3264 ::
size_t * slice_pitch,
3265 const VECTOR_CLASS<Event>* events = NULL,
3267 cl_int* err = NULL)
const
3271 object_,
buffer(), blocking, flags,
3272 (const ::size_t *) origin, (const ::size_t *) region,
3273 row_pitch, slice_pitch,
3274 (events != NULL) ? (cl_uint) events->
size() : 0,
3275 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3279 detail::errHandler(error, __ENQUEUE_MAP_IMAGE_ERR);
3289 const VECTOR_CLASS<Event>* events = NULL,
3293 cl_int err = detail::errHandler(
3295 object_,
memory(), mapped_ptr,
3296 (events != NULL) ? (cl_uint) events->size() : 0,
3297 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3298 (
event != NULL) ? &tmp : NULL),
3299 __ENQUEUE_UNMAP_MEM_OBJECT_ERR);
3312 const VECTOR_CLASS<Event>* events = NULL,
3316 cl_int err = detail::errHandler(
3318 object_, kernel(), (cl_uint) global.
dimensions(),
3319 offset.
dimensions() != 0 ? (const ::size_t*) offset : NULL,
3320 (const ::size_t*) global,
3321 local.
dimensions() != 0 ? (const ::size_t*) local : NULL,
3322 (events != NULL) ? (
cl_uint) events->size() : 0,
3323 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3324 (
event != NULL) ? &tmp : NULL),
3325 __ENQUEUE_NDRANGE_KERNEL_ERR);
3335 const VECTOR_CLASS<Event>* events = NULL,
3339 cl_int err = detail::errHandler(
3342 (events != NULL) ? (cl_uint) events->size() : 0,
3343 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3344 (
event != NULL) ? &tmp : NULL),
3345 __ENQUEUE_TASK_ERR);
3357 void (*userFptr)(
void *),
3361 std::pair<void*, ::size_t>
args,
3362 const VECTOR_CLASS<Memory>* mem_objects = NULL,
3363 const VECTOR_CLASS<const void*>* mem_locs = NULL,
3364 const VECTOR_CLASS<Event>* events = NULL,
3367 cl_mem * mems = (mem_objects != NULL && mem_objects->size() > 0)
3368 ? (
cl_mem*) alloca(mem_objects->size() *
sizeof(
cl_mem))
3372 for (
unsigned int i = 0; i < mem_objects->size(); i++) {
3373 mems[i] = ((*mem_objects)[i])();
3378 cl_int err = detail::errHandler(
3380 object_, userFptr, args.first, args.second,
3381 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
3383 (mem_locs != NULL) ? (
const void **) &mem_locs->front() : NULL,
3384 (events != NULL) ? (cl_uint) events->size() : 0,
3385 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3386 (
event != NULL) ? &tmp : NULL),
3387 __ENQUEUE_NATIVE_KERNEL);
3395 #if defined(CL_VERSION_1_2)
3396 cl_int enqueueMarkerWithWaitList(
3397 const VECTOR_CLASS<Event>& events,
Event*
event = NULL)
const
3399 return detail::errHandler(
3400 ::clEnqueueMarkerWithWaitList(
3402 (cl_uint) events.size(),
3403 (
const cl_event*) &events.front(),
3405 __ENQUEUE_MARKER_WITH_WAIT_LIST_ERR);
3410 return detail::errHandler(
3412 __ENQUEUE_MARKER_ERR);
3417 return detail::errHandler(
3420 (cl_uint) events.size(),
3421 (
const cl_event*) &events.front()),
3422 __ENQUEUE_WAIT_FOR_EVENTS_ERR);
3427 const VECTOR_CLASS<Memory>* mem_objects = NULL,
3428 const VECTOR_CLASS<Event>* events = NULL,
3432 cl_int err = detail::errHandler(
3435 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
3436 (mem_objects != NULL) ? (
const cl_mem *) &mem_objects->front(): NULL,
3437 (events != NULL) ? (cl_uint) events->size() : 0,
3438 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3439 (
event != NULL) ? &tmp : NULL),
3440 __ENQUEUE_ACQUIRE_GL_ERR);
3449 const VECTOR_CLASS<Memory>* mem_objects = NULL,
3450 const VECTOR_CLASS<Event>* events = NULL,
3454 cl_int err = detail::errHandler(
3457 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
3458 (mem_objects != NULL) ? (
const cl_mem *) &mem_objects->front(): NULL,
3459 (events != NULL) ? (cl_uint) events->size() : 0,
3460 (events != NULL && events->size() > 0) ? (cl_event*) &events->front() : NULL,
3461 (
event != NULL) ? &tmp : NULL),
3462 __ENQUEUE_RELEASE_GL_ERR);
3470 #if defined (USE_DX_INTEROP)
3473 const cl_mem* mem_objects, cl_uint num_events_in_wait_list,
3474 const cl_event* event_wait_list, cl_event*
event);
3477 const cl_mem* mem_objects, cl_uint num_events_in_wait_list,
3478 const cl_event* event_wait_list, cl_event*
event);
3480 cl_int enqueueAcquireD3D10Objects(
3481 const VECTOR_CLASS<Memory>* mem_objects = NULL,
3482 const VECTOR_CLASS<Event>* events = NULL,
3485 static PFN_clEnqueueAcquireD3D10ObjectsKHR pfn_clEnqueueAcquireD3D10ObjectsKHR = NULL;
3489 cl_int err = detail::errHandler(
3490 pfn_clEnqueueAcquireD3D10ObjectsKHR(
3492 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
3493 (mem_objects != NULL) ? (
const cl_mem *) &mem_objects->front(): NULL,
3494 (events != NULL) ? (cl_uint) events->
size() : 0,
3495 (events != NULL) ? (cl_event*) &events->front() : NULL,
3496 (
event != NULL) ? &tmp : NULL),
3497 __ENQUEUE_ACQUIRE_GL_ERR);
3505 cl_int enqueueReleaseD3D10Objects(
3510 static PFN_clEnqueueReleaseD3D10ObjectsKHR pfn_clEnqueueReleaseD3D10ObjectsKHR = NULL;
3514 cl_int err = detail::errHandler(
3515 pfn_clEnqueueReleaseD3D10ObjectsKHR(
3517 (mem_objects != NULL) ? (cl_uint) mem_objects->size() : 0,
3518 (mem_objects != NULL) ? (
const cl_mem *) &mem_objects->front(): NULL,
3519 (events != NULL) ? (cl_uint) events->size() : 0,
3520 (events != NULL) ? (cl_event*) &events->front() : NULL,
3521 (
event != NULL) ? &tmp : NULL),
3522 __ENQUEUE_RELEASE_GL_ERR);
3531 #if defined(CL_VERSION_1_2)
3532 cl_int enqueueBarrierWithWaitList(
3533 const VECTOR_CLASS<Event>& events,
Event*
event = NULL)
const
3535 return detail::errHandler(
3536 ::clEnqueueBarrierWithWaitList(
3538 (cl_uint) events.size(),
3539 (
const cl_event*) &events.front(),
3541 __ENQUEUE_BARRIER_ERR);
3546 return detail::errHandler(
3548 __ENQUEUE_BARRIER_ERR);
3554 return detail::errHandler(::
clFlush(object_), __FLUSH_ERR);
3559 return detail::errHandler(::
clFinish(object_), __FINISH_ERR);
3573 const std::vector<cl::Event>* events,
3618 inline Event operator()(
const VECTOR_CLASS<Event>* events = NULL);
3620 template<
typename A1>
3621 inline Event operator()(
3623 const VECTOR_CLASS<Event>* events = NULL);
3625 template<
class A1,
class A2>
3626 inline Event operator()(
3629 const VECTOR_CLASS<Event>* events = NULL);
3631 template<
class A1,
class A2,
class A3>
3632 inline Event operator()(
3636 const VECTOR_CLASS<Event>* events = NULL);
3638 template<
class A1,
class A2,
class A3,
class A4>
3639 inline Event operator()(
3644 const VECTOR_CLASS<Event>* events = NULL);
3646 template<
class A1,
class A2,
class A3,
class A4,
class A5>
3647 inline Event operator()(
3653 const VECTOR_CLASS<Event>* events = NULL);
3655 template<
class A1,
class A2,
class A3,
class A4,
class A5,
class A6>
3656 inline Event operator()(
3663 const VECTOR_CLASS<Event>* events = NULL);
3665 template<
class A1,
class A2,
class A3,
class A4,
3666 class A5,
class A6,
class A7>
3667 inline Event operator()(
3675 const VECTOR_CLASS<Event>* events = NULL);
3677 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3678 class A6,
class A7,
class A8>
3679 inline Event operator()(
3688 const VECTOR_CLASS<Event>* events = NULL);
3690 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3691 class A6,
class A7,
class A8,
class A9>
3692 inline Event operator()(
3702 const VECTOR_CLASS<Event>* events = NULL);
3704 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3705 class A6,
class A7,
class A8,
class A9,
class A10>
3706 inline Event operator()(
3717 const VECTOR_CLASS<Event>* events = NULL);
3719 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3720 class A6,
class A7,
class A8,
class A9,
class A10,
3722 inline Event operator()(
3734 const VECTOR_CLASS<Event>* events = NULL);
3736 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3737 class A6,
class A7,
class A8,
class A9,
class A10,
3738 class A11,
class A12>
3739 inline Event operator()(
3752 const VECTOR_CLASS<Event>* events = NULL);
3754 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3755 class A6,
class A7,
class A8,
class A9,
class A10,
3756 class A11,
class A12,
class A13>
3757 inline Event operator()(
3771 const VECTOR_CLASS<Event>* events = NULL);
3773 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3774 class A6,
class A7,
class A8,
class A9,
class A10,
3775 class A11,
class A12,
class A13,
class A14>
3776 inline Event operator()(
3791 const VECTOR_CLASS<Event>* events = NULL);
3793 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3794 class A6,
class A7,
class A8,
class A9,
class A10,
3795 class A11,
class A12,
class A13,
class A14,
class A15>
3796 inline Event operator()(
3812 const VECTOR_CLASS<Event>* events = NULL);
3814 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3815 class A6,
class A7,
class A8,
class A9,
class A10,
3816 class A11,
class A12,
class A13,
class A14,
class A15,
3818 inline Event operator()(
3835 const VECTOR_CLASS<Event>* events = NULL);
3837 template<
class A1,
class A2,
class A3,
class A4,
class A5,
3838 class A6,
class A7,
class A8,
class A9,
class A10,
3839 class A11,
class A12,
class A13,
class A14,
class A15,
3840 class A16,
class A17>
3841 inline Event operator()(
3859 const VECTOR_CLASS<Event>* events = NULL);
3885 kernel_ = rhs.kernel_;
3886 queue_ = rhs.queue_;
3887 offset_ = rhs.offset_;
3888 global_ = rhs.global_;
3889 local_ = rhs.local_;
3895 kernel_(rhs.kernel_),
3897 offset_(rhs.offset_),
3898 global_(rhs.global_),
3918 template<
typename A1>
3921 const VECTOR_CLASS<Event>* )
3938 template<
typename A1,
typename A2>
3942 const VECTOR_CLASS<Event>* )
3960 template<
typename A1,
typename A2,
typename A3>
3965 const VECTOR_CLASS<Event>* )
3984 template<
typename A1,
typename A2,
typename A3,
typename A4>
3990 const VECTOR_CLASS<Event>* )
4010 template<
typename A1,
typename A2,
typename A3,
typename A4,
typename A5>
4017 const VECTOR_CLASS<Event>* )
4038 template<
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
4047 const VECTOR_CLASS<Event>* )
4069 template<
typename A1,
typename A2,
typename A3,
typename A4,
4070 typename A5,
typename A6,
typename A7>
4079 const VECTOR_CLASS<Event>* )
4102 template<
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
4103 typename A6,
typename A7,
typename A8>
4113 const VECTOR_CLASS<Event>* )
4137 template<
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
4138 typename A6,
typename A7,
typename A8,
typename A9>
4149 const VECTOR_CLASS<Event>* )
4174 template<
typename A1,
typename A2,
typename A3,
typename A4,
typename A5,
4175 typename A6,
typename A7,
typename A8,
typename A9,
typename A10>
4187 const VECTOR_CLASS<Event>* )
4213 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4214 class A6,
class A7,
class A8,
class A9,
class A10,
4228 const VECTOR_CLASS<Event>* )
4255 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4256 class A6,
class A7,
class A8,
class A9,
class A10,
4257 class A11,
class A12>
4271 const VECTOR_CLASS<Event>* )
4299 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4300 class A6,
class A7,
class A8,
class A9,
class A10,
4301 class A11,
class A12,
class A13>
4316 const VECTOR_CLASS<Event>* )
4345 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4346 class A6,
class A7,
class A8,
class A9,
class A10,
4347 class A11,
class A12,
class A13,
class A14>
4363 const VECTOR_CLASS<Event>* )
4393 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4394 class A6,
class A7,
class A8,
class A9,
class A10,
4395 class A11,
class A12,
class A13,
class A14,
class A15>
4412 const VECTOR_CLASS<Event>* )
4443 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4444 class A6,
class A7,
class A8,
class A9,
class A10,
4445 class A11,
class A12,
class A13,
class A14,
class A15,
4464 const VECTOR_CLASS<Event>* )
4496 template<
class A1,
class A2,
class A3,
class A4,
class A5,
4497 class A6,
class A7,
class A8,
class A9,
class A10,
4498 class A11,
class A12,
class A13,
class A14,
class A15,
4499 class A16,
class A17>
4518 const VECTOR_CLASS<Event>* )
4552 #if !defined(__CL_USER_OVERRIDE_ERROR_STRINGS)
4553 #undef __GET_DEVICE_INFO_ERR
4554 #undef __GET_PLATFORM_INFO_ERR
4555 #undef __GET_DEVICE_IDS_ERR
4556 #undef __GET_CONTEXT_INFO_ERR
4557 #undef __GET_EVENT_INFO_ERR
4558 #undef __GET_EVENT_PROFILE_INFO_ERR
4559 #undef __GET_MEM_OBJECT_INFO_ERR
4560 #undef __GET_IMAGE_INFO_ERR
4561 #undef __GET_SAMPLER_INFO_ERR
4562 #undef __GET_KERNEL_INFO_ERR
4563 #undef __GET_KERNEL_WORK_GROUP_INFO_ERR
4564 #undef __GET_PROGRAM_INFO_ERR
4565 #undef __GET_PROGRAM_BUILD_INFO_ERR
4566 #undef __GET_COMMAND_QUEUE_INFO_ERR
4568 #undef __CREATE_CONTEXT_ERR
4569 #undef __CREATE_CONTEXT_FROM_TYPE_ERR
4570 #undef __GET_SUPPORTED_IMAGE_FORMATS_ERR
4572 #undef __CREATE_BUFFER_ERR
4573 #undef __CREATE_SUBBUFFER_ERR
4574 #undef __CREATE_IMAGE2D_ERR
4575 #undef __CREATE_IMAGE3D_ERR
4576 #undef __CREATE_SAMPLER_ERR
4577 #undef __SET_MEM_OBJECT_DESTRUCTOR_CALLBACK_ERR
4579 #undef __CREATE_USER_EVENT_ERR
4580 #undef __SET_USER_EVENT_STATUS_ERR
4581 #undef __SET_EVENT_CALLBACK_ERR
4583 #undef __WAIT_FOR_EVENTS_ERR
4585 #undef __CREATE_KERNEL_ERR
4586 #undef __SET_KERNEL_ARGS_ERR
4587 #undef __CREATE_PROGRAM_WITH_SOURCE_ERR
4588 #undef __CREATE_PROGRAM_WITH_BINARY_ERR
4589 #undef __BUILD_PROGRAM_ERR
4590 #undef __CREATE_KERNELS_IN_PROGRAM_ERR
4592 #undef __CREATE_COMMAND_QUEUE_ERR
4593 #undef __SET_COMMAND_QUEUE_PROPERTY_ERR
4594 #undef __ENQUEUE_READ_BUFFER_ERR
4595 #undef __ENQUEUE_WRITE_BUFFER_ERR
4596 #undef __ENQUEUE_READ_BUFFER_RECT_ERR
4597 #undef __ENQUEUE_WRITE_BUFFER_RECT_ERR
4598 #undef __ENQEUE_COPY_BUFFER_ERR
4599 #undef __ENQEUE_COPY_BUFFER_RECT_ERR
4600 #undef __ENQUEUE_READ_IMAGE_ERR
4601 #undef __ENQUEUE_WRITE_IMAGE_ERR
4602 #undef __ENQUEUE_COPY_IMAGE_ERR
4603 #undef __ENQUEUE_COPY_IMAGE_TO_BUFFER_ERR
4604 #undef __ENQUEUE_COPY_BUFFER_TO_IMAGE_ERR
4605 #undef __ENQUEUE_MAP_BUFFER_ERR
4606 #undef __ENQUEUE_MAP_IMAGE_ERR
4607 #undef __ENQUEUE_UNMAP_MEM_OBJECT_ERR
4608 #undef __ENQUEUE_NDRANGE_KERNEL_ERR
4609 #undef __ENQUEUE_TASK_ERR
4610 #undef __ENQUEUE_NATIVE_KERNEL
4612 #undef __UNLOAD_COMPILER_ERR
4613 #endif //__CL_USER_OVERRIDE_ERROR_STRINGS
4615 #undef __GET_INFO_HELPER_WITH_RETAIN
4618 #undef __INIT_CL_EXT_FCN_PTR
4619 #undef __CREATE_SUB_DEVICES
4621 #if defined(USE_CL_DEVICE_FISSION)
4622 #undef __PARAM_NAME_DEVICE_FISSION
4623 #endif // USE_CL_DEVICE_FISSION
GLsizei GLenum GLsizei GLsizei GLuint memory
struct _cl_device_id * cl_device_id
CL_API_ENTRY cl_int CL_API_CALL clCreateKernelsInProgram(cl_program program, cl_uint num_kernels, cl_kernel *kernels, cl_uint *num_kernels_ret) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
unsigned int capacity() const
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
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)
Image3D(const cl_mem &image3D)
CL_API_ENTRY cl_int CL_API_CALL clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0
const T & front(void) const
void push_back(const T &x)
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define __GET_INFO_HELPER_WITH_RETAIN(CPP_TYPE)
Image2D(const cl_mem &image2D)
detail::param_traits< detail::cl_context_info, name >::param_type getInfo(cl_int *err=NULL) const
struct _cl_context * cl_context
Memory & operator=(const Memory &rhs)
NDRange(::size_t size0,::size_t size1,::size_t size2)
CL_API_ENTRY cl_int CL_API_CALL clGetSamplerInfo(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
static cl_int retain(cl_sampler sampler)
CL_API_ENTRY cl_int CL_API_CALL clWaitForEvents(cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_int CL_API_CALL clEnqueueTask(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_2_DEPRECATED
KernelFunctor & operator=(const KernelFunctor &rhs)
::size_t length(void) const
CL_API_ENTRY void *CL_API_CALL clEnqueueMapImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t *origin, const size_t *region, size_t *image_row_pitch, size_t *image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
Memory(const Memory &memory)
cl_uint cl_mem_object_type
cl_uint cl_program_build_info
cl_ulong cl_device_partition_property_ext
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the and then *wait for them to all complete We provide a helper class
Image & operator=(const Image &rhs)
#define CL_MEM_OBJECT_IMAGE3D
CL_API_ENTRY cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties *properties, cl_device_type device_type, void(CL_CALLBACK *pfn_notify)(const char *errinfo, const void *private_info, size_tcb, void *user_data), void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
cl_uint cl_addressing_mode
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)
static iterator end(vector< T, N > &vec)
CL_API_ENTRY cl_int CL_API_CALL clGetKernelInfo(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
static cl_int release(cl_kernel kernel)
static cl_int retain(cl_command_queue queue)
CommandQueue(const CommandQueue &commandQueue)
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
cl_int getBuildInfo(const Device &device, cl_program_build_info name, T *param) const
KernelFunctor(const Kernel &kernel, const CommandQueue &queue, const NDRange &offset, const NDRange &global, const NDRange &local)
cl_int getSupportedImageFormats(cl_mem_flags flags, cl_mem_object_type type, VECTOR_CLASS< ImageFormat > *formats) const
cl_int getInfo(cl_mem_info name, T *param) const
detail::param_traits< detail::cl_device_info, name >::param_type getInfo(cl_int *err=NULL) const
Local address raper for use with Kernel::setArg.
detail::param_traits< detail::cl_kernel_work_group_info, name >::param_type getWorkGroupInfo(const Device &device, cl_int *err=NULL) const
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
BufferGL(const BufferGL &buffer)
CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBufferToImage(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t *dst_origin, const size_t *region, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
static cl_int release(cl_mem memory)
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
LocalSpaceArg __local(::size_t size)
#define CL_PLATFORM_ICD_SUFFIX_KHR
cl_int getInfo(cl_program_info name, T *param) const
::size_t size(const LocalSpaceArg &value)
Memory interface for cl_mem.
CommandQueue(const cl_command_queue &commandQueue)
cl_int getInfo(cl_sampler_info name, T *param) const
cl_int enqueueWaitForEvents(const VECTOR_CLASS< Event > &events) const
Program(const cl_program &program)
detail::param_traits< detail::cl_program_info, name >::param_type getInfo(cl_int *err=NULL) const
CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_0
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)
Kernel(const Kernel &kernel)
Image3D(const Image3D &image3D)
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
static cl_int retain(cl_device_id)
GLenum GLenum GLsizei void * image
Buffer(const Context &context, cl_mem_flags flags,::size_t size, void *host_ptr=NULL, cl_int *err=NULL)
CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLBuffer(cl_context context, cl_mem_flags flags, cl_GLuint bufobj, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
**But if you need a result
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
vector(unsigned int size, const T &val=T())
cl_uint cl_d3d10_device_source_khr
CL_API_ENTRY cl_int CL_API_CALL clGetGLObjectInfo(cl_mem memobj, cl_gl_object_type *gl_object_type, cl_GLuint *gl_object_name) CL_API_SUFFIX__VERSION_1_0
#define CL_PROGRAM_BINARIES
CL_API_ENTRY cl_kernel CL_API_CALL clCreateKernel(cl_program program, const char *kernel_name, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t *origin, const size_t *region, size_t input_row_pitch, size_t input_slice_pitch, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
VECTOR_CLASS< std::pair< const void *,::size_t > > Binaries
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueMarker(cl_command_queue command_queue, cl_event *event) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_ENTRY cl_int CL_API_CALL clGetProgramBuildInfo(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
Image3D & operator=(const Image3D &rhs)
CL_API_ENTRY cl_int CL_API_CALL clGetCommandQueueInfo(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV
CommandQueue(const Context &context, const Device &device, cl_command_queue_properties properties=0, cl_int *err=NULL)
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
string(char *str,::size_t size)
CL_API_ENTRY cl_int CL_API_CALL clCreateSubDevicesEXT(cl_device_id in_device, const cl_device_partition_property_ext *properties, cl_uint num_entries, cl_device_id *out_devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_1
CL_API_ENTRY cl_int CL_API_CALL clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context, cl_uint num_devices, const cl_device_id *device_list, const size_t *lengths, const unsigned char **binaries, cl_int *binary_status, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
vector(const vector< T, N > &vec)
Buffer(const Buffer &buffer)
static cl_int release(cl_sampler sampler)
bool operator!=(iterator i)
CL_API_ENTRY cl_int CL_API_CALL clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clBuildProgram(cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void(CL_CALLBACK *pfn_notify)(cl_program program, void *user_data), void *user_data) CL_API_SUFFIX__VERSION_1_0
static cl_int release(cl_program program)
struct _cl_platform_id * cl_platform_id
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
Image(const cl_mem &image)
bool operator==(vector< T, N > &vec)
Device(const Device &device)
CL_API_ENTRY cl_int CL_API_CALL clSetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void *arg_value) CL_API_SUFFIX__VERSION_1_0
cl_int getInfo(cl_event_info name, T *param) const
#define CL_DEVICE_INTEGRATED_MEMORY_NV
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV
CL_API_ENTRY cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
cl_int setArg(cl_uint index,::size_t size, void *argPtr)
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateFromGLTexture2D(cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
cl_uint cl_command_queue_info
Event interface for cl_event.
CL_API_ENTRY cl_int CL_API_CALL clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0
Program(const Context &context, const Sources &sources, cl_int *err=NULL)
GLint GLsizei GLsizei height
Buffer & operator=(const Buffer &rhs)
cl_int getImageInfo(cl_image_info name, T *param) const
CL_API_ENTRY cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
Program(const Context &context, const VECTOR_CLASS< Device > &devices, const Binaries &binaries, VECTOR_CLASS< cl_int > *binaryStatus=NULL, cl_int *err=NULL)
string(const string &rhs)
cl_int getObjectInfo(cl_gl_object_type *type, GLuint *gl_object_name)
Image3DGL(const Image3DGL &image)
string & operator=(const string &rhs)
CL_API_ENTRY cl_mem CL_API_CALL clCreateBuffer(cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
static cl_int retain(cl_program program)
Image2DGL(const Context &context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texobj, cl_int *err=NULL)
BufferGL(const Context &context, cl_mem_flags flags, GLuint bufobj, cl_int *err=NULL)
cl_uint cl_d3d10_device_set_khr
CL_API_ENTRY cl_int CL_API_CALL clGetMemObjectInfo(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
cl_bitfield cl_device_type
const T & back(void) const
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
CL_API_ENTRY cl_int CL_API_CALL clGetKernelWorkGroupInfo(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImageToBuffer(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t *src_origin, const size_t *region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0
static cl_int retain(cl_mem memory)
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueBarrier(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_ENTRY cl_int CL_API_CALL clGetPlatformIDs(cl_uint num_entries, cl_platform_id *platforms, cl_uint *num_platforms) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t *origin, const size_t *region, size_t row_pitch, size_t slice_pitch, void *ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_sampler CL_API_CALL clCreateSampler(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED
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
static cl_int retain(cl_kernel kernel)
static cl_int get(Functor f, cl_uint name, T *param)
detail::param_traits< detail::cl_event_info, name >::param_type getInfo(cl_int *err=NULL) const
struct _cl_kernel * cl_kernel
cl_int getProfilingInfo(cl_profiling_info name, T *param) const
detail::param_traits< detail::cl_mem_info, name >::param_type getInfo(cl_int *err=NULL) const
cl_bitfield cl_command_queue_properties
CL_API_ENTRY cl_context CL_API_CALL clCreateContext(const cl_context_properties *properties, cl_uint num_devices, const cl_device_id *devices, void(CL_CALLBACK *pfn_notify)(const char *errinfo, const void *private_info, size_tcb, void *user_data), void *user_data, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clGetDeviceInfo(cl_device_id device, cl_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
GLint GLint GLsizei GLint GLenum format
CL_API_ENTRY cl_int CL_API_CALL clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0
T & operator[](int index)
cl_int enqueueBarrier() const
BufferRenderGL(const BufferGL &buffer)
cl_int operator()(cl_uint param,::size_t size, void *value,::size_t *size_ret)
CL_API_ENTRY cl_int CL_API_CALL clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateFromGLTexture3D(cl_context context, cl_mem_flags flags, cl_GLenum target, cl_GLint miplevel, cl_GLuint texture, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
detail::param_traits< detail::cl_image_info, name >::param_type getImageInfo(cl_int *err=NULL) const
BufferRenderGL(const Context &context, cl_mem_flags flags, GLuint bufobj, cl_int *err=NULL)
GLdouble GLdouble GLint GLint order
*get result *(waiting if necessary)*A common idiom is to fire a bunch of sub tasks at the queue
#define CL_PROGRAM_BINARY_SIZES
auto get(const UT_ARTIterator< T > &it) -> decltype(it.key())
Sampler(const cl_sampler &sampler)
Image2D(const Image2D &image2D)
#define CL_INVALID_PLATFORM
Device(const cl_device_id &device)
CL_API_ENTRY cl_int CL_API_CALL clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
Image2DGL(const cl_mem &image)
cl_int getWorkGroupInfo(const Device &device, cl_kernel_work_group_info name, T *param) const
Sampler(const Sampler &sampler)
#define CL_DEVICE_GPU_OVERLAP_NV
CL_API_ENTRY cl_int CL_API_CALL clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseGLObjects(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
cl_int enqueueMarker(Event *event=NULL) const
Image3DGL(const cl_mem &image)
GLuint const GLchar * name
CL_API_ENTRY cl_int CL_API_CALL clEnqueueNativeKernel(cl_command_queue command_queue, void(CL_CALLBACK *user_func)(void *), void *args, size_t cb_args, cl_uint num_mem_objects, const cl_mem *mem_list, const void **args_mem_loc, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
GLsizei const GLchar *const * strings
BufferRenderGL(const BufferRenderGL &buffer)
cl_int enqueueNDRangeKernel(const Kernel &kernel, const NDRange &offset, const NDRange &global, const NDRange &local, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
static void * ptr(LocalSpaceArg &)
unsigned int size(void) const
BufferGL(const cl_mem &buffer)
CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireGLObjects(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
detail::param_traits< detail::cl_kernel_info, name >::param_type getInfo(cl_int *err=NULL) const
CE_API cl_int ce_enqueueKernel(const cl::CommandQueue &queue, const cl::Kernel &kernel, const cl::NDRange &offset, const cl::NDRange &global, const cl::NDRange &local, const std::vector< cl::Event > *events, cl::Event *event)
VECTOR_CLASS< std::pair< const char *,::size_t > > Sources
CL_API_ENTRY cl_int CL_API_CALL clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0
Fixed sized vector implementation that mirroring std::vector functionality.
GLint GLint GLsizei GLsizei GLsizei depth
struct _cl_sampler * cl_sampler
CL_API_ENTRY cl_int CL_API_CALL clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0
Context(const Context &context)
Buffer(const cl_mem &buffer)
#define __PARAM_NAME_INFO_1_0(F)
CL_API_ENTRY cl_program CL_API_CALL clCreateProgramWithSource(cl_context context, cl_uint count, const char **strings, const size_t *lengths, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
Program(const Program &program)
cl_type operator()() const
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
Memory(const cl_mem &memory)
CL_API_ENTRY cl_int CL_API_CALL clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0
Image2DGL(const Image2DGL &image)
#define CL_DEVICE_WARP_SIZE_NV
detail::param_traits< detail::cl_sampler_info, name >::param_type getInfo(cl_int *err=NULL) const
#define __INIT_CL_EXT_FCN_PTR(name)
CommandQueue interface for cl_command_queue.
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)
Context(const cl_context &context)
CL_API_ENTRY cl_int CL_API_CALL clGetContextInfo(cl_context context, cl_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
Sampler(const Context &context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int *err=NULL)
unsigned int max_size(void) const
const char * c_str(void) const
vector< T, N > & operator=(const vector< T, N > &rhs)
cl_int enqueueUnmapMemObject(const Memory &memory, void *mapped_ptr, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
static cl_int release(cl_command_queue queue)
GLenum GLsizei GLsizei GLint * values
intptr_t cl_context_properties
Wrapper(const cl_type &obj)
struct _cl_event * cl_event
class CE_API KernelFunctor
cl_int getObjectInfo(cl_gl_object_type *type, GLuint *gl_object_name)
struct _cl_command_queue * cl_command_queue
CL_API_ENTRY cl_int CL_API_CALL clGetImageInfo(cl_mem image, cl_image_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
#define CL_PROGRAM_NUM_DEVICES
LeafData & operator=(const LeafData &)=delete
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueWaitForEvents(cl_command_queue command_queue, cl_uint num_events, const cl_event *event_list) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
bool operator==(iterator i)
cl_int createKernels(VECTOR_CLASS< Kernel > *kernels)
CL_API_ENTRY cl_int CL_API_CALL clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0
Event(const Event &event)
cl_int operator()(cl_uint param,::size_t size, void *value,::size_t *size_ret)
cl_int build(const VECTOR_CLASS< Device > &devices, const char *options=NULL, void(CL_CALLBACK *notifyFptr)(cl_program, void *)=NULL, void *data=NULL) const
cl_int getInfo(cl_device_info name, T *param) const
Image3DGL(const Context &context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texobj, cl_int *err=NULL)
void assign(I start, I end)
CL_API_ENTRY cl_int CL_API_CALL clGetSupportedImageFormats(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format *image_formats, cl_uint *num_image_formats) CL_API_SUFFIX__VERSION_1_0
#define CL_INVALID_DEVICE
Sampler interface for cl_sampler.
static cl_int retain(cl_event event)
Kernel functor interface.
detail::param_traits< detail::cl_program_build_info, name >::param_type getBuildInfo(const Device &device, cl_int *err=NULL) const
CL_API_ENTRY cl_mem CL_API_CALL clCreateFromGLRenderbuffer(cl_context context, cl_mem_flags flags, cl_GLuint renderbuffer, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
::size_t size(void) const
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
Wrapper(const Wrapper< cl_type > &rhs)
GA_API const UT_StringHolder N
Base class interface for all images.
Wrapper< cl_type > & operator=(const Wrapper< cl_type > &rhs)
cl_int getInfo(cl_context_info name, T *param) const
static cl_int release(cl_event event)
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV
**If you just want to fire and args
BufferRenderGL(const cl_mem &buffer)
CL_API_ENTRY cl_int CL_API_CALL clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
Image interface for 2D images.
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
cl_int setArg(cl_uint index, T value)
cl_uint cl_kernel_work_group_info
cl_int getInfo(cl_kernel_info name, T *param) const
Kernel interface that implements cl_kernel.
Event(const cl_event &event)
Image interface for 3D images.
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateImage3D(cl_context context, cl_mem_flags flags, const cl_image_format *image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
CL_API_ENTRY cl_int CL_API_CALL clGetProgramInfo(cl_program program, cl_program_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
Memory buffer interface for GL interop with renderbuffer.
KernelFunctor bind(const CommandQueue &queue, const NDRange &offset, const NDRange &global, const NDRange &local)
detail::param_traits< detail::cl_profiling_info, name >::param_type getProfilingInfo(cl_int *err=NULL) const
cl_int enqueueAcquireGLObjects(const VECTOR_CLASS< Memory > *mem_objects=NULL, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
struct _cl_program * cl_program
NDRange(::size_t size0,::size_t size1)
CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyImage(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t *src_origin, const size_t *dst_origin, const size_t *region, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
CL_API_ENTRY void *CL_API_CALL clEnqueueMapBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_0
#define __CL_DECLARE_PARAM_TRAITS(token, param_name, T)
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
Event operator()(const VECTOR_CLASS< Event > *events=NULL)
Device interface for cl_device_id.
Event & operator=(const Event &rhs)
CL_API_ENTRY cl_int CL_API_CALL clGetEventInfo(cl_event event, cl_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD
cl_int enqueueTask(const Kernel &kernel, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
cl_int enqueueReleaseGLObjects(const VECTOR_CLASS< Memory > *mem_objects=NULL, const VECTOR_CLASS< Event > *events=NULL, Event *event=NULL) const
static cl_int waitForEvents(const VECTOR_CLASS< Event > &events)
::size_t dimensions() const
CL_API_ENTRY cl_int CL_API_CALL clEnqueueCopyBuffer(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0
Program interface that implements cl_program.
detail::param_traits< detail::cl_command_queue_info, name >::param_type getInfo(cl_int *err=NULL) const
CL_API_ENTRY cl_int CL_API_CALL clGetEventProfilingInfo(cl_event event, cl_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
cl_int getInfo(cl_command_queue_info name, T *param) const
static cl_int retain(cl_context context)
size_t class used to interface between C++ and OpenCL C calls that require arrays of size_t values...
static cl_int release(cl_device_id)
Simple string class, that provides a limited subset of std::string functionality but avoids many of t...
cl_uint cl_gl_object_type
CL_API_ENTRY cl_int CL_API_CALL clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0
GLbitfield GLuint program
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)
Memory buffer interface for GL interop.
CL_API_ENTRY CL_API_PREFIX__VERSION_1_2_DEPRECATED cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2_DEPRECATED
Kernel(const cl_kernel &kernel)
CL_API_ENTRY CL_API_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL clCreateImage2D(cl_context context, cl_mem_flags flags, const cl_image_format *image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void *host_ptr, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_1_DEPRECATED
2D image interface for GL interop.
static iterator begin(vector< T, N > &vec)
static cl_int release(cl_context context)
Image2D & operator=(const Image2D &rhs)
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
T operator[](int index) const
Image(const Image &image)
GLsizei GLenum GLenum GLuint GLenum GLsizei * lengths
Iterator class for vectors.
cl_uint cl_profiling_info
CL_API_ENTRY cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue command_queue, cl_mem memobj, void *mapped_ptr, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_0