TY - JOUR
T1 - Automatic inversion generates divide-and-conquer parallel programs
AU - Morita, Kazutaka
AU - Morihata, Akimasa
AU - Matsuzaki, Kiminori
AU - Hu, Zhenjiang
AU - Takeichi, Masato
PY - 2007/6
Y1 - 2007/6
N2 - Divide-and-conquer algorithms are suitable for modern parallel machines, tending to have large amounts of inherent parallelism and working well with caches and deep memory hierarchies. Among others, list homomorphisms are a class of recursive functions on lists, which match very well with the divide-and-conquer paradigm. However, direct programming with list homomorphisms is a challenge for many programmers. In this paper, we propose and implement a novel system that can automatically derive cost-optimal list homomorphisms from a pair of sequential programs, based on the third homomorphism theorem. Our idea is to reduce extraction of list homomorphisms to derivation of weak right inverses. We show that a weak right inverse always exists and can be automatically generated from a wide class of sequential programs. We demonstrate our system with several nontrivial examples, including the maximum prefix sum problem, the prefix sum computation, the maximum segment sum problem, and the line-of-sight problem. The experimental results show practical efficiency of our automatic parallelization algorithm and good speedups of the generated parallel programs.
AB - Divide-and-conquer algorithms are suitable for modern parallel machines, tending to have large amounts of inherent parallelism and working well with caches and deep memory hierarchies. Among others, list homomorphisms are a class of recursive functions on lists, which match very well with the divide-and-conquer paradigm. However, direct programming with list homomorphisms is a challenge for many programmers. In this paper, we propose and implement a novel system that can automatically derive cost-optimal list homomorphisms from a pair of sequential programs, based on the third homomorphism theorem. Our idea is to reduce extraction of list homomorphisms to derivation of weak right inverses. We show that a weak right inverse always exists and can be automatically generated from a wide class of sequential programs. We demonstrate our system with several nontrivial examples, including the maximum prefix sum problem, the prefix sum computation, the maximum segment sum problem, and the line-of-sight problem. The experimental results show practical efficiency of our automatic parallelization algorithm and good speedups of the generated parallel programs.
KW - Divide-and-conquer parallelism
KW - Inversion
KW - Program transformation
KW - Third homomorphism theorem
UR - http://www.scopus.com/inward/record.url?scp=67650089740&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=67650089740&partnerID=8YFLogxK
U2 - 10.1145/1273442.1250752
DO - 10.1145/1273442.1250752
M3 - Article
AN - SCOPUS:67650089740
VL - 42
SP - 146
EP - 155
JO - ACM SIGPLAN Notices
JF - ACM SIGPLAN Notices
SN - 1523-2867
IS - 6
ER -