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 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
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.
- Posts: 612
- Joined: Thu Jan 08, 2009 10:12 am
- Location: EPCC, University of Edinburgh
Return to Using OpenMP - The Book and Examples
Who is online
Users browsing this forum: No registered users and 1 guest