Use this forum to discuss the book: Using OpenMP - Portable Shared Memory Parallel Programming, by Barbara Chapman, Gabriele Jost and Ruud van der Pas Read the http://openmp.org/forum/viewtopic.php?f=8&t=465
for book info and to download the examples. Post your feedback about the book and examples to this forum
I recently learnt that OpenMP doesn't support array reduction (correct me if I'm wrong.). How can I implement segmented scan instead for
the array using OpenMP, I'm sorry I couldn't find much literature on segmented scan.
Thank in advance
- Posts: 808
- Joined: Thu Jan 08, 2009 10:12 am
- Location: EPCC, University of Edinburgh
OpenMP only supports array reductions in Fortran.
There is some discussion about segmented scan algorithms here which might help: http://ocw.mit.edu/courses/mathematics/ ... pter_3.pdf
If you have enough segments such that load balancing is not a problem, then using a parallel loop over segments with a suitable schedule clause might work OK.