Skip to content

Commit

Permalink
- fixed wrong measureTime results for evaluateAll
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23955 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Marcus Walther committed Jan 7, 2015
1 parent 06fedd0 commit 7e49f27
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -10926,7 +10926,7 @@ template daeExpCrefRhsArrayBox(ComponentRef cr,DAE.Type ty, Context context, Tex
cref2simvar(cr, simCode) |> var as SIMVAR(index=i) =>
match varKind
case STATE(__) then
let statvar = '__z[<%i%>] /*blubb*/ '
let statvar = '__z[<%i%>]'
let tmpArr = '<%daeExpCrefRhsArrayBox2(statvar,ty,context,preExp,varDecls,simCode , &extraFuncs , &extraFuncsDecl, extraFuncsNamespace)%>'
tmpArr
case STATE_DER(__) then
Expand Down Expand Up @@ -12257,6 +12257,7 @@ template createEvaluateAll( list<SimEqSystem> allEquationsPlusWhen,list<SimWhenC
<<
bool <%className%>::evaluateAll(const UPDATETYPE command)
{
<%if createMeasureTime then generateMeasureTimeStartCode("measuredFunctionStartValues", "evaluateAll_wo_ODE", "MEASURETIME_MODELFUNCTIONS") else ""%>
bool state_var_reinitialized = false;

<%varDecls%>
Expand All @@ -12265,15 +12266,12 @@ template createEvaluateAll( list<SimEqSystem> allEquationsPlusWhen,list<SimWhenC

/* evaluateODE(command);

<%if createMeasureTime then generateMeasureTimeStartCode("measuredFunctionStartValues", "evaluateAll_wo_ODE", "MEASURETIME_MODELFUNCTIONS") else ""%>

<%equation_notOde_func_calls%>
*/
// Reinits
<%reinit%>

<%if createMeasureTime then generateMeasureTimeEndCode("measuredFunctionStartValues", "measuredFunctionEndValues", "measureTimeFunctionsArray[1]", "evaluateAll_wo_ODE", "MEASURETIME_MODELFUNCTIONS") else ""%>

return state_var_reinitialized;
}
>>
Expand Down

0 comments on commit 7e49f27

Please sign in to comment.