[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    [Haskell-cafe] How to translate Repa 2 program to efficient Repa 3 code?
From:       Michael Serra <mk.serra () gmail ! com>
Date:       2012-05-26 22:58:17
Message-ID: CADN_yYTQoru93mD8Gd-EtR4fWYA2D9_aYuy3DTbd9kjm4zN2NQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Haskellers,
I've posted this question (and my code) to stack overflow as well (
http://stackoverflow.com/questions/10747079/what-are-the-key-differences-between-the-repa-2-and-3-apis),
so if anyone here has the answer, I'll post it to that site for the world's
reference.  Using the Repa 2 API, I have written some simple image
convolution tests which run more than fast enough.  The trick to getting
good performance was to call 'force' after every array transformation.  I
can't quite figure out the analogous thing to do with Repa 3 - at
stackoverflow you can see my Repa 3 code, which runs correctly but very
slowly.  It is not clear to me how exactly the monadic "computeP" functions
in Repa 3 are intended to be used - I have several calls to 'force' in my
Repa 2 code, but only 1 call to computeP in the Repa 3 version.  I've read
the excellent "Numeric Haskell" Repa tutorial by Don S, but it doesn't
cover Repa 3.  My apologies if this message appears twice; it didn't seem
to be sent the first time.

[Attachment #5 (text/html)]

<div class="gmail_quote"><div>Hi Haskellers,</div><div>I&#39;ve posted this question \
(and my code) to stack overflow as well (<a \
href="http://stackoverflow.com/questions/10747079/what-are-the-key-differences-between-the-repa-2-and-3-apis" \
target="_blank">http://stackoverflow.com/questions/10747079/what-are-the-key-differences-between-the-repa-2-and-3-apis</a>), \
so if anyone here has the answer, I&#39;ll post it to that site for the world&#39;s \
reference.  Using the Repa 2 API, I have written some simple image convolution tests \
which run more than fast enough.  The trick to getting good performance was to call \
&#39;force&#39; after every array transformation.  I can&#39;t quite figure out the \
analogous thing to do with Repa 3 - at stackoverflow you can see my Repa 3 code, \
which runs correctly but very slowly.  It is not clear to me how exactly the monadic \
&quot;computeP&quot; functions in Repa 3 are intended to be used - I have several \
calls to &#39;force&#39; in my Repa 2 code, but only 1 call to computeP in the Repa 3 \
version.  I&#39;ve read the excellent &quot;Numeric Haskell&quot; Repa tutorial by \
Don S, but it doesn&#39;t cover Repa 3.  My apologies if this message appears twice; \
it didn&#39;t seem to be sent the first time.</div>

</div><br>



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic