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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN:Ada 2005 Math Extensions 20170427 Date: Tue, 09 May 2017 13:49:01 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="d290b80abe48222621d86e814eee5bf5"; logging-data="1558"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mD9CD67xPo31Nh/lUNFbqaKkrjTWRcWE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (darwin) Cancel-Lock: sha1:Px1DEoMMquTZrMaG0/2COFK6uSY= sha1:jI2SrnsBRNAr6Nfw5MXiKqwu29U= Xref: news.eternal-september.org comp.lang.ada:46730 Date: 2017-05-09T13:49:01+01:00 List-Id: Vincent DIEMUNSCH writes: > So if understand well, this is an extension of the Ada Arrays in > row-major order, right ? How is it using Lapack since Fortran has > column-major order for it's matrices ? By transposing input matrices before handing over to LAPACK, and transposing the results before handing back to the caller. > I have also seen different projects that use Lapack : > - Ada Lapack : https://sourceforge.net/projects/ada-lapack/ This is a translation of the Fortran library to Ada, and uses native Ada ordering (row-major). > - AdaLAPACK : https://sourceforge.net/projects/adalapack/ This is a binding, and its interface is explicitly in terms of Fortran-convention objects; for example, type Fortran_Real_Matrix is array (Fortran_Integer range <>, Fortran_Integer range <>) of Real; pragma Convention (Fortran, Fortran_Real_Matrix); ... procedure SGEEV (JOBVL : Character; JOBVR : Character; N : Fortran_Integer; A : Fortran_Real_Matrix; LDA : Fortran_Integer; WR : out Fortran_Real_Vector; WI : out Fortran_Real_Vector; VL : out Fortran_Real_Matrix; LDVL : Fortran_Integer; VR : out Fortran_Real_Matrix; LDVR : Fortran_Integer; WORK : in out Fortran_Real_Vector; LWORK : Fortran_Integer; INFO : out Fortran_Integer); pragma Import (Fortran, SGEEV, "sgeev_");