From a6294d0b7a0bae75c67598426b0b2264b018c2cb Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sat, 28 Jul 2012 16:18:52 -0400
Subject: [PATCH 1/1] Don't expose clCreateProgramWithBuiltInKernels on Apple CL 1.2.
(reported by Bogdan Opanchuk)
---
src/wrapper/wrap_cl.hpp | 5 ++++-
src/wrapper/wrap_cl_part_2.cpp | 3 ++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/wrapper/wrap_cl.hpp b/src/wrapper/wrap_cl.hpp
index 90c9a3f..9efedf7 100644
a
|
b
|
namespace pyopencl |
3006 | 3006 | |
3007 | 3007 | |
3008 | 3008 | |
3009 | | #if PYOPENCL_CL_VERSION >= 0x1020 |
| 3009 | #if (PYOPENCL_CL_VERSION >= 0x1020) && \ |
| 3010 | ((PYOPENCL_CL_VERSION >= 0x1030) && defined(__APPLE__)) |
3010 | 3011 | inline |
3011 | 3012 | program *create_program_with_built_in_kernels( |
3012 | 3013 | context &ctx, |
… |
… |
namespace pyopencl |
3033 | 3034 | throw; |
3034 | 3035 | } |
3035 | 3036 | } |
| 3037 | #endif |
3036 | 3038 | |
3037 | 3039 | |
3038 | 3040 | |
| 3041 | #if PYOPENCL_CL_VERSION >= 0x1020 |
3039 | 3042 | inline |
3040 | 3043 | program *link_program( |
3041 | 3044 | context &ctx, |
diff --git a/src/wrapper/wrap_cl_part_2.cpp b/src/wrapper/wrap_cl_part_2.cpp
index 3205c2e..cc7942c 100644
a
|
b
|
void pyopencl_expose_part_2() |
196 | 196 | create_program_with_binary, |
197 | 197 | py::default_call_policies(), |
198 | 198 | py::args("context", "devices", "binaries"))) |
199 | | #if PYOPENCL_CL_VERSION >= 0x1020 |
| 199 | #if (PYOPENCL_CL_VERSION >= 0x1020) && \ |
| 200 | ((PYOPENCL_CL_VERSION >= 0x1030) && defined(__APPLE__)) |
200 | 201 | .def("create_with_built_in_kernels", |
201 | 202 | create_program_with_built_in_kernels, |
202 | 203 | py::args("context", "devices", "kernel_names"), |