Problem with parallel map

Russel Winder russel at russel.org.uk
Sun Mar 6 06:12:59 PST 2011


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:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20110306/06a75855/attachment.pgp>


More information about the Digitalmars-d mailing list