Skip to content

Commit 30e0085

Browse files
committed
Add is_queue_in_order
1 parent ab78e46 commit 30e0085

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/wrap_cl.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,19 @@ namespace pyopencl
496496
// }}}
497497

498498

499+
// {{{ utility functions
500+
501+
inline bool is_queue_in_order(cl_command_queue queue)
502+
{
503+
cl_command_queue_properties param_value;
504+
PYOPENCL_CALL_GUARDED(clGetCommandQueueInfo,
505+
(queue, CL_QUEUE_PROPERTIES, sizeof(param_value), &param_value, 0));
506+
return !(param_value & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE);
507+
}
508+
509+
// }}}
510+
511+
499512
// {{{ buffer interface helper
500513

501514

0 commit comments

Comments
 (0)