﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4753	NF reductions use a poor generation	Martin Sjölund	Per Östlund	"There are several problems with how reductions are handled in the new frontend. One is that for example sum is transformed into a sum *call* to a reduction returning an array instead of a single reduction that does not create a temporary array. The other is that it has problem with polymorphic types. It should be implemented in the same way as the old front-end handling of reductions.

{{{#!mo
function Modelica.Math.BooleanVectors.countTrue
  input Boolean[:] b;
  output Integer n;
algorithm
  /*Integer*/ n := /*polymorphic<ScalarBasicType>*/ sum(array(if /*Boolean*/ b[/*Integer*/ i] then 1 else 0 for i in 1:size(/*Boolean[:]*/ b, 1)));
end Modelica.Math.BooleanVectors.countTrue;
}}}"	defect	closed	high	Future	New Instantiation		fixed		Francesco Casella Per Östlund
