Ticket #35437: patch-clCreateProgramWithBuiltInKernels.diff

File patch-clCreateProgramWithBuiltInKernels.diff, 1.6 KB (added by larryv (Lawrence Velázquez), 12 years ago)

patch to fix clCreateProgramWithBuiltInKernels issue

  • src/wrapper/wrap_cl.hpp

    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 
    30063006
    30073007
    30083008
    3009 #if PYOPENCL_CL_VERSION >= 0x1020
     3009#if (PYOPENCL_CL_VERSION >= 0x1020) && \
     3010      ((PYOPENCL_CL_VERSION >= 0x1030) && defined(__APPLE__))
    30103011  inline
    30113012  program *create_program_with_built_in_kernels(
    30123013      context &ctx,
    namespace pyopencl 
    30333034      throw;
    30343035    }
    30353036  }
     3037#endif
    30363038
    30373039
    30383040
     3041#if PYOPENCL_CL_VERSION >= 0x1020
    30393042  inline
    30403043  program *link_program(
    30413044      context &ctx,
  • src/wrapper/wrap_cl_part_2.cpp

    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() 
    196196            create_program_with_binary,
    197197            py::default_call_policies(),
    198198            py::args("context", "devices", "binaries")))
    199 #if PYOPENCL_CL_VERSION >= 0x1020
     199#if (PYOPENCL_CL_VERSION >= 0x1020) && \
     200      ((PYOPENCL_CL_VERSION >= 0x1030) && defined(__APPLE__))
    200201      .def("create_with_built_in_kernels",
    201202          create_program_with_built_in_kernels,
    202203          py::args("context", "devices", "kernel_names"),