diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index 7145b6de6ad61aca6be2d17c3e568d35544cebc6..a3a1313a2010a54db078bf61d7ee282f68c38217 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -378,6 +378,10 @@ class mem_migration_flags(_NoInit): pass +class mem_migration_flags_ext(_NoInit): + pass + + class device_partition_property_ext(_NoInit): pass diff --git a/src/c_wrapper/wrap_cl.h b/src/c_wrapper/wrap_cl.h index 89ed2df46e1c9d1957edd905fd601be69aa75a99..a263f640b36ec696e03eb3e9e0134c6138554958 100644 --- a/src/c_wrapper/wrap_cl.h +++ b/src/c_wrapper/wrap_cl.h @@ -59,6 +59,10 @@ #endif +#ifndef cl_ext_migrate_memobject +typedef cl_bitfield cl_mem_migration_flags_ext; +#endif + namespace pyopencl { struct clbase; } diff --git a/src/c_wrapper/wrap_constants.cpp b/src/c_wrapper/wrap_constants.cpp index f12d3b30a4b2dab2c9680ecfcdc659ba17258b38..5d92d54c512b7f3f4fb2c1ebae22d1002825be75 100644 --- a/src/c_wrapper/wrap_constants.cpp +++ b/src/c_wrapper/wrap_constants.cpp @@ -627,6 +627,14 @@ namespace pyopencl { #endif + // mem_migration_flags_ext +#ifdef cl_ext_migrate_memobject + ADD_ATTR("mem_migration_flags_ext", MIGRATE_MEM_OBJECT_, HOST, _EXT); + ADD_ATTR("mem_migration_flags_ext", MIGRATE_MEM_OBJECT_, + CONTENT_UNDEFINED, _EXT); +#endif + + // device_partition_property_ext #if defined(cl_ext_device_fission) && defined(PYOPENCL_USE_DEVICE_FISSION) ADD_ATTR("device_partition_property_ext",