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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: The answer to "Can Ada replace FORTRAN for numerical computation? Date: Mon, 22 Jul 2019 14:20:12 +0100 Organization: A noiseless patient Spider Message-ID: References: <4ba1579b-a096-483d-8f7a-9028a419d643@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="b53b3f3fe81ae77148a778ac85c0c800"; logging-data="12219"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18pG7d7gg9r4yzWRpChbhv+PXZpieSTSgU=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (darwin) Cancel-Lock: sha1:DXKvPE8qoHNSOmLqv70NO05JZ/A= sha1:KUV0NMXe2/mjH9yBpCGuNAzOR14= Xref: reader01.eternal-september.org comp.lang.ada:56914 Date: 2019-07-22T14:20:12+01:00 List-Id: Lucretia writes: > On Monday, 22 July 2019 06:53:06 UTC+1, Simon Wright wrote: > >> I can't believe that the visible complaint (the ordering convention for >> matrices, row- vs column-major) would seriously impact the mental >> dexterity required to write mathematical code. >> >> And now we have Convention (Fortran), which makes it not-too-hard to >> interface to existing Fortran code. > > Wouldn't Ada also require multi-dimensional slices? Something I've > been wanting for a while, albeit in limited form, 2D/3D for > images/textures. I _think_ this is what the Fortran PACK/UNPACK & RESHAPE packages are for; for example [1]. Interesting that the representation of the matrices looks row-major! The pre- and post-conditions might be a challenge. [1] https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-unpack