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
关键词
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 条
  • [41] A generic C++ framework for parallel mesh-based scientific applications
    Gerlach, J
    Gottschling, P
    Der, U
    HIGH-LEVEL PARALLEL PROGRAMMING MODELS AND SUPPORTIVE ENVIRONMENTS, PROCEEDINGS, 2001, 2026 : 45 - 54
  • [42] Compilation of generic regular path expressions using C++ class templates
    Padovani, L
    COMPILER CONSTRUCTION, PROCEEDINGS, 2005, 3443 : 27 - 42
  • [43] C++对Generic程序设计技术的支持
    周成玉
    邵志清
    华东理工大学学报, 2001, (05) : 557 - 560
  • [44] A generic C++ framework for parallel mesh-based scientific applications
    Gerlach, Jens
    Gottschling, Peter
    Der, Uwe
    Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 2001, 2026 : 45 - 54
  • [45] AOP++: A generic aspect-oriented programming framework in C++
    Yao, Z
    Zheng, QL
    Chen, GL
    GENERATIVE PROGRAMMING AND COMPONENT ENGINEERING, PROCEEDINGS, 2005, 3676 : 94 - 108
  • [46] Performance of Parallelism in Python and C++
    Departamento de Ciencias de la Computación y de la Decisión, Universidad Nacional de Colombia, Sede Medellín, Colombia
    不详
    IAENG Int. J. Comput. Sci., 2023, 2
  • [47] 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 - +
  • [48] REFACTORING OF C/C plus plus PREPROCESSOR CONSTRUCTS AT THE MODEL LEVEL
    Vidacs, Laszlo
    ICSOFT 2009: PROCEEDINGS OF THE 4TH INTERNATIONAL CONFERENCE ON SOFTWARE AND DATA TECHNOLOGIES, VOL 1, 2009, : 232 - 237
  • [49] 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
  • [50] A C++ expression system for partial differential equations enables generic simulations of biological hydrodynamics
    Abhinav Singh
    Pietro Incardona
    Ivo F. Sbalzarini
    The European Physical Journal E, 2021, 44