haskell-numerics / hmatrix

Linear algebra and numerical computation
381 stars 104 forks source link

Circshift #248

Open MagBad opened 6 years ago

MagBad commented 6 years ago

Hello,

I'm currently wondering about a missing matrix util from Fortran, see https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gfortran/CSHIFT.html. Would'd it be possible to add this functionality?

Best regards Magnus

idontgetoutmuch commented 6 years ago

hmatrix is a binding to lapack / blas. CSHIFT is an intrinsic procedure in GNU Fortran. I didn't see such an equivalent function in LAPACK or BLAS. Potentially it could be coded up as a "helper" in C somehow and exposed via Haskell. A PR would the best way for us to see if hmatrix is the appropriate place to add this functionality.

MagBad commented 6 years ago

It should be possible to call Fortran from C, similar to https://stackoverflow.com/questions/8207997/calling-a-fortran-subroutine-from-c. I'll try something!