http://d.puremagic.com/issues/show_bug.cgi?id=5710

It's a DMD issue. I've been meaning to report it for a while. Unfortunately making a workaround for it would be a huge PITA at best and impossible in the toughest use cases.

On 3/6/2011 9:12 AM, Russel Winder wrote:
David,

I am not sure how properly to report this in this review period . . .

If I use:

        taskPool.reduce ! ( "a + b" ) ( 0.0 , outputData )

then it works.  If however I try:

         taskPool.reduce ! ( ( a , b ) { return a + b ; } ) ( 0.0 , outputData )

I get:

         pi_d2_parallelMap.d(58): Error: template instance cannot use local 
'__dgliteral1(__T2,__T3)' as parameter to non-global template 
reduce(functions...)

which doesn't really work for me :-((

If I try

        taskPool.reduce ! ( function double ( double a , double b ) { return a 
+ b ; } ) ( 0.0 , outputData )

then I get:

         pi_d2_parallelMap.d(59): Error: function 
std.parallelism.__funcliteral1 cannot access frame of function 
pi_d2_parallelMap.execute.__funcliteral1
         pi_d2_parallelMap.d(59): Error: function 
std.parallelism.__funcliteral1 cannot access frame of function 
pi_d2_parallelMap.execute.__funcliteral1

which is just the error I get with the sequential map and so a compiler
problem, I just added it for completeness.

Thanks.


Reply via email to