From c57693f41b546beeaf43e2d5f54eee2a754a4575 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 1 Jul 2022 01:14:58 -0500 Subject: [PATCH] Add is_queue_in_order --- src/wrap_cl.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index 98964056..9de1c2cd 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -496,6 +496,19 @@ namespace pyopencl // }}} + // {{{ utility functions + + inline bool is_queue_out_of_order(cl_command_queue queue) + { + cl_command_queue_properties param_value; + PYOPENCL_CALL_GUARDED(clGetCommandQueueInfo, + (queue, CL_QUEUE_PROPERTIES, sizeof(param_value), ¶m_value, 0)); + return param_value & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE; + } + + // }}} + + // {{{ buffer interface helper -- GitLab