title: Parallel prefix sum - fastest Implementation
body: <p>I want to implement the parallel prefix sum algorithm using C++. My program should take the input array <code>x[1....N]</code>,and it should display the output in the array <code>y[N]</code>. (Note the maximum value of N is 1000.)</p>
  
  <p>So far, I went through many research papers and even the algorithm in Wikipedia.
  But my program should also display the output, the steps and also the operations/instructions of each step.</p>
  
  <p>I want the fastest implementation like I want to minimise the number of operations as well as the steps.</p>
  
  <p>For example::</p>
  
  <pre><code>x = {1, 2, 3,  4,   5,   6,   7,  8 } - Input
  y = ( 1, 3, 6, 10, 15, 21, 28, 36) - Output
  </code></pre>
  
  <p>But along with displaying the y array as output, my program should also display the operations of each step. I also refer this thread <a href="https://stackoverflow.com/questions/4009596/calculate-prefix-sum">calculate prefix sum</a> ,but could get much help from it.</p>