Skip to content
Snippets Groups Projects
Commit 6ddc5b28 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Enable event callbacks on Windows on VS 2015+

parent 3d4b1936
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,7 @@
#ifdef __APPLE__
// Mac ------------------------------------------------------------------------
// {{{ Mac
#include <OpenCL/opencl.h>
#define PYOPENCL_HAVE_EVENT_SET_CALLBACK
......@@ -26,21 +26,39 @@
#include <OpenCL/cl_gl.h>
#include <OpenCL/cl_gl_ext.h>
#endif
// }}}
#else
// elsewhere ------------------------------------------------------------------
// {{{ elsewhere
#include <CL/cl.h>
#include <CL/cl_ext.h>
#if defined(_WIN32)
// {{{ Windows
#define NOMINMAX
#include <windows.h>
#define strdup _strdup
#define strcasecmp _stricmp
#if _MSC_VER >= 1900 /* VS 2015 and higher */
#define PYOPENCL_HAVE_EVENT_SET_CALLBACK
#endif
// }}}
#else
// {{{ non-Windows
#include <unistd.h>
#define PYOPENCL_HAVE_EVENT_SET_CALLBACK
// }}}
#endif
#ifdef HAVE_GL
......@@ -52,8 +70,14 @@
#define PYOPENCL_GL_SHARING_VERSION cl_khr_gl_sharing
#endif
// }}}
#endif
// }}}
// {{{ version handling
#ifdef PYOPENCL_PRETEND_CL_VERSION
#define PYOPENCL_CL_VERSION PYOPENCL_PRETEND_CL_VERSION
......@@ -71,6 +95,8 @@
#endif
// }}}
#ifndef CL_VERSION_2_0
typedef void* CLeglImageKHR;
typedef void* CLeglDisplayKHR;
......@@ -132,3 +158,5 @@ extern "C" {
#endif
#endif
// vim: foldmethod=marker
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment