Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C plus

被引:3
|
作者
Brown, Christopher [1 ]
Janjic, Vladimir [2 ]
Barwell, Adam D. [1 ]
Garcia, J. Daniel [3 ]
MacKenzie, Kenneth [4 ]
机构
[1] Univ St Andrews, Sch Comp Sci, St Andrews, Fife, Scotland
[2] Univ Dundee, Sch Sci & Engn, Dundee, Scotland
[3] Univ Carlos III Madrid, Leganes, Spain
[4] IOHK, Hong Kong, Peoples R China
基金
英国工程与自然科学研究理事会;
关键词
Refactoring; Parallelism; Parallel patterns; TBB; C plus plus; GrPPI; C plus plus threads; SYSTEM;
D O I
10.1007/s10766-020-00667-x
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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 describessoftware refactoringsto semi-automatically introduce instances of GrPPI patterns into sequential C++ code, as well assafety checkingstatic 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.
引用
收藏
页码:603 / 625
页数:23
相关论文
共 50 条
  • [31] Parallelism refactoring algorithm of semantic workflows based on data produce-consume dependency
    Sun J.
    Wen L.
    Kuang Z.
    Li T.
    Zhang Z.
    Jisuanji Jicheng Zhizao Xitong/Computer Integrated Manufacturing Systems, CIMS, 2020, 26 (06): : 1636 - 1650
  • [32] Multi-Target Vectorization with MTPS C plus plus Generic Library
    Kirschenmann, Wilfried
    Plagne, Laurent
    Vialle, Stephane
    APPLIED PARALLEL AND SCIENTIFIC COMPUTING, PT II, 2012, 7134 : 336 - 346
  • [33] C plus plus and generic programming for rapid development of Monte Carlo simulations
    Brown, G
    Lee, HK
    Schulthess, TC
    COMPUTER SIMULATION STUDIES IN CONDENSED-MATTER PHYSICS XVI, 2006, 103 : 157 - +
  • [34] SimpleConcepts: A Lightweight Extension to C plus plus to Support Constraints on Generic Types
    Milewicz, Reed
    Mernik, Marjan
    Pirkelbauer, Peter
    COMPUTER SCIENCE AND INFORMATION SYSTEMS, 2014, 11 (04) : 1361 - 1379
  • [35] A Comparison of Generic Template Support: Ada, C plus plus , C#, and Java']Java™
    Brosgol, Benjamin M.
    RELIABLE SOFTWARE TECHNOLOGIES - ADA-EUROPE 2010, 2010, 6106 : 222 - 237
  • [36] Generic programming with C plus plus concepts and Haskell type classes-a comparison
    Bernardy, Jean-Philippe
    Jansson, Patrik
    Zalewski, Marcin
    Schupp, Sibylle
    JOURNAL OF FUNCTIONAL PROGRAMMING, 2010, 20 : 271 - 302
  • [37] Computing Summaries of String Loops in C for Better Testing and Refactoring
    Kapus, Timotej
    Ish-Shalom, Oren
    Itzhaky, Shachar
    Rinetzky, Noam
    Cadar, Cristian
    PROCEEDINGS OF THE 40TH ACM SIGPLAN CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '19), 2019, : 874 - 888
  • [38] Creating numerically efficient FDTD simulations using generic C plus plus programming
    Valuev, I.
    Deinega, A.
    Knizhnik, A.
    Potapkin, B.
    COMPUTATIONAL SCIENCE AND ITS APPLICATIONS - ICCSA 2007, PT 3, PROCEEDINGS, 2007, 4707 : 213 - +
  • [39] SoAx: A generic C plus plus Structure of Arrays for handling particles in HPC codes
    Homann, Holger
    Laenen, Francois
    COMPUTER PHYSICS COMMUNICATIONS, 2018, 224 : 325 - 332
  • [40] LIBRJMCMC: AN OPEN-SOURCE GENERIC C plus plus LIBRARY FOR STOCHASTIC OPTIMIZATION
    Bredif, Mathieu
    Tournaire, Olivier
    XXII ISPRS CONGRESS, TECHNICAL COMMISSION III, 2012, 39-B3 : 259 - 264