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 条
  • [21] Support for the Evolution of C plus plus Generic Functions
    Pirkelbauer, Peter
    Dechev, Damian
    Stroustrup, Bjarne
    SOFTWARE LANGUAGE ENGINEERING, 2011, 6563 : 123 - +
  • [22] Refactoring the FreeBSD Kernel with Checked C
    Duan, Junhan
    Yang, Yudi
    Zhou, Jie
    Criswell, John
    2020 IEEE SECURE DEVELOPMENT (SECDEV 2020), 2020, : 15 - 22
  • [23] Embracing the C preprocessor during refactoring
    Garrido, Alejandra
    Johnson, Ralph
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2013, 25 (12) : 1285 - 1304
  • [24] Axioms as generic rewrite rules in C plus plus with concepts
    Tang, Xiaolong
    Jaervi, Jaakko
    SCIENCE OF COMPUTER PROGRAMMING, 2015, 97 : 320 - 330
  • [25] 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
  • [26] Refactoring to Standard C++20 Modules
    Szalay, Richard
    Porkolab, Zoltan
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2025, 37 (01)
  • [27] Understanding, Refactoring, and Fixing Concurrency in C#
    Okur, Semih
    2015 30TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING (ASE), 2015, : 898 - 901
  • [28] SimpleConcepts: Support for Constraints on Generic Types in C plus
    Milewicz, Reed
    Mernik, Marjan
    Pirkelbauer, Peter
    2013 FEDERATED CONFERENCE ON COMPUTER SCIENCE AND INFORMATION SYSTEMS (FEDCSIS), 2013, : 1535 - 1540
  • [29] Generic Locking and Deadlock-Prevention with C plus
    Suess, Michael
    Leopold, Claudia
    PARALLEL COMPUTING: ARCHITECTURES, ALGORITHMS AND APPLICATIONS, 2008, 15 : 211 - +
  • [30] A C plus plus Generic Parallel Pattern Interface for Stream Processing
    del Rio Astorga, David
    Dolz, Manuel F.
    Miguel Sanchez, Luis
    Garcia Blas, Javier
    Daniel Garcia, J.
    ALGORITHMS AND ARCHITECTURES FOR PARALLEL PROCESSING, ICA3PP 2016, 2016, 10048 : 74 - 87