On Sun, 2011-03-06 at 09:33 -0500, dsimcha wrote:
> 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.

OK, I signed up to the issue, but there seems no way of voting for it to
try and raise its chance of being fixed.

Despite my personal dislike of this use of string to write functions, I
can live with it in this case, so I am not worried about a workaround in
std.parallelism -- though a DMD fix would be good.

Thanks.

> 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.
> >
> 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to