Doany: Not Just Another Parallel Loop

Two types of parallel loops suggested in the literature are DOALL, which describes a totally parallel loop (no dependence between iterations), and DOACROSS, which supports parallelism in loops with dependences between iterations by “delaying” execution of subsequent iterations. Limiting ourselves to the classical parallel loops essentially restricts us to parallel algorithms which correspond to simply-parallelized sequential algorithms, which inhibits any compiler restructuring that might vary from the sequential semantics. We propose a new parallel loop type, which we call a DOANY loop, and show by example how it is useful for specifying and restructuring parallel algorithms.