Open MP

Ingo Oeser ioe-news at rameria.de
Tue Aug 28 12:23:24 PDT 2007


Sean Kelly wrote:
> Ingo Oeser wrote:
>> I think an even better one would be discovery and marking
>> of const functions/bodies. These can be automatically parellelized.
> D 2.0 will have a feature for this.

Yes, I was instantly in love with that one :-)

>> Another idea would be that we have a new kind of iteration called map(),
>> which maps a sequence or number of sequences to a new one
>> and is defined as seeing each element from the sequence(s) only once
>> in undefined order.
>> 
>> Then add the reduce() iteration, which gets a (sub)sequence and reduces
>> it to a scalar. The order is also undefined here.
>> 
>> The third nice addition would be filter(), which checks every item
>> of a sequence against a predicate and returns all items, where the
>> predicate is true.
>> 
>> Python (and other languages) have these nice opportunities for
>> parallelization.
> 
> Interesting.  I'll have to look at the Python design and see what comes
> of it.  Though someone posted a map/reduce impl recently as well, if I
> remember correctly.

Yes, that lets me express algorithms in these idioms meanwhile.
 
> If you have specific suggestions for how this may be implemented, please
> post them here or as an enhancement request for Tango.

Ok, I've put that on my TODO list.


Best Regards

Ingo Oeser



More information about the Digitalmars-d mailing list