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
相关论文
共 50 条
  • [21] A generic C++ implementation of composite path algebras
    Botincan, M
    Manger, R
    Proceedings of the 10th International Conference on Operational Research - KOI 2004, 2005, : 155 - 164
  • [22] Refactoring C with conditional compilation
    Garrido, A
    Johnson, R
    18TH IEEE INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, PROCEEDINGS, 2003, : 323 - 326
  • [23] MultiArray: a C++ library for generic programming with arrays
    Garcia, R
    Lumsdaine, A
    SOFTWARE-PRACTICE & EXPERIENCE, 2005, 35 (02): : 159 - 188
  • [24] CScout: A refactoring browser for C
    Spinellis, Diomidis
    SCIENCE OF COMPUTER PROGRAMMING, 2010, 75 (04) : 216 - 231
  • [25] 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
  • [26] STL and generic programming - More on C++ metaprogramming
    Becker, Thomas
    C/C++ Users Journal, 2002, 20 (10):
  • [27] A generic C++ library for solving path problems
    Botincan, M
    ITI 2004: PROCEEDINGS OF THE 26TH INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY INTERFACES, 2004, : 645 - 650
  • [28] Supporting Advanced Patterns in GRPPI, a Generic Parallel Pattern Interface
    del Rio Astorga, David
    Dolz, Manuel F.
    Fernandez, Javier
    Daniel Garcia, J.
    EURO-PAR 2017: PARALLEL PROCESSING WORKSHOPS, 2018, 10659 : 55 - 67
  • [29] SeqAn An efficient, generic C++ library for sequence analysis
    Doering, Andreas
    Weese, David
    Rausch, Tobias
    Reinert, Knut
    BMC BIOINFORMATICS, 2008, 9 (1)
  • [30] A comparative evaluation of generic programming in Java']Java and C++
    Saiedian, H
    Hill, S
    SOFTWARE-PRACTICE & EXPERIENCE, 2003, 33 (02): : 121 - 142