From e50096a8846a95fbc5e10039e275c0af0118e598 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 14 Nov 2019 17:11:44 -0600 Subject: [PATCH] constants: mark all cl_bitfield from cl.h --- pyopencl/__init__.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 7177cf9d..1fe13c3e 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -218,9 +218,29 @@ CONSTANT_CLASSES = tuple( and name[0].islower() and name not in ["zip", "map", "range"]) BITFIELD_CONSTANT_CLASSES = ( + _cl.device_type, + _cl.device_fp_config, + _cl.device_exec_capabilities, + _cl.command_queue_properties, + _cl.mem_flags, + _cl.map_flags, _cl.kernel_arg_type_qualifier, ) +if get_cl_header_version() >= (1, 2): + BITFIELD_CONSTANT_CLASSES += ( + _cl.device_affinity_domain, + _cl.mem_migration_flags, + ) + +if get_cl_header_version() >= (2, 0): + BITFIELD_CONSTANT_CLASSES += ( + _cl.device_svm_capabilities, + _cl.queue_properties, + _cl.svm_mem_flags, + ) + + # {{{ diagnostics class CompilerWarning(UserWarning): -- GitLab