Hello Greg! The warning 'that routines defined here are not optimized' was the reason I went directly for PDL::LinearAlgebra::Real, but now that I see the code I realize I would have been quite happy to use your nice interface; you create in your routines the same arrays I currently create in my code, so memory/time efficiency would not have been not diminished. Thanks, Luis
On Mon, May 22, 2017 at 03:44:24PM +0200, Grégory Vanuxem wrote: > Hello, > > 2017-05-21 21:27 GMT+02:00 Luis Mochan <[email protected]>: > > > > > > > Got it. I guess a short warning about column vs. row major for each > > routine would be adequate. An alternative would be to wrap the library > > routines with perl routines that perform the transpositions. As lapack > > expects that consecutive data along columns are adjacent, I guess the > > transpositions should be done first and then the data copied to the > > arrays that would actually be fed to lapack. This is what the [phys] > > flag in the signature does, right? > > > > Best regards, > > Luis > > > > This is exactly what I have done in PDL::LinearAlgebra. > I suggest you use it, transposition will be done automatically if necessary. > As said by Chris, Fortran use a column major ordering in contrary to C code. > > The two modules PDL::LinearAlgebra::Real and PDL::LinearAlgebra::Complex > should only be used for optimized code and the developer has to be aware of > these ordering differences. > > The description of this generic module : > > DESCRIPTION > > This module provides a convenient interface to PDL::LinearAlgebra::Real and > PDL::LinearAlgebra::Complex. Its primary purpose is educational. You have > to know that routines defined here are not optimized, particularly in term > of memory. Since Blas and Lapack use a column major ordering scheme some > routines here need to transpose matrices before calling fortran routines > and transpose back (see the documentation of each routine). If you need > optimized code use directly PDL::LinearAlgebra::Real and > PDL::LinearAlgebra::Complex. > > > Hope that helps > > -- > Greg -- o W. Luis Mochán, | tel:(52)(777)329-1734 /<(*) Instituto de Ciencias Físicas, UNAM | fax:(52)(777)317-5388 `>/ /\ Apdo. Postal 48-3, 62251 | (*)/\/ \ Cuernavaca, Morelos, México | [email protected] /\_/\__/ GPG: 791EB9EB, C949 3F81 6D9B 1191 9A16 C2DF 5F0A C52B 791E B9EB ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ pdl-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pdl-general
