From 304fedf61dbd8a4ddd114bd11ad465250d1e7452 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 17 Aug 2018 16:44:14 -0500 Subject: [PATCH] Remove set_event instrumentation --- src/wrap_cl.hpp | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/src/wrap_cl.hpp b/src/wrap_cl.hpp index f5ab376c..ae5d3dc2 100644 --- a/src/wrap_cl.hpp +++ b/src/wrap_cl.hpp @@ -1515,9 +1515,6 @@ namespace pyopencl static void evt_callback(cl_event evt, cl_int command_exec_status, void *user_data) { - // FIXME REMOVE - puts("event callback: started"); - event_callback_info_t *cb_info = reinterpret_cast<event_callback_info_t *>(user_data); { std::lock_guard<std::mutex> lg(cb_info->m_mutex); @@ -1525,14 +1522,8 @@ namespace pyopencl cb_info->m_command_exec_status = command_exec_status; cb_info->m_notify_thread_wakeup_is_genuine = true; } - // FIXME REMOVE - puts("event callback: before cv notify"); cb_info->m_condvar.notify_one(); - - // FIXME REMOVE - puts("event callback: done"); - } public: @@ -1549,26 +1540,18 @@ namespace pyopencl std::thread notif_thread([cb_info]() { - // FIXME REMOVE - puts("thread: started"); { std::unique_lock<std::mutex> ulk(cb_info->m_mutex); cb_info->m_condvar.wait( ulk, [&](){ return cb_info->m_notify_thread_wakeup_is_genuine; }); - // FIXME REMOVE - puts("thread: wait returned"); - // ulk no longer held here, cb_info ready for deletion } { py::gil_scoped_acquire acquire; - // FIXME REMOVE - puts("thread: gil acquired"); - if (cb_info->m_set_callback_suceeded) { try { @@ -1585,15 +1568,9 @@ namespace pyopencl } } - // FIXME REMOVE - puts("thread: before delete"); - // Need to hold GIL to delete py::object instances in // event_callback_info_t delete cb_info; - // - // FIXME REMOVE - puts("thread: ending"); } }); // Thread is away--it is now its responsibility to free cb_info. -- GitLab