[Haskell-cafe] ANN: repa-linear-algebra = HMatrix + REPA

Marcin Mrotek marcin.jan.mrotek at gmail.com
Thu Jul 16 15:02:26 UTC 2015


Hello,

Given that apparently HMatrix uses the same underlying representation
as F arrays in REPA, I've wrote some utilities to convert to and from
these types, and ported HMatrix functions to work with REPA arrays.

http://hackage.haskell.org/package/repa-linear-algebra-0.0.0.0

All functions return F arrays. In general, unqualified functions take
F array(s), and the postfixed functions take D array(s), allocating
them before feeding to HMatrix:

* -S functions allocate sequentially (using computeS)
* -SIO functions allocate sequentially inside the IO monad (using computeIntoS)
* -P functions allocate in parallel (using computeP)
* -PIO functions allocate in parallel inside the IO monad (using computeIntoP)

Writing all that boilerplate was quite mind-numbing, so sorry if there
are any mistakes or inconsistencies (I wish this was a way to automate
it, but it's not always straightforwards, for example I've decided
that arguments that will be often supplied unchanged to multiple calls
(like the kernel of convolution) shouldn't be changed to take D arrays
in the preallocating functions).

Please have in mind that the module is HIGHLY experimental, as it does
just plain rude casts under the hood. Before you use it for anything
serious first check if it works as you expect it to.

Best regards,
Marcin Mrotek


More information about the Haskell-Cafe mailing list