Skip to content

Commit

Permalink
[Janitor mode] Fix whitespace
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22771 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
OpenModelica-Hudson committed Oct 16, 2014
1 parent c1aaa75 commit 9fedfd5
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 36 deletions.
18 changes: 9 additions & 9 deletions Compiler/BackEnd/HpcOmScheduler.mo
Expand Up @@ -624,7 +624,7 @@ algorithm
end createDepTask;

protected function createDepTaskAndCommunicationInfo "author: marcusw
Create a dependeny task that indicates that variables of another task are required.
Create a dependeny task that indicates that variables of another task are required.
The communication info is created out of the given communication array and the simvar-mapping."
input HpcOmSimCode.Task iSourceTask;
input HpcOmSimCode.Task iTargetTask;
Expand Down Expand Up @@ -665,7 +665,7 @@ algorithm
commInfo = convertCommunicationToCommInfo(commBetweenTasks, iSimVarMapping);
tmpTask = createDepTask(iSourceTask, iTargetTask, false, commInfo);
then tmpTask;
else
else
equation
print("CreateDepTaskAndCommunicationInfo failed!\n");
then fail();
Expand Down Expand Up @@ -5757,8 +5757,8 @@ algorithm
end match;
end isEmptyTask;

public function convertFixedLevelScheduleToTaskLists
"Convert the given LevelSchedule to an list of task for each level and each thread.
public function convertFixedLevelScheduleToTaskLists
"Convert the given LevelSchedule to an list of task for each level and each thread.
author:marcusw"
input HpcOmSimCode.Schedule iSchedule;
input Integer iNumOfThreads;
Expand All @@ -5784,7 +5784,7 @@ algorithm
end convertFixedLevelScheduleToTaskLists;

protected function convertFixedLevelScheduleToTaskLists1
"Add the task list of the given array-index to the result list.
"Add the task list of the given array-index to the result list.
author:marcusw"
input array<list<HpcOmSimCode.Task>> iLevelTasks;
input Integer iCurrentArrayIdx;
Expand All @@ -5806,7 +5806,7 @@ algorithm
then tmpResultList;
else
then iResultList;
end matchcontinue;
end matchcontinue;
end convertFixedLevelScheduleToTaskLists1;

protected function revertTaskLists
Expand All @@ -5828,7 +5828,7 @@ algorithm
then tmpResultList;
else
then iResultList;
end matchcontinue;
end matchcontinue;
end revertTaskLists;

protected function revertTaskList
Expand All @@ -5850,11 +5850,11 @@ algorithm
then tmpResultList;
else
then iResultList;
end matchcontinue;
end matchcontinue;
end revertTaskList;

protected function convertFixedLevelScheduleToTaskListsForLevel
"Convert a level task list into a task list for each thread.
"Convert a level task list into a task list for each thread.
author:marcusw"
input HpcOmSimCode.TaskList iTasksOfLevel;
input Integer iThreadCount;
Expand Down
8 changes: 4 additions & 4 deletions Compiler/SimCode/HpcOmSimCodeMain.mo
Expand Up @@ -172,7 +172,7 @@ algorithm
list<tuple<HpcOmSimCode.Task, list<Integer>>> eventSystemTasks;
list<SimCode.SimEqSystem> equationsForConditions;
array<Option<SimCode.SimEqSystem>> simEqIdxSimEqMapping;

array<list<SimCodeVar.SimVar>> simVarMapping; //maps each backend variable to a list of simVars
case (BackendDAE.DAE(eqs=eqs), _, _, _, _, _, _, _, _, _, _, _) equation

Expand Down Expand Up @@ -307,7 +307,7 @@ algorithm
SimCodeUtil.execStat("hpcom dump simplified TaskGraph");

Debug.fcall(Flags.HPCOM_DUMP,print,"Filter successful applied\n");

//Create schedule
//---------------
numProc = Flags.getConfigInt(Flags.NUM_PROC);
Expand All @@ -329,7 +329,7 @@ algorithm
//HpcOmScheduler.printSchedule(schedule);

SimCodeUtil.execStat("hpcom dump schedule TaskGraph");

Debug.fcall(Flags.HPCOM_DUMP,print,"Schedule created\n");

//Check ODE-System size
Expand Down Expand Up @@ -455,7 +455,7 @@ algorithm
//doNotMerge = List.map3(doNotMergeIn,HpcOmTaskGraph.getCompInComps,1,inComps,nodeMark);
//(taskGraph1,taskGraphMeta1,changed1) = HpcOmTaskGraph.mergeSimpleNodes(taskGraph1, taskGraphMeta1, doNotMerge);
changed1 = false;

//HpcOmTaskGraph.TASKGRAPHMETA(inComps=inComps,nodeMark=nodeMark) = taskGraphMeta1;
//doNotMerge = List.map3(doNotMergeIn,HpcOmTaskGraph.getCompInComps,1,inComps,nodeMark);
//(taskGraph1,taskGraphMeta1,changed2) = HpcOmTaskGraph.mergeParentNodes(taskGraph1, taskGraphMeta1, doNotMerge);
Expand Down
2 changes: 1 addition & 1 deletion Compiler/SimCode/SimCodeUtil.mo
Expand Up @@ -12969,7 +12969,7 @@ algorithm
simVars = List.map1(crefs,get,ht);
simVarIdcs = List.map2(simVars,getSimVarIndex,varInfo,allVars);
varMapping = makeVarMapTuple(simVarIdcs,bVarIdcs,{});
_ = List.fold1(simVars, fillSimVarMapping, simVarMapping, 1);
_ = List.fold1(simVars, fillSimVarMapping, simVarMapping, 1);
//print(stringDelimitList(List.map(crefs,ComponentReference.printComponentRefStr),"\n")+&"\n");
//List.map_0(simVars,dumpVar);
then
Expand Down
10 changes: 5 additions & 5 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -1803,7 +1803,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
measureTimeProfileBlocksArray = std::vector<MeasureTimeData>(<%numOfEqs%>);
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","profileBlocks",&measureTimeProfileBlocksArray);
measureTimeFunctionsArray = std::vector<MeasureTimeData>(3); //1 evaluateODE ; 2 evaluateAll; 3 writeOutput
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","functions",&measureTimeFunctionsArray);
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","functions",&measureTimeFunctionsArray);
measuredProfileBlockStartValues = MeasureTime::getZeroValues();
measuredProfileBlockEndValues = MeasureTime::getZeroValues();
measuredFunctionStartValues = MeasureTime::getZeroValues();
Expand All @@ -1815,7 +1815,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
ss << i;
measureTimeProfileBlocksArray[i] = MeasureTimeData(ss.str());
}

measureTimeFunctionsArray[0] = MeasureTimeData("evaluateODE");
measureTimeFunctionsArray[1] = MeasureTimeData("evaluateAll");
measureTimeFunctionsArray[2] = MeasureTimeData("writeOutput");
Expand Down Expand Up @@ -4488,7 +4488,7 @@ match modelInfo
<%generateMethodDeclarationCode(simCode)%>
virtual bool getCondition(unsigned int index);
virtual void initPreVars(unordered_map<string,unsigned int>&,unordered_map<string,unsigned int>&);
protected:
//Methods:
<%getrealvars%>
Expand Down Expand Up @@ -4522,7 +4522,7 @@ match modelInfo
>>%>
<%memberfuncs%>
<%additionalProtectedMembers%>
};
>>
Expand Down Expand Up @@ -11565,7 +11565,7 @@ template createEvaluateAll( list<SimEqSystem> allEquationsPlusWhen,list<SimWhenC
<%equation_all_func_calls%>
/* Reinits */
<%reinit%>
<%generateMeasureTimeEndCode("measuredFunctionStartValues", "measuredFunctionEndValues", "measureTimeFunctionsArray[1]")%>
return state_var_reinitialized;
}
Expand Down
26 changes: 13 additions & 13 deletions Compiler/Template/CodegenCppHpcom.tpl
Expand Up @@ -373,7 +373,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
measureTimeProfileBlocksArray = std::vector<MeasureTimeData>(<%numOfEqs%>);
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","profileBlocks",&measureTimeProfileBlocksArray);
measureTimeFunctionsArray = std::vector<MeasureTimeData>(3); //1 evaluateODE ; 2 evaluateAll; 3 writeOutput
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","functions",&measureTimeFunctionsArray);
MeasureTime::addResultContentBlock("<%dotPath(modelInfo.name)%>","functions",&measureTimeFunctionsArray);
measuredProfileBlockStartValues = MeasureTime::getZeroValues();
measuredProfileBlockEndValues = MeasureTime::getZeroValues();
measuredFunctionStartValues = MeasureTime::getZeroValues();
Expand All @@ -385,7 +385,7 @@ case SIMCODE(modelInfo = MODELINFO(__)) then
ss << i;
measureTimeProfileBlocksArray[i] = MeasureTimeData(ss.str());
}
measureTimeFunctionsArray[0] = MeasureTimeData("evaluateODE");
measureTimeFunctionsArray[1] = MeasureTimeData("evaluateAll");
measureTimeFunctionsArray[2] = MeasureTimeData("writeOutput");
Expand Down Expand Up @@ -458,9 +458,9 @@ template getHpcomMemberVariableDefinition(Option<Schedule> hpcOmScheduleOpt)
,<%initializeBarrierByName("levelBarrier","",getConfigInt(NUM_PROC),type)%>
>>
else ""
end match
end match
else ""
end match
end match
end getHpcomMemberVariableDefinition;

template getHpcomConstructorExtension(Option<Schedule> hpcOmScheduleOpt, String modelNamePrefixStr)
Expand All @@ -473,7 +473,7 @@ template getHpcomConstructorExtension(Option<Schedule> hpcOmScheduleOpt, String
case ("pthreads_spin") then
let threadFuncs = List.intRange(getConfigInt(NUM_PROC)) |> tt hasindex i0 fromindex 0 => generateThread(i0, type, modelNamePrefixStr,"evaluateThreadFunc"); separator="\n"
<<

<%threadFuncs%>
>>
else ""
Expand Down Expand Up @@ -536,10 +536,10 @@ template getHpcomDestructorExtension(Option<Schedule> hpcOmScheduleOpt)
<<
<%destroylocks%>
>>
case "mpi" then
<<
//MF: Destruct MPI related stuff - nothing at the moment.
>>
case "mpi" then
<<
//MF: Destruct MPI related stuff - nothing at the moment.
>>
else
let joinThreads = arrayList(hpcOmSchedule.threadTasks) |> tt hasindex i0 fromindex 0 => function_HPCOM_joinThread(i0, type); separator="\n"
let threadReleaseLocks = arrayList(hpcOmSchedule.threadTasks) |> tt hasindex i0 fromindex 0 => releaseLockByLockName(i0, "th_lock", type); separator="\n"
Expand Down Expand Up @@ -649,7 +649,7 @@ template update2(list<SimEqSystem> allEquationsPlusWhen, list<list<SimEqSystem>>
/*delete threadValues;
++(measureTimeArrayHpcom[0].numCalcs);*/
>>%>

<%generateMeasureTimeEndCode("measuredFunctionStartValues", "measuredFunctionEndValues", "measureTimeFunctionsArray[0]")%>
}
>>
Expand Down Expand Up @@ -818,7 +818,7 @@ template generateLevelFixedCodeForThread(list<SimEqSystem> allEquationsPlusWhen,
MeasureTime::getInstance()->initializeThread(getThreadNumber);
//<%generateMeasureTimeStartCode('valuesStart')%>
>>%>
while(!_simulationFinished)
{
_evaluateBarrier.wait();
Expand All @@ -829,7 +829,7 @@ template generateLevelFixedCodeForThread(list<SimEqSystem> allEquationsPlusWhen,
}
<%if boolNot(stringEq(getConfigString(PROFILING_LEVEL),"none")) then '<%generateMeasureTimeStartCode("valuesStart")%>'%>
<%odeEqs%>

<%if boolNot(stringEq(getConfigString(PROFILING_LEVEL),"none")) then
<<
//MeasureTime::getTimeValuesEnd(valuesEnd);
Expand All @@ -842,7 +842,7 @@ template generateLevelFixedCodeForThread(list<SimEqSystem> allEquationsPlusWhen,
//_measureTimeArrayLock.unlock();
<%generateMeasureTimeEndCode("valuesStart", "valuesEnd", "measureTimeFunctionsArray[0]")%>
>>%>

_evaluateBarrier.wait();
}
<%if boolNot(stringEq(getConfigString(PROFILING_LEVEL),"none")) then
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Template/SimCodeTV.mo
Expand Up @@ -3334,7 +3334,7 @@ package HpcOmSimCode
list<SimCodeVar.SimVar> boolVars;
end COMMUNICATION_INFO;
end CommunicationInfo;

uniontype Task
record CALCTASK //Task which calculates something
Integer weighting;
Expand Down Expand Up @@ -3412,7 +3412,7 @@ package HpcOmMemory
end HpcOmMemory;

package HpcOmScheduler
function convertFixedLevelScheduleToTaskLists
function convertFixedLevelScheduleToTaskLists
input HpcOmSimCode.Schedule iSchedule;
input Integer iNumOfThreads;
output array<list<list<HpcOmSimCode.Task>>> oThreadLevelTasks;
Expand Down
4 changes: 2 additions & 2 deletions Compiler/Util/Util.mo
Expand Up @@ -981,7 +981,7 @@ public function arrayFold5
replaceable type ArgType3 subtypeof Any;
replaceable type ArgType4 subtypeof Any;
replaceable type ArgType5 subtypeof Any;

partial function FoldFunc5
input ElementType inElement;
input ArgType1 _inExtraArg1;
Expand Down Expand Up @@ -1074,7 +1074,7 @@ public function arrayFold6
replaceable type ArgType4 subtypeof Any;
replaceable type ArgType5 subtypeof Any;
replaceable type ArgType6 subtypeof Any;

partial function FoldFunc6
input ElementType inElement;
input ArgType1 _inExtraArg1;
Expand Down

0 comments on commit 9fedfd5

Please sign in to comment.