start | find | index | login or register | edit
by earl, 5116 days ago
Today, two sets of slides on parallelism definitely worth your time. First up, Guy Steele's "Organizing Functional Code for Parallel Execution", given at ICFP09:

"Don't split a problem into 'the first' and 'the rest.' Instead, split a problem into roughly equal pieces; recursively solve subproblems, then combine subsolutions."

And then, Guy Blelloch's "Parallel Thinking" from PPoPP09:

def interleave(xs, ys):
for x, y in zip(xs, ys):
yield x
yield y

def scan(f, xs):
if len(xs) < 2:
return [0]
sums = [f(xs[2*i], xs[2*i+1]) for i in range(len(xs)/2)]
evens = scan(f, sums)
odds = [f(evens[i], xs[2*i]) for i in range(len(xs)/2)]
return interleave(evens, odds)

# (transliterated from NESL into Python)

Quintessentially: think trees!
powered by vanilla
echo earlZstrainYat|tr ZY @. • esa3 • online for 8316 days • c'est un vanilla site