From a904f74b5cef7053e90e64bfbedb13d5051fff70 Mon Sep 17 00:00:00 2001 From: Yichao Yu <yyc1992@gmail.com> Date: Sun, 22 Jun 2014 15:52:49 +0800 Subject: [PATCH] migration_flags_ext --- pyopencl/cffi_cl.py | 4 ++++ src/c_wrapper/wrap_cl.h | 4 ++++ src/c_wrapper/wrap_constants.cpp | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index 7145b6de..a3a1313a 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 89ed2df4..a263f640 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 f12d3b30..5d92d54c 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", -- GitLab