arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2103.01216cs.DCcs.DScs.PF
收藏

并行就地算法:理论与实践

Parallel In-Place Algorithms: Theory and Practice

Yan Gu, Omar Obeya, Julian Shun

摘要:

许多并行算法在输入的大小上至少使用线性辅助空间,以使计算能够独立地进行而没有冲突。不幸的是,这种额外的空间对于内存有限的机器来说可能是禁止的,从而阻止处理大的输入。因此,需要设计使用次线性(或甚至多对数)辅助空间的并行就地算法。在本文中,我们弥合了理论和实践之间的差距,并行就地(PIP)算法。我们首先定义了两个计算模型的基础上fork-join并行,这反映了现代并行编程环境。然后,我们介绍了各种新的并行就地算法,是简单而有效的,在理论和实践中。我们的算法亮点是本文介绍的可分解属性,它使现有的非就地,但高度优化的并行算法转换为并行就地算法。利用这一性质,我们得到的算法随机置换,列表收缩,树收缩,合并,采取线性工作,$O(n^{1-ε})$辅助空间,和$O(n^ε\cdot\text{polylog}(n))$跨度为$0<ε<1$。我们还提出了新的并行就地算法的扫描,过滤器,合并,连接,双连通性,和最小生成森林使用其他技术。除了理论结果,我们提出了许多我们的并行就地算法的实现的实验结果。我们表明,在一个72核的机器上,双向超线程,并行就地算法通常优于现有的并行算法,使用线性辅助空间的相同的问题,表明本文开发的理论确实导致实际的好处,在空间使用和运行时间。

英文摘要:

Many parallel algorithms use at least linear auxiliary space in the size of the input to enable computations to be done independently without conflicts. Unfortunately, this extra space can be prohibitive for memory-limited machines, preventing large inputs from being processed. Therefore, it is desirable to design parallel in-place algorithms that use sublinear (or even polylogarithmic) auxiliary space. In this paper, we bridge the gap between theory and practice for parallel in-place (PIP) algorithms. We first define two computational models based on fork-join parallelism, which reflect modern parallel programming environments. We then introduce a variety of new parallel in-place algorithms that are simple and efficient, both in theory and in practice. Our algorithmic highlight is the Decomposable Property introduced in this paper, which enables existing non-in-place but highly-optimized parallel algorithms to be converted into parallel in-place algorithms. Using this property, we obtain algorithms for random permutation, list contraction, tree contraction, and merging that take linear work, $O(n^{1-ε})$ auxiliary space, and $O(n^ε\cdot\text{polylog}(n))$ span for $0<ε<1$. We also present new parallel in-place algorithms for scan, filter, merge, connectivity, biconnectivity, and minimum spanning forest using other techniques. In addition to theoretical results, we present experimental results for implementations of many of our parallel in-place algorithms. We show that on a 72-core machine with two-way hyper-threading, the parallel in-place algorithms usually outperform existing parallel algorithms for the same problems that use linear auxiliary space, indicating that the theory developed in this paper indeed leads to practical benefits in terms of both space usage and running time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑