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
------------------------------------------------------------------------------
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