diff --git a/pyopencl/_cffi.py b/pyopencl/_cffi.py index bd68dbc761b48ee0f23e306880697557816ac349..52179af3915f3a95fe95226a36fc1f2c202b3928 100644 --- a/pyopencl/_cffi.py +++ b/pyopencl/_cffi.py @@ -46,6 +46,7 @@ typedef cl_bitfield cl_device_fp_config; typedef cl_uint cl_device_mem_cache_type; typedef cl_uint cl_device_local_mem_type; typedef cl_bitfield cl_device_exec_capabilities; +typedef cl_bitfield cl_device_svm_capabilities; // 2.0 typedef cl_bitfield cl_command_queue_properties; typedef intptr_t cl_device_partition_property; typedef cl_bitfield cl_device_affinity_domain; @@ -56,6 +57,7 @@ typedef cl_uint cl_command_queue_info; typedef cl_uint cl_channel_order; typedef cl_uint cl_channel_type; typedef cl_bitfield cl_mem_flags; +typedef cl_bitfield cl_svm_mem_flags; // 2.0 typedef cl_uint cl_mem_object_type; typedef cl_uint cl_mem_info; typedef cl_bitfield cl_mem_migration_flags; @@ -65,6 +67,8 @@ typedef cl_uint cl_addressing_mode; typedef cl_uint cl_filter_mode; typedef cl_uint cl_sampler_info; typedef cl_bitfield cl_map_flags; +typedef intptr_t cl_pipe_properties; // 2.0 +typedef cl_uint cl_pipe_info; // 2.0 typedef cl_uint cl_program_info; typedef cl_uint cl_program_build_info; typedef cl_uint cl_program_binary_type; @@ -78,6 +82,8 @@ typedef cl_uint cl_kernel_work_group_info; typedef cl_uint cl_event_info; typedef cl_uint cl_command_type; typedef cl_uint cl_profiling_info; +typedef cl_bitfield cl_sampler_properties; // 2.0 +typedef cl_uint cl_kernel_exec_info; // 2.0 typedef struct _cl_image_format { cl_channel_order image_channel_order; @@ -122,6 +128,13 @@ typedef cl_uint cl_gl_object_type; typedef cl_uint cl_gl_texture_info; typedef cl_uint cl_gl_platform_info; typedef struct __GLsync *cl_GLsync; +typedef cl_uint cl_gl_context_info; + +/* cl_egl.h */ +typedef void* CLeglImageKHR; +typedef void* CLeglDisplayKHR; +typedef void* CLeglSyncKHR; +typedef intptr_t cl_egl_image_properties_khr; /* c++ class pointer */ typedef struct clbase *clobj_t; diff --git a/src/c_wrapper/wrap_cl.h b/src/c_wrapper/wrap_cl.h index b97f3cf096177920c7108a3be29ff4cd47ec8ab5..e235f5bbafcd958de1c3fa17b3d068e1e38bb732 100644 --- a/src/c_wrapper/wrap_cl.h +++ b/src/c_wrapper/wrap_cl.h @@ -51,7 +51,9 @@ #define PYOPENCL_CL_VERSION PYOPENCL_PRETEND_CL_VERSION #else -#if defined(CL_VERSION_1_2) +#if defined(CL_VERSION_2_0) +#define PYOPENCL_CL_VERSION 0x2000 +#elif defined(CL_VERSION_1_2) #define PYOPENCL_CL_VERSION 0x1020 #elif defined(CL_VERSION_1_1) #define PYOPENCL_CL_VERSION 0x1010 @@ -61,7 +63,20 @@ #endif -#if PYOPENCL_CL_VERSION < 0x1020 +#ifndef(CL_VERSION_2_0) +typedef void* CLeglImageKHR; +typedef void* CLeglDisplayKHR; +typedef void* CLeglSyncKHR; +typedef intptr_t cl_egl_image_properties_khr; +typedef cl_bitfield cl_device_svm_capabilities; +typedef cl_bitfield cl_svm_mem_flags; +typedef intptr_t cl_pipe_properties; +typedef cl_uint cl_pipe_info; +typedef cl_bitfield cl_sampler_properties; +typedef cl_uint cl_kernel_exec_info; +#endif + +#ifndef(CL_VERSION_1_2) typedef intptr_t cl_device_partition_property; typedef cl_uint cl_kernel_arg_info; typedef struct _cl_image_desc cl_image_desc;