comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent <vincent.diemunsch@gmail.com>
Subject: Re: ANN:Ada 2005 Math Extensions 20170427
Date: Tue, 9 May 2017 06:20:37 -0700 (PDT)
Date: 2017-05-09T06:20:37-07:00	[thread overview]
Message-ID: <7543686f-136c-44a6-bf50-64bef4cdc66d@googlegroups.com> (raw)
In-Reply-To: <lytw4ui4aq.fsf@pushface.org>

Le mardi 9 mai 2017 14:49:03 UTC+2, Simon Wright a écrit :

> > - 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);
> 
>    ...

Thank you very much Simon for your kind answer. I will use the third one, the Fortran binding, because I prefer column-major order, for different reasons :
1. It is easier to interface with Fortran solvers (obviously), and many excellent solvers are still in Fortran.
2. It is easier to interface with Matlab compatible solvers written in C that use sparse matrices in CSC format, since CSC is column-major.
3. It is easier to deal with multidimensionnal arrays that contain matrices (a very common case in scientific computation).
4. It is consistent with little endian ordering.
5. It is the convention in math to see matrices composed of column vectors. Using matrices in row-major order forces you to transpose formulas, and it is a pain.
6. A simple Pragma Convention (Fortran) is enough to transpose to row-major an array manually entered in the source code.

Kind regards,

Vincent




      reply	other threads:[~2017-05-09 13:20 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
2017-05-09 13:20     ` Vincent [this message]
replies disabled

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