
128 CHAPTER 3 Programming for Performance
Raytrace application, for a data set consisting of number of balls arranged like a
bunch of grapes, measured on the Origin2000.
A simple example of dynamic tasking in a shared address space is self-scheduling
of a parallel loop. The loop counter is a shared variable accessed by all the processes
that execute iterations of the loop. Processes obtain a loop iteration by incrementing
the counter atomically; they repeatedly execute an iteration and access the counter
again until no iterations remain. The task size can be increased by taking multiple
iterations at a time, that is, adding a value larger tha ...