comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: ANN:Ada 2005 Math Extensions 20170427
Date: Tue, 09 May 2017 13:49:01 +0100
Date: 2017-05-09T13:49:01+01:00	[thread overview]
Message-ID: <lytw4ui4aq.fsf@pushface.org> (raw)
In-Reply-To: ad6601b7-097f-4c52-acb4-720e8d911b84@googlegroups.com

Vincent DIEMUNSCH <vincent.diemunsch@gmail.com> 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_");

  reply	other threads:[~2017-05-09 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 10:52 ANN:Ada 2005 Math Extensions 20170427 Simon Wright
2017-05-09 11:31 ` Vincent DIEMUNSCH
2017-05-09 12:49   ` Simon Wright [this message]
2017-05-09 13:20     ` Vincent
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox