We present a modern C++17-compatible thread pool implementation, built from scratch with high-performance scientific computing in mind. The thread pool is implemented as a single lightweight and self-contained class, and does not have any dependencies other than the C++17 standard library, thus allowing a great degree of portability. In particular, our implementation does not utilize OpenMP or any other high-level multithreading APIs, and thus gives the programmer precise low-level control over the details of the parallelization, which permits more robust optimizations. The thread pool was extensively tested on both AMD and Intel CPUs with up to 40 cores and 80 threads. This paper provides motivation, detailed usage instructions, and performance tests.


翻译:我们提出了一个现代化的C++17兼容的线条库实施,从零开始,以高性能科学计算为思想而构建。线条库作为单一的轻量级和自足级实施,除了C++17标准图书馆之外,没有任何其他依赖性,因此可以大量移动。特别是,我们的实施没有利用OpenMP或任何其他高级多读API,因此对平行的细节给予精确的低水平控制,从而可以进行更强有力的优化。 线条库在AMD和英特尔的CPU上进行了广泛的测试,有多达40个核心和80个线索。 本文提供了动机、详细的使用指示和性能测试。

0
下载
关闭预览

相关内容

【干货书】面向计算科学和工程的Python导论,167页pdf
专知会员服务
42+阅读 · 2021年4月7日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
Waveform Relaxation with asynchronous time-integration
VIP会员
相关VIP内容
【干货书】面向计算科学和工程的Python导论,167页pdf
专知会员服务
42+阅读 · 2021年4月7日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
94+阅读 · 2019年10月10日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
人工智能 | SCI期刊专刊信息3条
Call4Papers
5+阅读 · 2019年1月10日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
Top
微信扫码咨询专知VIP会员