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 条
  • [1] Refactoring GrPPI: Generic Refactoring for Generic Parallelism in C++
    Christopher Brown
    Vladimir Janjic
    Adam D. Barwell
    J. Daniel Garcia
    Kenneth MacKenzie
    International Journal of Parallel Programming, 2020, 48 : 603 - 625
  • [2] Generic Refactoring Methodology for Cloud Migration
    Kesavulu, Manoj
    Bezbradica, Marija
    Helfert, Markus
    CLOSER: PROCEEDINGS OF THE 7TH INTERNATIONAL CONFERENCE ON CLOUD COMPUTING AND SERVICES SCIENCE, 2017, : 664 - 667
  • [3] Role-Based Generic Model Refactoring
    Heimann, Jan
    Seifert, Mirko
    Assmann, Uwe
    MODEL DRIVEN ENGINEERING LANGUAGES AND SYSTEMS, PT II, 2010, 6395 : 78 - 92
  • [4] Towards a Generic Framework for Trustworthy Program Refactoring
    Horpacsi, Daniel
    Koszegi, Judit
    Nemeth, David J.
    ACTA CYBERNETICA, 2022, 25 (04): : 753 - 779
  • [5] ReL : A Generic Refactoring Language for Specification and Execution
    Ruhroth, Thomas
    Wehrheim, Heike
    Ziegert, Steffen
    2011 37TH EUROMICRO CONFERENCE ON SOFTWARE ENGINEERING AND ADVANCED APPLICATIONS (SEAA 2011), 2011, : 83 - 90
  • [6] A Refactoring Approach to Parallelism
    Dig, Danny
    IEEE SOFTWARE, 2011, 28 (01) : 17 - 22
  • [7] Refactoring generic instantiations based on type propagation analysis
    Chen, Lin
    Xu, Bao-Wen
    Qian, Ju
    Zhou, Tian-Lin
    Zhou, Yu-Ming
    Ruan Jian Xue Bao/Journal of Software, 2009, 20 (10): : 2617 - 2627
  • [8] Efficiently refactoring Java']Java applications to use generic libraries
    Fuhrer, R
    Tip, F
    Kiezun, A
    Dolby, J
    Keller, M
    ECOOP 2005 - OBJECT-ORIENTED PROGRAMMING, PROCEEDINGS, 2005, 3586 : 71 - 96
  • [9] A Practical Tutorial on Refactoring for Parallelism
    Dig, Danny
    2010 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE, 2010,
  • [10] A C plus plus refactoring browser and method extraction
    Vittek, Marian
    Borovansky, Peter
    Moreau, Pierre-Etienne
    SOFTWARE ENGINEERING TECHNIQUES: DESIGN FOR QUALITY, 2006, 227 : 325 - +