Parallel Haskell: 2-year project to push real world use
Christian Höner zu Siederdissen
choener at tbi.univie.ac.at
Mon May 3 19:28:42 EDT 2010
Sorry, to make it more clear:
in the line:
> write a (a'!(i-1) + a!(i-2))
only
> (a'!(i-1) + a!(i-2))
would need to be parallel, as there we typically have a sum/minimum or
whatever. The forM_ over each index does not need to be, since we have
to fill the array anyway...
* Christian Höner zu Siederdissen <choener at tbi.univie.ac.at> [04.05.2010 01:22]:
> Hi,
>
> on that topic, consider this (rather trivial) array:
>
> a = array (1,10) [ (i,f i) | i <-[1..10]] where
> f 1 = 1
> f 2 = 1
> f i = a!(i-1) + a!(i-2)
>
> (aah, school ;)
>
> Right now, I am abusing vector in ST by doing this:
>
> a <- new
> a' <- freeze a
> forM_ [3..10] $ \i -> do
> write a (a'!(i-1) + a!(i-2))
>
> Let's say I wanted to do something like this in dph (or repa), does that
> work? We are actually using this for RNA folding algorithms that are at
> least O(n^3) time. For some of the more advanced stuff, it would be
> really nice if we could "just" parallelize.
>
> To summarise: I need arrays that allow in-place updates.
>
> Otherwise, most libraries that do heavy stuff (O(n^3) or worse) are
> using vector right now. On a single core, it performs really great --
> even compared to C-code that has been optimized a lot.
>
> Thanks and "Viele Gruesse",
> Christian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20100503/b0f4b700/attachment.bin
More information about the Glasgow-haskell-users
mailing list