arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.07191cs.DC
收藏

现代C++与HPX中的共享内存并行编程

Shared memory parallelism in Modern C++ and HPX

Patrick Diehl, Steven R. Brandt, Hartmut Kaiser

AI总结:

本文概述了现代C++标准中用于单节点共享内存并行编程的语言与库特性,并介绍了HPX库如何提前实现这些标准及扩展,使开发者无需自定义扩展即可编写高性能并行代码。

摘要:

并行编程仍然是一项艰巨的挑战,从在不扰乱底层同步逻辑的情况下表达并行算法的困难,到描述在计算中采用哪些设备,再到正确性问题。多年来,出现了众多解决方案,其中许多需要新的编程语言、对编程语言的扩展,或添加编译指示(pragmas)。对这些各种工具和扩展的支持程度各不相同。近年来,C++标准委员会一直致力于完善在单个计算节点上支持并行编程所需的语言特性和库。最终,所有主要供应商和编译器都将提供这些标准的健壮且高性能的实现。在此之前,HPX库和运行时提供了这些标准的前沿实现,以及拟议中的标准和扩展。由于这些进展,现在可以在不依赖C++自定义扩展的情况下编写高性能并行代码。我们概述了现代C++中的并行编程,描述了语言和库特性,并提供了如何使用它们的简要示例。

英文摘要:

Parallel programming remains a daunting challenge, from the struggle to express a parallel algorithm without cluttering the underlying synchronous logic, to describing which devices to employ in a calculation, to correctness. Over the years, numerous solutions have arisen, many of them requiring new programming languages, extensions to programming languages, or the addition of pragmas. Support for these various tools and extensions is available to a varying degree. In recent years, the C++ standards committee has worked to refine the language features and libraries needed to support parallel programming on a single computational node. Eventually, all major vendors and compilers will provide robust and performant implementations of these standards. Until then, the HPX library and runtime provides cutting edge implementations of the standards, as well as proposed standards and extensions. Because of these advances, it is now possible to write high performance parallel code without custom extensions to C++. We provide an overview of modern parallel programming in C++, describing the language and library features, and providing brief examples of how to use them.

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

↑