From 0aa3d024dc36e9742aae489075762ca9bbd954e4 Mon Sep 17 00:00:00 2001 From: Kyle Lutz Date: Sun, 31 Mar 2013 12:08:23 -0400 Subject: [PATCH] Fix command_queue::enqueue_marker() for OpenCL 1.2 This changes the enqueue_marker() method in the command_queue class to use clEnqueueMarkerWithWaitList() instead of the deprecated clEnqueueMarker() function when compiling with OpenCL 1.2. --- include/boost/compute/command_queue.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/compute/command_queue.hpp b/include/boost/compute/command_queue.hpp index ab15d7c4..cc484960 100644 --- a/include/boost/compute/command_queue.hpp +++ b/include/boost/compute/command_queue.hpp @@ -970,7 +970,13 @@ public: event enqueue_marker() { cl_event event_; + + #ifdef CL_VERSION_1_2 + cl_int ret = clEnqueueMarkerWithWaitList(m_queue, 0, 0, &event_); + #else cl_int ret = clEnqueueMarker(m_queue, &event_); + #endif + if(ret != CL_SUCCESS){ BOOST_THROW_EXCEPTION(runtime_exception(ret)); }