mchakravarty/accelerate — Issue #31: Conversion to/from Data.Vector of some flavor
Author: acfoltzer
Created: 2012-03-01 05:17:53+00:00
State: open

**Feature request**: fast, safe conversion to and from some instance of [`Data.Vector.Generic`](http://hackage.haskell.org/packages/archive/vector/0.9.1/doc/html/Data-Vector-Generic.html)

I whipped up a [prototype](https://gist.github.com/1947445) of conversions between `Array DIM1 e` and `Storable` vector variant, as that exports a raw pointer interface.

I'm unsure about the safety of the "unsafe" versions, not being too familiar with the Accelerate array data model, and would like feedback on whether they're actually safe to use in pure code. However, both of the QC roundtrip properties Work On My Machine™.

If the Accelerate.IO modules are not the preferred way to add such functionality, l'd be open to suggestions. Also, I imagine there is a way to do row-major conversions with arbitrary shapes other than `DIM1`, but I figured I'd get the simple case working first.