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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a05:620a:13ec:: with SMTP id h12mr48076555qkl.266.1563816423140; Mon, 22 Jul 2019 10:27:03 -0700 (PDT) X-Received: by 2002:a54:4003:: with SMTP id x3mr31487731oie.44.1563816422784; Mon, 22 Jul 2019 10:27:02 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!news.muarf.org!nntpfeed.proxad.net!feeder1-1.proxad.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!b26no2515492qtq.0!news-out.google.com!a5ni1526qtd.0!nntp.google.com!b26no2515488qtq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 22 Jul 2019 10:27:02 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <4ba1579b-a096-483d-8f7a-9028a419d643@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <28590d5c-d5f0-4322-9aa4-e1bb92419db3@googlegroups.com> Subject: Re: The answer to "Can Ada replace FORTRAN for numerical computation? From: Lucretia Injection-Date: Mon, 22 Jul 2019 17:27:03 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56916 Date: 2019-07-22T10:27:02-07:00 List-Id: On Monday, 22 July 2019 14:20:14 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 Something like: M2 := M4 (1, 1 .. 2, 2); -- Makes a copy into the Matrix 2x2 type from a 4x4.