[Haskell-cafe] Making new Unboxed Algebraic Types? (A Repa Problem)
Hans Georg Schaathun
georg+haskell at schaathun.net
Mon Jun 30 20:43:07 UTC 2014
On Mon, Jun 30, 2014 at 03:53:55PM -0400, Carter Schonwald wrote:
> boxity has nothing to do with parallelism. none :)
No, but it may affect /when/ haskell computes a value, and
if the computation is delayed until the value is requested,
then --hey-- we just missed the parallel opportunity.
Quite simply, Repa's computeP does not work as expected out of the
box when it is applied to a boxed return type.
If that amounts to «nothing to do with» in your book, that's ok;
it is still a problem which requires a solution.
BTW, I thought a bit more and the solution using NFData suggested in
http://stackoverflow.com/questions/16097418/parallel-repa-code-doesnt-create-sparks
was easier to implement than I feared, and more importantly, it
works. I don't find it entirely satisfactory though, so any hints on
how to use unboxed arrays with composite constituent types are still
very welcome.
--
:-- Hans Georg
More information about the Haskell-Cafe
mailing list