diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-07 00:01:21 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2013-09-07 00:01:21 +0200 |
commit | a1a0a7eb47258f4351e33f62fcfd5059886be9b4 (patch) | |
tree | a7203d0a8582eecaca1e7668ba80694bc598283d /Tools/CodeGen/CalculationFunction.m | |
parent | e69ab5bd00ff28547a68031815a20ad6bc6aa4f5 (diff) |
CalculationFunction.m: Move Stringify call for OpenCL into OpenCL.m
Diffstat (limited to 'Tools/CodeGen/CalculationFunction.m')
-rw-r--r-- | Tools/CodeGen/CalculationFunction.m | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m index 27e65c0..befc256 100644 --- a/Tools/CodeGen/CalculationFunction.m +++ b/Tools/CodeGen/CalculationFunction.m @@ -340,8 +340,10 @@ DefFn[ (* We could (or probably should) write this into a source file of its own *) If[OptionValue[UseOpenCL], {OpenCLPrologue[]}, {}], - If[OptionValue[UseOpenCL], Stringify, Identity][{ - + Module[ + {kernelCode}, + kernelCode = + { CommentedBlock["Include user-supplied include files", Map[IncludeFile, lookupDefault[cleancalc, DeclarationIncludes, {}]]], @@ -364,7 +366,11 @@ DefFn[ pddefs, where, addToStencilWidth, opts]}, {}] - }], + }; + + If[OptionValue[UseOpenCL], kernelCode = OpenCLProcessKernel[kernelCode]]; + + kernelCode], (* OpenCL kernel epilogue *) If[OptionValue[UseOpenCL], OpenCLEpilogue[cleancalc, imp, functionName], {}] |