Home // ICCGI 2014, The Ninth International Multi-Conference on Computing in the Global Information Technology // View article
A Comparative Analysis of Parallel Programming Models for C++
Authors:
Arno Leist
Andrew Gilman
Keywords: parallel programming models; performance; TBB; Cilk Plus; OpenMP 4.0
Abstract:
The parallel programming model used in a software development project can significantly affect the way concurrency is expressed in the code. It also comes with certain trade-offs with regard to ease of development, code readability, functionality, runtime overheads, and scalability. Especially the performance aspects can vary with the type of parallelism suited to the problem at hand. We investigate how well three popular multi-tasking frameworks for C++ -- Threading Building Blocks, Cilk Plus, and OpenMP 4.0 -- cope with three of the most common parallel scenarios: recursive divide-and-conquer algorithms; embarrassingly parallel loops; and loops that update shared variables. We implement merge sort, matrix multiplication, and dot product as test cases for the respective scenario in each of the programming models. We then go one step further and also apply the vectorisation support offered by Cilk Plus and OpenMP 4.0 to the data-parallel aspects of the loop-based algorithms. Our results demonstrate that certain configurations expose significant differences in the task creation and scheduling overheads among the tested frameworks. We also highlight the importance of testing how well an algorithm scales with the number of hardware threads available to the application.
Pages: 121 to 127
Copyright: Copyright (c) IARIA, 2014
Publication date: June 22, 2014
Published in: conference
ISSN: 2308-4529
ISBN: 978-1-61208-346-9
Location: Seville, Spain
Dates: from June 22, 2014 to June 26, 2014