aboutsummaryrefslogtreecommitdiff
path: root/Tools/CodeGen
diff options
context:
space:
mode:
authorIan Hinder <ian.hinder@aei.mpg.de>2012-01-24 19:25:55 -0600
committerIan Hinder <ian.hinder@aei.mpg.de>2012-01-24 19:25:55 -0600
commit7446b5b3abff985b373cc1c5247fe0cfc3ccb19b (patch)
tree78c3fb8d847e9024f97579f7a07d1142ac961412 /Tools/CodeGen
parent171e7ff9d6bf38d4cc30ee48c1bb84e9e75ab9c6 (diff)
Schedule.m: Name the calculation according to CaKernel convention
Diffstat (limited to 'Tools/CodeGen')
-rw-r--r--Tools/CodeGen/Schedule.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Tools/CodeGen/Schedule.m b/Tools/CodeGen/Schedule.m
index f58adc8..b74db66 100644
--- a/Tools/CodeGen/Schedule.m
+++ b/Tools/CodeGen/Schedule.m
@@ -63,7 +63,9 @@ groupsSetInCalc[calc_, groups_] :=
(* Each calculation can be scheduled at multiple points, so this
function returns a LIST of schedule structures for each calculation
*)
-scheduleCalc[calc_, groups_] :=
+
+Options[scheduleCalc] = ThornOptions;
+scheduleCalc[calc_, groups_, OptionsPattern[]] :=
Module[{points, conditional, conditionals, keywordConditional,
keywordConditionals, triggered, keyword, value, keywordvaluepairs,
groupsToSync, groupName, userSchedule, groupSched, fnSched,
@@ -107,7 +109,7 @@ scheduleCalc[calc_, groups_] :=
Return[Map[
Join[
{
- Name -> lookup[calc, Name],
+ Name -> If[OptionValue[UseCaKernel], "CAKERNEL_Launch_",""]<>lookup[calc, Name],
SchedulePoint -> # <> relStr,
SynchronizedGroups -> If[StringMatchQ[#, "*MoL_CalcRHS*", IgnoreCase -> True] || StringMatchQ[#, "*MoL_RHSBoundaries*", IgnoreCase -> True],
{},
@@ -189,7 +191,7 @@ CreateKrancScheduleFile[calcs_, groups_, evolvedGroups_, rhsGroups_, nonevolvedG
evolutionTimelevels_, opts:OptionsPattern[]] :=
Module[{scheduledCalcs, scheduledStartup, scheduleMoLRegister, globalStorageGroups, scheduledFunctions, schedule},
- scheduledCalcs = Flatten[Map[scheduleCalc[#, groups] &, calcs], 1];
+ scheduledCalcs = Flatten[Map[scheduleCalc[#, groups, opts] &, calcs], 1];
scheduledStartup =
{
Name -> thornName <> "_Startup",