Content area

Abstract

Programming many-core systems with accelerators (e.g., GPUs) remains a challenging task, even for expert programmers. In the current, low-level approaches—OpenCL and CUDA—two distinct programming models are employed: the host code for the CPU is written in C/C++ with a restricted memory model, while the device code for the accelerator is written using a device-dependent model of CUDA or OpenCL. The programmer is responsible for explicitly specifying parallelism, memory transfers, and synchronization, and also for configuring the program and optimizing its performance for a particular many-core system. This leads to long, poorly structured and error-prone codes, often with a suboptimal performance. We present PACXX—an alternative, unified programming approach for accelerators. In PACXX, both host and device programs are written in the same programming language—the newest C++14 standard with the Standard Template Library (STL), including all modern features: type inference (auto), variadic templates, generic lambda expressions, and the newly proposed parallel extensions of the STL. PACXX includes an easy-to-use and type-safe API for multi-stage programming which allows for aggressive runtime compiler optimizations. We implement PACXX by developing a custom compiler (based on the Clang and LLVM frameworks) and a runtime system, that together perform memory management and synchronization automatically and transparently for the programmer. We evaluate our approach by comparing it to OpenCL regarding program size and target performance.

Details

10000008
Title
High-Level Programming for Many-Cores Using C++14 and the STL
Author
Haidl, Michael 1   VIAFID ORCID Logo  ; Gorlatch, Sergei 1 

 Department of Computer Science, University of Muenster, Münster, Germany 
Volume
46
Issue
1
Source details
Special Issue on High-Level Parallel Programming with Algorithmic Skeletons
Pages
23-41
Publication year
2018
Publication date
Feb 2018
Publisher
Springer Nature B.V.
Place of publication
New York
Country of publication
Netherlands
Publication subject
ISSN
08857458
e-ISSN
15737640
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
ProQuest document ID
1983623547
Document URL
https://www.proquest.com/scholarly-journals/high-level-programming-many-cores-using-c-14-stl/docview/1983623547/se-2?accountid=208611
Copyright
International Journal of Parallel Programming is a copyright of Springer, (2017). All Rights Reserved.
Last updated
2024-12-12
Database
ProQuest One Academic