From c5e4a1d0521f1204527f1c7b4971426f48f0dedb Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 10 Dec 2015 00:00:33 -0600 Subject: [PATCH] Disable clEventSetCallback on windows --- src/c_wrapper/event.cpp | 4 ++-- src/c_wrapper/event.h | 2 +- src/c_wrapper/wrap_cl.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/c_wrapper/event.cpp b/src/c_wrapper/event.cpp index 6faf2b58..316b0810 100644 --- a/src/c_wrapper/event.cpp +++ b/src/c_wrapper/event.cpp @@ -85,7 +85,7 @@ event::release_private() noexcept delete m_p; return; } -#if PYOPENCL_CL_VERSION >= 0x1010 +#if PYOPENCL_CL_VERSION >= 0x1010 && defined(PYOPENCL_HAVE_EVENT_SET_CALLBACK) if (release_private_use_cb(this)) { try { event_private *p = m_p; @@ -221,7 +221,7 @@ event__wait(clobj_t evt) }); } -#if PYOPENCL_CL_VERSION >= 0x1010 +#if PYOPENCL_CL_VERSION >= 0x1010 && defined(PYOPENCL_HAVE_EVENT_SET_CALLBACK) error* event__set_callback(clobj_t _evt, cl_int type, void *pyobj) diff --git a/src/c_wrapper/event.h b/src/c_wrapper/event.h index 5c31af4a..c6d0dd4b 100644 --- a/src/c_wrapper/event.h +++ b/src/c_wrapper/event.h @@ -31,7 +31,7 @@ public: PYOPENCL_USE_RESULT generic_info get_profiling_info(cl_profiling_info param) const; void wait() const; -#if PYOPENCL_CL_VERSION >= 0x1010 +#if PYOPENCL_CL_VERSION >= 0x1010 && defined(PYOPENCL_HAVE_EVENT_SET_CALLBACK) template<typename Func> PYOPENCL_INLINE void set_callback(cl_int type, Func &&_func) diff --git a/src/c_wrapper/wrap_cl.h b/src/c_wrapper/wrap_cl.h index 576de6c9..537c56b0 100644 --- a/src/c_wrapper/wrap_cl.h +++ b/src/c_wrapper/wrap_cl.h @@ -34,6 +34,7 @@ #define strdup _strdup #else #include <unistd.h> +#define PYOPENCL_HAVE_EVENT_SET_CALLBACK #endif #ifdef HAVE_GL -- GitLab