INNER CODE UNIT · Python
b0
lschoe/mpyc · demos/PrefixOrExplained.py:318
y0, b0 = pf(a, x[:n//2])
y1, b1 = pf(a | b0, x[n//2:])
return y0 + y1, b0 | b1
return pf(0, x)[0]
# The auxiliary input for the second half becomes `a | b0`, to include the or `b0` over the first half.
# In[21]:
correctness(prefix_or6)
complexity(prefix_or6, 1)
complexity(prefix_or6, 2)
complexity(prefix_or6, 4)
complexity(prefix_or6, 8)
complexity(prefix_or6, 16)