
On Jun 10, 2005, at 6:33 AM, Keean Schupke wrote:
[Making Matrices work in Haskell]...
I seems easier to use FFI and LAPACK for the more complex matrix operations...
And it'll be tough to impossible to match, say, FFTW and Atlas in Haskell. FFTW at least uses the C compiler like an assembler.
anyone know how to marshall data for Fortran?
Find something with a C interface and use that. Most LAPACK and BLAS libraries should have a C binding. My understanding is that Fortran dope vector formats are not standard, though the latest versions of the Fortran standard aim to fix that non-portability problem. -Jan-Willem Maessen
Keean.
PS - I had the following code kicking around, written with the hope of specializing the Matrices for maximal unboxing (thus the use of constructors with explicit type signatures, which may not be strictly necessary anymore). Is this useful to anyone? No FFI here, it's all just Haskell code, but using an FFI binding instead wouldn't be hard. I'd been hoping to push more towards specialized matrix representations (sparse, banded, upper/lower triangular), to see how ugly the code would get. And of course there should be "solve" and "decompose" routines of various sorts.