Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C++

Christopher Brown (Lead / Corresponding author), Vladimir Janjic, Adam D. Barwell, J. Daniel Garcia, Kenneth MacKenzie

Research output: Contribution to journalArticlepeer-review

4 Citations (Scopus)
95 Downloads (Pure)

Abstract

The Generic Reusable Parallel Pattern Interface (GrPPI) is a very useful abstraction over different parallel pattern libraries, allowing the programmer to write generic patterned parallel code that can easily be compiled to different backends such as FastFlow, OpenMP, Intel TBB and C++ threads. However, rewriting legacy code to use GrPPI still involves code transformations that can be highly non-trivial, especially for programmers who are not experts in parallelism. This paper describes software refactorings to semi-automatically introduce instances of GrPPI patterns into sequential C++ code, as well as safety checking static analysis mechanisms which verify that introducing patterns into the code does not introduce concurrency-related bugs such as race conditions. We demonstrate the refactorings and safety-checking mechanisms on four simple benchmark applications, showing that we are able to obtain, with little effort, GrPPI-based parallel versions that accomplish good speedups (comparable to those of manually-produced parallel versions) using different pattern backends.

Original languageEnglish
Pages (from-to)603-625
Number of pages23
JournalInternational Journal of Parallel Programming
Volume48
Early online date10 Jul 2020
DOIs
Publication statusPublished - 1 Aug 2020

Keywords

  • C++
  • C++ threads
  • GrPPI
  • Parallel patterns
  • Parallelism
  • Refactoring
  • TBB

ASJC Scopus subject areas

  • Software
  • Theoretical Computer Science
  • Information Systems

Fingerprint

Dive into the research topics of 'Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C++'. Together they form a unique fingerprint.

Cite this