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

被引:0
|
作者
Christopher Brown
Vladimir Janjic
Adam D. Barwell
J. Daniel Garcia
Kenneth MacKenzie
机构
[1] University of St Andrews,School of Computer Science
[2] University of Dundee,School of Science and Engineering
[3] University Carlos III of Madrid,undefined
[4] IOHK,undefined
来源
International Journal of Parallel Programming | 2020年 / 48卷
关键词
Refactoring; Parallelism; Parallel patterns; TBB; C++; GrPPI; C++ threads;
D O I
暂无
中图分类号
学科分类号
摘要
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.
引用
收藏
页码:603 / 625
页数:22
相关论文
共 20 条
  • [1] Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C plus
    Brown, Christopher
    Janjic, Vladimir
    Barwell, Adam D.
    Garcia, J. Daniel
    MacKenzie, Kenneth
    INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2020, 48 (04) : 603 - 625
  • [2] A Refactoring Approach to Parallelism
    Dig, Danny
    IEEE SOFTWARE, 2011, 28 (01) : 17 - 22
  • [3] Towards a Generic Framework for Trustworthy Program Refactoring
    Horpacsi, Daniel
    Koszegi, Judit
    Nemeth, David J.
    ACTA CYBERNETICA, 2022, 25 (04): : 753 - 779
  • [4] Refactoring for introducing and tuning parallelism for heterogeneous multicore machines in Erlang
    Janjic, Vladimir
    Brown, Christopher
    Barwell, Adam
    Hammond, Kevin
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2021, 33 (14):
  • [5] CScout: A refactoring browser for C
    Spinellis, Diomidis
    SCIENCE OF COMPUTER PROGRAMMING, 2010, 75 (04) : 216 - 231
  • [6] A Foundation for Refactoring C with Macros
    Overbey, Jeffrey L.
    Behrang, Farnaz
    Hafiz, Munawar
    22ND ACM SIGSOFT INTERNATIONAL SYMPOSIUM ON THE FOUNDATIONS OF SOFTWARE ENGINEERING (FSE 2014), 2014, : 75 - 85
  • [7] Dynamic verification of C++ generic algorithms
    Wang, CQ
    Musser, DR
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1997, 23 (05) : 314 - 323
  • [8] Embracing the C preprocessor during refactoring
    Garrido, Alejandra
    Johnson, Ralph
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2013, 25 (12) : 1285 - 1304
  • [9] Simulation of a Model for Refactoring Approach for Parallelism Using Parallel Computing Tool Box
    Makka, Shanthi
    Sagar, B. B.
    PROCEEDINGS OF FIRST INTERNATIONAL CONFERENCE ON INFORMATION AND COMMUNICATION TECHNOLOGY FOR INTELLIGENT SYSTEMS: VOL 2, 2016, 51 : 77 - 84
  • [10] 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