aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen/CalculationFunction.m
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2013-09-06 23:52:36 +0200
committerIan Hinder <ian.hinder@aei.mpg.de>2013-09-06 23:52:36 +0200
commite69ab5bd00ff28547a68031815a20ad6bc6aa4f5 (patch)
tree1f9ab24854fe2753a92adc4589caeaf4cafd487c /Tools/CodeGen/CalculationFunction.m
parentff6d8a0a9c94483d5818835bef95ebd4325407d9 (diff)
CalculationFunction.m: Move OpenCL epilogue to OpenCL.m
Diffstat (limited to 'Tools/CodeGen/CalculationFunction.m')
-rw-r--r--Tools/CodeGen/CalculationFunction.m27
1 files changed, 2 insertions, 25 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m
index d8948cd..27e65c0 100644
--- a/Tools/CodeGen/CalculationFunction.m
+++ b/Tools/CodeGen/CalculationFunction.m
@@ -367,31 +367,8 @@ DefFn[
}],
(* OpenCL kernel epilogue *)
- If[OptionValue[UseOpenCL],
- {
- ";\n\n",
- Module[
- {ignoreGroups, groupsNames, groupNameList},
- ignoreGroups = {"TmunuBase::stress_energy_scalar",
- "TmunuBase::stress_energy_vector",
- "TmunuBase::stress_energy_tensor"};
- groupNames = GroupsInCalculation[cleancalc, imp];
- groupNames = Select[groupNames, !MemberQ[ignoreGroups, #] &];
- {
- "const char* const groups[] = {\n ",
- Riffle[Join[Map[Quote, groupNames], {"NULL"}], ",\n "],
- "};\n\n"
- }
- ],
- "static struct OpenCLKernel *kernel = NULL;\n",
- "const char* const sources[] = {differencing, source, NULL};\n",
- "OpenCLRunTime_CallKernel(cctkGH, CCTK_THORNSTRING, \"" <> functionName <> "\",\n",
- " sources, groups, NULL, NULL, NULL, -1,\n",
- " imin, imax, &kernel);\n\n"
- },
- {
- }]
- }],
+ If[OptionValue[UseOpenCL], OpenCLEpilogue[cleancalc, imp, functionName], {}]
+ }], (* <BodyFunction *)
If[lookup[calcp,CallerFunction],
DefineCCTKSubroutine[functionName,