Skip to content

Commit 8b738d6

Browse files
[Janitor mode] Fix whitespace
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@25808 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 2f771a1 commit 8b738d6

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

Compiler/SimCode/SimCodeUtil.mo

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ algorithm
15561556
Option<SimCode.FmiModelStructure> modelStruct;
15571557
list<SimCodeVar.SimVar> mixedArrayVars;
15581558
HashTableCrIListArray.HashTable varToArrayIndexMapping; //maps each variable to an array position
1559-
1559+
15601560
case (dlow, class_, _, fileDir, _,_, _, _, _, _, _, _, _) equation
15611561
System.tmpTickReset(0);
15621562
uniqueEqIndex = 1;
@@ -1720,7 +1720,7 @@ algorithm
17201720
//print("HASHTABLE MAPPING\n\n");
17211721
//BaseHashTable.dumpHashTable(varToArrayIndexMapping);
17221722
//print("\n\n");
1723-
1723+
17241724
simCode = SimCode.SIMCODE(modelInfo,
17251725
{}, // Set by the traversal below...
17261726
recordDecls,
@@ -12530,16 +12530,16 @@ algorithm
1253012530
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(boolParamVars, function createVarToArrayIndexMapping1(iVarType=3), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253112531
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(inputVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253212532
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(outputVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
12533-
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(constVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
12533+
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(constVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253412534
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(realOptimizeConstraintsVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253512535
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(realOptimizeFinalConstraintsVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
12536-
12536+
1253712537
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(aliasVars, function createVarToArrayIndexMapping1(iVarType=1), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253812538
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(intAliasVars, function createVarToArrayIndexMapping1(iVarType=2), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1253912539
((currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable)) = List.fold(boolAliasVars, function createVarToArrayIndexMapping1(iVarType=3), (currentVarIndices, varArrayIndexMappingHashTable, varIndexMappingHashTable));
1254012540
then varArrayIndexMappingHashTable;
1254112541
else
12542-
then HashTableCrIListArray.emptyHashTable();
12542+
then HashTableCrIListArray.emptyHashTable();
1254312543
end match;
1254412544
end createVarToArrayIndexMapping;
1254512545

@@ -12554,7 +12554,7 @@ protected
1255412554
DAE.ComponentRef arrayCref, varName, name, arrayName;
1255512555
Integer varIdx, arrayIndex;
1255612556
array<Integer> varIndices;
12557-
list<Integer> arrayDimensions;
12557+
list<Integer> arrayDimensions;
1255812558
list<String> numArrayElement;
1255912559
list<DAE.ComponentRef> expandedCrefs;
1256012560
list<String> numArrayElement;
@@ -12569,9 +12569,9 @@ algorithm
1256912569
(tmpCurrentVarIndices,varIdx) = getArrayIdxByVar(iVar, iVarType, tmpVarToIndexMapping, tmpCurrentVarIndices);
1257012570
//print("Adding variable " + ComponentReference.printComponentRefStr(name) + " to map with index " + intString(varIdx) + "\n");
1257112571
tmpVarToIndexMapping = BaseHashTable.add((name, {varIdx}), tmpVarToIndexMapping);
12572-
arraySubscripts = ComponentReference.crefLastSubs(name);
12572+
arraySubscripts = ComponentReference.crefLastSubs(name);
1257312573
arrayName = ComponentReference.crefStripLastSubs(name); // removeSubscripts(name);
12574-
12574+
1257512575
if(ComponentReference.crefEqual(arrayName, name)) then
1257612576
//print("Array not found\n");
1257712577
varIndices = arrayCreate(1, varIdx);
@@ -12619,20 +12619,20 @@ algorithm
1261912619
then (tmpCurrentVarIndices, varIdx);
1262012620
case(SimCodeVar.SIMVAR(name=name, aliasvar=SimCodeVar.NEGATEDALIAS(varName)),_,_)
1262112621
equation
12622-
if(BaseHashTable.hasKey(varName, iVarToIndexMapping)) then
12622+
if(BaseHashTable.hasKey(varName, iVarToIndexMapping)) then
1262312623
varIdx::_ = BaseHashTable.get(varName, iVarToIndexMapping);
1262412624
varIdx = intMul(varIdx,-1);
1262512625
else
1262612626
Error.addMessage(Error.INTERNAL_ERROR, {"Negated alias to unknown variable given."});
12627-
end if;
12627+
end if;
1262812628
then (iCurrentVarIndices, varIdx);
1262912629
case(SimCodeVar.SIMVAR(name=name, aliasvar=SimCodeVar.ALIAS(varName)),_,_)
1263012630
equation
1263112631
if(BaseHashTable.hasKey(varName, iVarToIndexMapping)) then
1263212632
varIdx::_ = BaseHashTable.get(varName, iVarToIndexMapping);
1263312633
else
1263412634
Error.addMessage(Error.INTERNAL_ERROR, {"Alias to unknown variable given."});
12635-
end if;
12635+
end if;
1263612636
then (iCurrentVarIndices, varIdx);
1263712637
end match;
1263812638
end getArrayIdxByVar;
@@ -12674,7 +12674,7 @@ protected
1267412674
algorithm
1267512675
varName := ComponentReference.crefStripLastSubs(varName);//removeSubscripts(varName);
1267612676
if(BaseHashTable.hasKey(varName, iVarToArrayIndexMapping)) then
12677-
((_,varIndices)) := BaseHashTable.get(varName, iVarToArrayIndexMapping);
12677+
((_,varIndices)) := BaseHashTable.get(varName, iVarToArrayIndexMapping);
1267812678
arraySize := arrayLength(varIndices);
1267912679
for arrayIdx in 0:(arraySize-1) loop
1268012680
idx := arrayGet(varIndices, arraySize-arrayIdx);

Compiler/Template/CodegenCpp.tpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ template translateModel(SimCode simCode)
1515
let target = simulationCodeTarget()
1616
let &extraFuncs = buffer "" /*BUFD*/
1717
let &extraFuncsDecl = buffer "" /*BUFD*/
18-
18+
1919
let numRealVars = numRealvars(modelInfo)
2020
let numIntVars = numIntvars(modelInfo)
2121
let numBoolVars = numBoolvars(modelInfo)
22-
22+
2323
let()= textFile(simulationMainFile(target, simCode , &extraFuncs , &extraFuncsDecl, "", "", "", "", numRealVars, numIntVars, numBoolVars, getPreVarsCount(modelInfo)), 'OMCpp<%fileNamePrefix%>Main.cpp')
2424
let()= textFile(simulationCppFile(simCode, contextOther, stringInt(numRealVars), stringInt(numIntVars), stringInt(numBoolVars), &extraFuncs, &extraFuncsDecl, '<%lastIdentOfPath(modelInfo.name)%>', stateDerVectorName, false), 'OMCpp<%fileNamePrefix%>.cpp')
2525
let()= textFile(simulationHeaderFile(simCode , contextOther,&extraFuncs , &extraFuncsDecl, '<%lastIdentOfPath(modelInfo.name)%>', "", "", "", MemberVariable(modelInfo, false), MemberVariablePreVariables(modelInfo,false), false), 'OMCpp<%fileNamePrefix%>.h')
@@ -6878,7 +6878,7 @@ match simVar
68786878
var_init
68796879
else
68806880
let size = Util.mulStringDelimit2Int(array_num_elem,",")
6881-
let var_init =
6881+
let var_init =
68826882
<<
68836883
>>
68846884
let arrayIndices = SimCodeUtil.getVarIndexListByMapping(varToArrayIndexMapping,name,indexForUndefinedReferences) |> idx => '(<%idx%>)'; separator=""

Compiler/Template/CodegenCppHpcom.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ template translateModel(SimCode simCode)
2222
let &extraFuncsDecl = buffer "" /*BUFD*/
2323
let stateDerVectorName = "__zDot"
2424
let useMemoryOptimization = Flags.isSet(Flags.HPCOM_MEMORY_OPT)
25-
25+
2626
let numRealVars = numRealvars(modelInfo, hpcomData.hpcOmMemory)
2727
let numIntVars = numIntvars(modelInfo, hpcomData.hpcOmMemory)
2828
let numBoolVars = numBoolvars(modelInfo, hpcomData.hpcOmMemory)

Compiler/Template/SimCodeTV.mo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ package builtin
157157
input Integer index;
158158
output Integer ch;
159159
end stringGet;
160-
160+
161161
function listHead
162162
replaceable type TypeVar subtypeof Any;
163163
input list<TypeVar> lst;

0 commit comments

Comments
 (0)