aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-01-24 21:33:56 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2012-01-24 21:33:56 -0600
commitf7e29b649efedae4e5693a70ce9e2322b5099ab1 (patch)
treed31394816f226f765c166bad8e7f30fd379edd2c /Tools
parent52ad7fafc418fc025f94111c8028f8ee9c7cb8d4 (diff)
CalculationFunction.m: Make the generation of a "caller" function dependent on a calculation member variable
The "caller" function is the one that is actually scheduled (in the C case) and which calls the looping function with the body function as argument. This separation is not needed for all targets, so make it optional.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/CodeGen/CalculationFunction.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Tools/CodeGen/CalculationFunction.m b/Tools/CodeGen/CalculationFunction.m
index be9ec84..d0b4fee 100644
--- a/Tools/CodeGen/CalculationFunction.m
+++ b/Tools/CodeGen/CalculationFunction.m
@@ -553,7 +553,8 @@ DefFn[
}]
}],
- DefineCCTKSubroutine[functionName,
+ If[lookup[calcp,CallerFunction],
+ DefineCCTKSubroutine[functionName,
FlattenBlock[{
ConditionalOnParameterTextual["verbose > 1",
"CCTK_VInfo(CCTK_THORNSTRING,\"Entering " <> bodyFunctionName <> "\");\n"],
@@ -583,7 +584,9 @@ DefFn[
ConditionalOnParameterTextual["verbose > 1",
"CCTK_VInfo(CCTK_THORNSTRING,\"Leaving " <> bodyFunctionName <> "\");\n"]
- }]]
+ }]],
+ (* else *)
+ ""]
}]];
Options[equationLoop] = ThornOptions;