lapack-comfort-array: Auto-generated interface to Fortran LAPACK via comfort-array
LAPACK is a package for efficient numerically robust linear algebra. The original implementation is written in FORTRAN. This is a semi-automatically generated mid-level wrapper. The functions are not ready to use for high-level applications, but they are a step closer.
The functions are all in IO monad because they are auto-generated and
we cannot make sure automatically that unsafePerformIO is always safe.
Instead of raw pointers we use Arrays and Mutable.Arrays
and assign and check array bounds to LAPACK function parameters,
as far we can retrieve this information from the FORTRAN comments.
We check consistency of dimensions where consistent dimensions are required,
but we cannot do all kind of bound checks.
We use immutable Array for input and output parameters
and mutable Mutable.Array for input/output parameters.
LAPACK plays some nasty tricks of in-place array updates
on input/output arrays
even if the dimensions of input and output array differ (see e.g. GELS).
The wrappers also manage allocation of memory for function parameters.
This is necessary since FORTRAN passes all parameters by reference.
Further on, the wrappers convert from Haskell values like Int
to low-level values like CInt
.
We provide bindings to functions of all variants
for Float
, Double
, Complex Float
and Complex Double
.
We do not use TemplateHaskell nor HSC nor CHS, but instead Haskell 98 code
generated by the custom lapack-ffi-tools
package.
Downloads
- lapack-comfort-array-0.0.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
Versions [RSS] | 0.0, 0.0.0.1, 0.0.0.2, 0.0.1 |
---|---|
Dependencies | base (>=4.5 && <5), comfort-array (>=0.3 && <0.6), lapack-ffi (>=0.0 && <0.1), netlib-comfort-array (>=0.0 && <0.1), netlib-ffi (>=0.0 && <0.2), storable-complex (>=0.2.2 && <0.3), transformers (>=0.4 && <0.7) [details] |
Tested with | ghc ==7.4.2, ghc ==7.8.4 |
License | BSD-3-Clause |
Author | Henning Thielemann <haskell@henning-thielemann.de> |
Maintainer | Henning Thielemann <haskell@henning-thielemann.de> |
Revised | Revision 1 made by HenningThielemann at 2023-02-16T11:03:22Z |
Category | Math |
Home page | https://hub.darcs.net/thielema/lapack-comfort-array/ |
Source repo | this: darcs get https://hub.darcs.net/thielema/lapack-comfort-array/ --tag 0.0.1 head: darcs get https://hub.darcs.net/thielema/lapack-comfort-array/ |
Uploaded | by HenningThielemann at 2021-08-06T08:25:07Z |
Distributions | LTSHaskell:0.0.1, NixOS:0.0.1, Stackage:0.0.1 |
Downloads | 1461 total (19 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs available [build log] Last success reported on 2021-08-06 [all 1 reports] |