﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2669	Unnecessary function call for returning arrays	Willi Braun	Willi Braun	"For the second equation in the example below our code generation generate too many call to the function. For every array output element one call to the function.
That cause performance issue for instance in our fmi import.
{{{
loadString(""
function f1
  input Real u[:];
  input Integer n;
  output Real y[n];
algorithm
  for i in 1:n loop
    y[i] := sin(u[i]);
  end for;
end f1;
model ArrayReturnFunction
  parameter Integer n = 2;
  Real x[n] = {time, 2*time};
  Real y1[n];
  Real z1,z2;
equation
  y1 = f1(x, n);
  {z1,z2} = f1(x, 2);
end ArrayReturnFunction;
"");
getErrorString();
simulate(ArrayReturnFunction);
getErrorString();
}}}"	enhancement	closed	high	1.9.2	Code Generation	trunk	fixed		
