Skip to content

Commit

Permalink
Schedule.m: Name the calculation according to CaKernel convention
Browse files Browse the repository at this point in the history
  • Loading branch information
ianhinder committed Jan 25, 2012
1 parent 171e7ff commit 7446b5b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Tools/CodeGen/Schedule.m
Expand Up @@ -63,7 +63,9 @@
(* 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,
Expand Down Expand Up @@ -107,7 +109,7 @@
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],
{},
Expand Down Expand Up @@ -189,7 +191,7 @@
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",
Expand Down

0 comments on commit 7446b5b

Please sign in to comment.