INNER CODE UNIT · Python
a
lschoe/mpyc · demos/PrefixOrExplained.py:229
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):
def pf(i, j):