[Haskell-cafe] vector-simd: some code available, and some questions

Nicolas Trangez nicolas at incubaid.com
Sun Jul 8 15:43:01 CEST 2012

On Sun, 2012-07-08 at 20:49 +1000, Reiner Pope wrote:
> I've not been following this thread very closely, but it seems like
> what you're trying to do may be related to Geoffrey Mainland's work on
> SIMD support in GHC. See [1] for his "SIMD-enabled version of the
> vector library". He's also written some blog posts about this [2].

Thanks. I knew about this before (did at least some research ;-)), yet I
think the scope is somewhat different (assuming my playground work has
any scope at all...).

I think Geoffreys work goes much further than what I'm trying to
accomplish: it's not my intention to write SIMD-based code at a high
level (which is, obviously, a great thing, but beyond my capabilities as
of now I'm afraid). What I'd like to achieve is to be able to write SIMD
code at the C level (or have SIMD code generated somehow through
LLVM/Clang(/Poly?), ISPC or others), and call into this from Haskell,
providing some guarantees w.r.t. alignment (and maybe length-in-bytes as
well?) of the passed vector pointers (which you don't get when using
plain Storable vectors as far as I could find/see).

Consider it a very short-term stop-gap solution until the tools are in
place to write high-level code which yields the same performance as a
more low-level (assembly-level) implementation.


More information about the Haskell-Cafe mailing list