From bc5565673c25a8c1ce33dcd1839687a8fce27c16 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Wed, 14 Aug 2019 09:32:28 +0200 Subject: [PATCH] Add clarifying comment ot opencljit (change of kernel name) We cannot compile with kernel name `kernel` since `kernel==__kernel` is a keyword in OpenCL --- pystencils/opencl/opencljit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pystencils/opencl/opencljit.py b/pystencils/opencl/opencljit.py index caea978de..75076db53 100644 --- a/pystencils/opencl/opencljit.py +++ b/pystencils/opencl/opencljit.py @@ -30,6 +30,7 @@ def make_python_function(kernel_function_node, opencl_queue, opencl_ctx, argumen if argument_dict is None: argument_dict = {} + # Changing of kernel name necessary since compilation with default name "kernel" is not possible (OpenCL keyword!) kernel_function_node.function_name = "opencl_" + kernel_function_node.function_name header_list = ['"opencl_stdint.h"'] + list(get_headers(kernel_function_node)) includes = "\n".join(["#include %s" % (include_file,) for include_file in header_list]) -- GitLab