From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7767a311e01e1cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 22 Oct 2006 21:17:26 -0500 Date: Sun, 22 Oct 2006 22:15:10 -0400 From: Jeffrey Creem User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT compiler switches and optimization References: <1161341264.471057.252750@h48g2000cwc.googlegroups.com> <9Qb_g.111857$aJ.65708@attbi_s21> <434o04-7g7.ln1@newserver.thecreems.com> <4539ce34$1_2@news.bluewin.ch> <453A532F.2070709@obry.net> <9kfq04-sgm.ln1@newserver.thecreems.com> <5vgs04-64f.ln1@newserver.thecreems.com> <453bc74e$0$19614$426a74cc@news.free.fr> <453bcdb9_6@news.bluewin.ch> <453bd9b5$0$31631$426a74cc@news.free.fr> In-Reply-To: <453bd9b5$0$31631$426a74cc@news.free.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: NNTP-Posting-Host: 24.147.74.171 X-Trace: sv3-40aK8ZvSW7nAeyT5YEHhSeqe1mPu0Jkx1IxKxEuYHKK3TAV5PVbtbQfKmFq+7jARV9qcTvnTaAi7bPV!/xstA1iZbvLT+AKUNmUXSbP1eZZbOyRo3xh7nOwqXjE4BdgxF4BSpqk/lCFXkysiF3HGJ/atJNZW!1r4= X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:7149 Date: 2006-10-22T22:15:10-04:00 List-Id: Damien Carbonne wrote: > Gautier a �crit : > >> Damien Carbonne: > > > >> >> >> The question of Fortran's array storage has been treated earlier in >> this discussion, you just happened to add more noise by not reading >> enough posts ;-). Look at the post of Martin Krischik, 20.10.06 18:30 >> CET... it shows the most serious testing so far, with the exact >> sources used for testing. > > Sorry for this. I'll go back to my silent lazy listening after this > message :-) S. Tardieu had also suggested this layout issue in one > message and I didn't follow the links given by M. Krischik. Anyway, > independently of compiler bugs or limitations, differences in matrix > layout leads to different (non strictly equivalent) programs! Which was > precisely a question asked by J. Creem in his first sentence ! > > Regards > Damien Actually, feel free to chime in even if you are not sure you are adding value. Heck, if we all waited until we were adding value, we'd never post anything :) Part problem here was my poor wording of the question. What I was asking is whether the two programs were sematically equivilent without dropping down to specific issues of storage representation. Specifically, one of the biggest speedups posted (and suggested by one person on the bugzilla list) changes the Ada program so it is no longer a pointer to an unconstrained array but rather a pointer to a constrained array where the constrained array type definition is determined at run time based on the size of the command line parameter. This may seem like the same thing but where I am asserting this falls apart is if someone wanted to write code that operated on variable sized arrays, this approach would probably not work (i.e. dynamic creation of a fixed length array). It appears to me that the FORTRAN version is using as dynamic an array size as possible and further that it is possible to pass these dynamically sized arrays to other procedures (for example matmul). Now, matmul may be some sort of special case because it appears to be a compiler intrinsic on most compilers. I've poked around the web resources a bit for FORTRAN 90/95 tutorials but I have not found the specific examples that would convince me I know what I am talking about. I guess what I am asking (or perhaps asserting) is that the original version of the Ada program is the closest to the FORTRAN version and not the one that creates the fixed length array since it appears to be that allocatable arrays of varying sizes can be passed to fortran subroutines. The original version of the Ada maintained that property. The modified version (and its derivatives that set the size in the type rather in the new) do not appear to me to be equivilent programs. The reason this is important is that in general I don't think we are trying to solve the "write the fastest program that can calculate a matrix multiply" but rather investigate the way in which fairly simple programming idioms are translated into assembly language and understand their runtime implications (at least that is what my goal has been in this).