From f7e29b649efedae4e5693a70ce9e2322b5099ab1 Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Tue, 24 Jan 2012 21:33:56 -0600 Subject: 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. --- Tools/CodeGen/CalculationFunction.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Tools') 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; -- cgit v1.2.3