diff options
author | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-04-29 16:14:03 +0200 |
---|---|---|
committer | Ian Hinder <ian.hinder@aei.mpg.de> | 2012-04-29 16:14:03 +0200 |
commit | dba02bc0a5d5679ec83538b5d7e9350708eea0f6 (patch) | |
tree | 8d8956b05c243c1cdda436b4b2de3896b77f29e2 /Tools | |
parent | 99e9b2fea093bd3bedd22a07e7da8b014a94d297 (diff) |
Schedule.m: List variables instead of groups in READS and WRITES lines
This give more fine-grained control, and is consistent with CaKernel.
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/CodeGen/Schedule.m | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Tools/CodeGen/Schedule.m b/Tools/CodeGen/Schedule.m index 1e51ff9..c8fac55 100644 --- a/Tools/CodeGen/Schedule.m +++ b/Tools/CodeGen/Schedule.m @@ -103,7 +103,8 @@ scheduleCalc[calc_, groups_, thornName_, OptionsPattern[]] := groupsToSync, tags, prefixWithScope, groupsToRequire, groupsToProvide, groupName, userSchedule, groupSched, fnSched, - selbcSched, appbcSched, bcGroupName, condParams, bcGroupSched, before, after, relStr}, + selbcSched, appbcSched, bcGroupName, condParams, bcGroupSched, before, after, relStr, + variablesToRead, variablesToWrite}, conditional = mapContains[calc, ConditionalOnKeyword]; conditionals = mapContains[calc, ConditionalOnKeywords]; triggered = mapContains[calc, TriggerGroups]; @@ -138,8 +139,12 @@ scheduleCalc[calc_, groups_, thornName_, OptionsPattern[]] := If[StringMatchQ[ToString[group], __~~"::"~~__], ToString[group], thornName <> "::" <> ToString[group]]; - groupsToRequire = prefixWithScope /@ groupsReadInCalc[calc, groups]; - groupsToProvide = prefixWithScope /@ groupsSetInCalc[calc, groups]; + (* groupsToRequire = prefixWithScope /@ groupsReadInCalc[calc, groups]; *) + (* groupsToProvide = prefixWithScope /@ groupsSetInCalc[calc, groups]; *) + + variablesToRead = qualifyGFName[#, groups, thornName] & /@ variablesReadInCalc[calc, groups]; + variablesToWrite = qualifyGFName[#, groups, thornName] & /@ variablesSetInCalc[calc, groups]; + before = lookupDefault[calc, Before, None]; after = lookupDefault[calc, After, None]; @@ -162,8 +167,8 @@ scheduleCalc[calc_, groups_, thornName_, OptionsPattern[]] := groupsToSync], Language -> CodeGenC`SOURCELANGUAGE, Tags -> tags, - RequiredGroups -> groupsToRequire, - ProvidedGroups -> groupsToProvide, + RequiredGroups -> variablesToRead, + ProvidedGroups -> variablesToWrite, Comment -> lookup[calc, Name] }, If[triggered, {TriggerGroups -> lookup[calc, TriggerGroups]}, |