{"title":"Static Loop Parallelization Decision Using Template Metaprogramming","authors":"Alexis Pereda, D. Hill, C. Mazel, Bruno Bachelet","doi":"10.1109/HPCS.2018.00159","DOIUrl":null,"url":null,"abstract":"This article proposes to use C++ template metaprogramming techniques to decide at compile-time which parts of a code sequence in a loop can be parallelized. The approach focuses on characterizing the way a variable is accessed in a loop (reading or writing); first to decide how the loop should be split to enable the analysis for parallelization on each part; and then to decide if the iterations inside each loop are independent so that they can be run in parallel. The conditions that enable the parallelization of a loop are first explained to justify the proposed decision algorithm exposed. Then; a C++ library-based solution is presented that uses expression templates to get the relevant information necessary for the parallelization decision of a loop; and metaprograms to decide whether to parallelize the loop and generate a parallel code.","PeriodicalId":308138,"journal":{"name":"2018 International Conference on High Performance Computing & Simulation (HPCS)","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2018 International Conference on High Performance Computing & Simulation (HPCS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/HPCS.2018.00159","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
This article proposes to use C++ template metaprogramming techniques to decide at compile-time which parts of a code sequence in a loop can be parallelized. The approach focuses on characterizing the way a variable is accessed in a loop (reading or writing); first to decide how the loop should be split to enable the analysis for parallelization on each part; and then to decide if the iterations inside each loop are independent so that they can be run in parallel. The conditions that enable the parallelization of a loop are first explained to justify the proposed decision algorithm exposed. Then; a C++ library-based solution is presented that uses expression templates to get the relevant information necessary for the parallelization decision of a loop; and metaprograms to decide whether to parallelize the loop and generate a parallel code.