INNER CODE UNIT · Python
y1
lschoe/mpyc · demos/PrefixOrExplained.py:228
y1 = prefix_or3(x[n//2:])
a = y0[-1]
return y0 + [a | b for b in y1] # all |s in parallel in 1 round
# In[15]:
correctness(prefix_or3)
complexity(prefix_or3, 8)
# The actual implementation in `mpyc.mpctools.accumulate()` is slightly more advanced, as we want to avoid excessive copying of lists.
# In[16]:
def prefix_or4(x):