Pierre-Etienne Meunier wrote:
>
> This is mostly a question for Roman : how do you use your vector library
> with multi-dimensional arrays ? I mean, the array library from the
> standard libraries does something more intelligent than the C-like
> solution with indirections.

Vector doesn't include any support for multidimensional arrays. This is by
design as the library has exactly one purpose: to provide a fast
implementation of contiguous, one-dimensional arrays. As you point out, it
is well possible to build multidimensional arrays on top of it but that
would be a separate library. You might want to take a look at Repa
(http://hackage.haskell.org/package/repa) which does exactly that (it sits
on top of DPH which sits on top of vector). It also gives you parallelism.

FWIW, I don't think we've nailed the "right" API for multidimensional
arrays yet. It's a hard problem. But we are getting there.

Roman




_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to