05.04.2015 Views

BSP/CGM Algorithms - USP

BSP/CGM Algorithms - USP

BSP/CGM Algorithms - USP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>BSP</strong>/<strong>CGM</strong>: Prefix Sum Algorithm<br />

15/24<br />

Given a vector A of n elements A[0], . . . , A[n − 1],<br />

prefix sum computes the values:<br />

A[0]<br />

A[0] ⊕ A[1]<br />

A[0] ⊕ A[1] ⊕ A[2]<br />

.<br />

A[0] ⊕ . . . ⊕ A[n − 1]<br />

where ⊕ is a binary associative operation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!