Difference between Repa and DPH
Asked Answered
B

1

7

I recently read the paper on upcoming generalized stream fusion in vector and DPH libraries. It seems to be very interesting development. I am now starting to experiment with DPH (starting with GHC 7.6, and plan to upgrade to 7.8 SIMD version when it comes out). I also see from Repa library documentation that it can do the parallel array work. Repa seems to be the mature version compared to DPH which wasn't deemed ready as of GHC 7.4. Now that DPH seems to be maturing, I am wondering what are the main pros and cons between Repa and DPH packages, as of GHC 7.6. I searched StackOverflow and google, but couldn't find comparisons between Repa and DPH. Hence, this question.

Busty answered 9/3, 2013 at 19:5 Comment(1)
@leventov: That's a correct answer. You should probably move it to an actual answer so the question can be marked as answered.Arleyne
M
5

From the page about DPH on HaskellWiki:

DPH focuses on irregular data parallelism. For regular data parallel code in Haskell, please consider using the companion library Repa, which builds on the parallel array infrastructure of DPH.

Message answered 10/3, 2013 at 10:41 Comment(2)
so no other major differences between Repa and DPH other than that? For example, what about generalized stream fusion and simd instructions - will they be available in Repa as well? The paper focussed on Vector and DPH, with no mention of Repa (except briefly in introduction). That is why I thought Repa might be on the way to be replaced by DPH, and started thinking about differences that would prevent that.Busty
@sal according to Ben Lippmeier, stream fusion is on the way in Repa 4 (link). SIMD instructions support is not a library but compiler concern. As far as I understand situation, in some time it will be sufficient to obey some conditions and provide GHC compilation flags to obtain vectorized machine code from the plain Haskell. Libraries like vector, repa, dph will just follow these rules.Message

© 2022 - 2024 — McMap. All rights reserved.