title: CUDA reduction using thrust inside kernel
body: <p>I want to do parallel reduction, but inside my kernel with data in shared memory. Is this possible with thrust library ?
  Something like </p>
  
  <pre><code>int sum = thrust::reduce(myIntArray, myIntArray+numberOfItems, (int) 0, thrust::max_element&lt;int&gt;());
  </code></pre>
  
  <p>But this doesn't work inside kernel. Is it possible? Thank you.</p>