Open MP
Sean Kelly
sean at f4.ca
Sun Aug 26 10:53:13 PDT 2007
Ingo Oeser wrote:
> Sean Kelly wrote:
>
> [Open MP, parallel foreach/loops]
>
> 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.
> 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.
If you have specific suggestions for how this may be implemented, please
post them here or as an enhancement request for Tango.
Sean
More information about the Digitalmars-d
mailing list