CVS difference for ais/ai-00296.txt

Differences between 1.14 and version 1.15
Log of other versions for file ais/ai-00296.txt

--- ais/ai-00296.txt	2004/01/23 04:59:25	1.14
+++ ais/ai-00296.txt	2004/04/30 02:35:38	1.15
@@ -2842,3 +2842,42 @@
+From: Laurent Guerby
+Sent: Wednesday, March 24, 2004  2:36 PM
+!topic procedure version of Ada.Numerics.Generic_Real_Arrays services
+!reference AI-00296
+!from Laurent GUERBY 2004-03-24
+!keywords procedure function implementation unconstrained
+I believe adding a procedure version of the services
+proposed in Ada.Numerics.Generic_Real_Arrays would be welcomed by
+practioners of the field.
+In my experience, implementations of function returning unconstrained
+arrays are not very efficient since the implementation often
+has to do a copy and might use a stack whose size will likely be
+limited by the operating system. On my project (500 KSLOC
+Ada numerical software used for financial derivative products
+pricing compiled with GNAT) we had to disallow completely the use of
+function returning unconstrained arrays in all but the most
+simple cases.
+May be Ada implementors propose or will propose more efficient
+generated code for functions returning unconstrained arrays, but if it's
+not the case it's unlikely that the services of
+Ada.Numerics.Generic_Real_Arrays will be used in real code.
+The idea is to mirror all the functions by a procedure
+with an out parameter, eg:
+function "+"  (Left, Right : Real_Vector) return Real_Vector;
+procedure Add  (Left, Right : in Real_Vector; Result : out Real_Vector);
+Issues to consider are naming and aliasing. Let me know if you're
+willing to consider this issue, if so I'm willing to make a more
+substantial proposal.

Questions? Ask the ACAA Technical Agent