Skip to content

Commit ef438e4

Browse files
committed
Also allow to use #undef in OpenCL C code
1 parent 326d3a0 commit ef438e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/kernel.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ string get_opencl_c_code() {
1010
r = replace(r, "#ifdef\n", "#ifdef "); // except for the arguments after some preprocessor options that need to be in the same line
1111
r = replace(r, "#ifndef\n", "#ifndef ");
1212
r = replace(r, "#define\n", "#define "); // #define with two arguments will not work
13+
r = replace(r, "#undef\n", "#undef ");
1314
r = replace(r, "#if\n", "#if "); // don't leave any spaces in arguments
1415
r = replace(r, "#elif\n", "#elif "); // don't leave any spaces in arguments
1516
r = replace(r, "#pragma\n", "#pragma ");

0 commit comments

Comments
 (0)