next up previous
Next: Up: Previous:

Prefix Computation

Given the binary, associative operator $\otimes$ and x1 .. xk, compute \(y_k \;=\; x_1 \otimes x_2 \otimes .. \otimes x_k\).

Let
$\;\;\;\;\;$[i,j] = \(x_i \otimes .. \otimes x_j\),
$\;\;\;\;\;$[i,k] = [i,j] $\otimes$ [j+1,k], and
$\;\;\;\;\;$[i,i] = xi.

We can use pointer jumping to change [i,i] to [1,i].


next up previous
Next: Up: Previous: