From 3b3e2cc46efc06e37b26c23603b001c96e6db5f9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 14 Sep 2020 21:55:29 -0500 Subject: [PATCH] Add missing Program GetInfos --- doc/make_constants.py | 3 +++ src/wrap_cl.hpp | 9 +++++++++ src/wrap_constants.cpp | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/doc/make_constants.py b/doc/make_constants.py index c4919cd0..0f78f019 100644 --- a/doc/make_constants.py +++ b/doc/make_constants.py @@ -319,6 +319,9 @@ const_ext_lookup = { cl.program_info: { "NUM_KERNELS": cl_12, "KERNEL_NAMES": cl_12, + "PROGRAM_IL": cl_21_late, + "SCOPE_GLOBAL_CTORS_PRESENT": cl_22, + "SCOPE_GLOBAL_DTORS_PRESENT": cl_22, }, cl.program_build_info: { diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index 05c746a5..cd350fe7 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -3773,6 +3773,15 @@ namespace pyopencl case CL_PROGRAM_KERNEL_NAMES: PYOPENCL_GET_STR_INFO(Program, m_program, param_name); #endif +#if PYOPENCL_CL_VERSION >= 0x2010 + case CL_PROGRAM_IL: + PYOPENCL_GET_STR_INFO(Program, m_program, param_name); +#endif +#if PYOPENCL_CL_VERSION >= 0x2020 + case CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT: + case CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT: + PYOPENCL_GET_TYPED_INFO(Program, m_program, param_name, cl_bool); +#endif default: throw error("Program.get_info", CL_INVALID_VALUE); diff --git a/src/wrap_constants.cpp b/src/wrap_constants.cpp index 1c93bdf0..67c14a56 100644 --- a/src/wrap_constants.cpp +++ b/src/wrap_constants.cpp @@ -868,6 +868,13 @@ void pyopencl_expose_constants(py::module &m) #if PYOPENCL_CL_VERSION >= 0x1020 ADD_ATTR(PROGRAM_, NUM_KERNELS); ADD_ATTR(PROGRAM_, KERNEL_NAMES); +#endif +#if PYOPENCL_CL_VERSION >= 0x2010 + ADD_ATTR(PROGRAM_, IL); +#endif +#if PYOPENCL_CL_VERSION >= 0x2020 + ADD_ATTR(PROGRAM_, SCOPE_GLOBAL_CTORS_PRESENT); + ADD_ATTR(PROGRAM_, SCOPE_GLOBAL_DTORS_PRESENT); #endif } -- GitLab