Passing arrays between Haskell and C without overhead
Bulat Ziganshin
bulat.ziganshin at gmail.com
Sun Nov 26 13:46:41 EST 2006
Hello Brian,
Sunday, November 26, 2006, 5:34:51 PM, you wrote:
> For a 3d graphics library, I'd like to have a 4x4 matrix of floats which I
> can pass from Haskell to C without having to copy all 16 floats each time,
> something like:
http://haskell.org/haskellwiki/Modern_array_libraries
you should use StorableArray. also, i suggest you to use ghc 6.6
because it has much faster foreign ptrs implementation. you may also
consider using my ArrayRef lib, although from that you said i don't
see that you will get any advantages from this
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Glasgow-haskell-users
mailing list