Gabriell Araujo , Dinei A. Rockenbach , Júnior Löff , Dalvan Griebler , Luiz G. Fernandes
{"title":"A C++ annotation-based domain-specific language for expressing stream and data parallelism supporting CPU and GPU","authors":"Gabriell Araujo , Dinei A. Rockenbach , Júnior Löff , Dalvan Griebler , Luiz G. Fernandes","doi":"10.1016/j.cola.2025.101369","DOIUrl":null,"url":null,"abstract":"<div><div>Graphics processing units (GPUs) and central processing units (CPUs) provide massive parallel computing in our modern computer systems (e.g., servers, desktops, smartphones, and laptops), and efficiently utilizing their processing power requires expertise in parallel programming. Mainly, domain-specific languages (DSLs) address this challenge by improving productivity and abstractions. SPar is a high-level DSL that promotes parallel programming abstractions for stream and data parallelism using C++ attribute annotations for serial code. Unlike existing solutions, SPar eliminates the need to manually implement low-level mechanisms to leverage stream and data parallelism on heterogeneous systems. In this article, we design an extended version of the language and compiler algorithm for GPU code generation. We newly offer a single parallel programming model targeting CPUs and GPUs to exploit stream and data parallelism. The experiments indicated performance improvement compared with previous versions of SPar and achieved performance comparable to handwritten code using lower-level programming abstractions in specific scenarios.</div></div>","PeriodicalId":48552,"journal":{"name":"Journal of Computer Languages","volume":"85 ","pages":"Article 101369"},"PeriodicalIF":1.8000,"publicationDate":"2025-10-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer Languages","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S2590118425000553","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
Graphics processing units (GPUs) and central processing units (CPUs) provide massive parallel computing in our modern computer systems (e.g., servers, desktops, smartphones, and laptops), and efficiently utilizing their processing power requires expertise in parallel programming. Mainly, domain-specific languages (DSLs) address this challenge by improving productivity and abstractions. SPar is a high-level DSL that promotes parallel programming abstractions for stream and data parallelism using C++ attribute annotations for serial code. Unlike existing solutions, SPar eliminates the need to manually implement low-level mechanisms to leverage stream and data parallelism on heterogeneous systems. In this article, we design an extended version of the language and compiler algorithm for GPU code generation. We newly offer a single parallel programming model targeting CPUs and GPUs to exploit stream and data parallelism. The experiments indicated performance improvement compared with previous versions of SPar and achieved performance comparable to handwritten code using lower-level programming abstractions in specific scenarios.