Reducer interface

Neal Gafter neal at gafter.com
Sat Sep 17 16:43:22 PDT 2011


The operation this library calls "reduce" is more properly named "left fold"
and, unless you can exploit algebraic properties of the function, is
inherently sequential.

When the element and output types are the same, and the function is known to
be associative, you can use "parallel prefix" to compute the result in O(log
n) time using O(n/log n) processors.

On Sat, Sep 17, 2011 at 2:54 PM, Kasper Nielsen <kasperni at gmail.com> wrote:

> Hi,
>
> Can somebody explain to me how the Reducer interface works in a parallel
> setting?
> I'm using something like E reduce(E a, E b) myself.
> And I fail to understand how you can use two different parameter types
> unless you force all usage to be serial (non-parallel) application of
> elements.
>
> cheers
>    Kasper
>
>


More information about the lambda-dev mailing list