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
相关论文
empty
未找到相关数据