December 2022

Journal

Portable C++ Code that can Look and Feel Like Fortran Code with Yet Another Kernel Launcher (YAKL)

By:
Norman, Matthew R; Lyngaas, Isaac R; Bagusetty, Abhishek; Berrill, Mark A
Journal Name:
International Journal of Parallel Programming
Page Number:
209-230
Volume:
51
Issue Number:
4-5
Publication Date:
December 2022
View DOI Listing:
https://doi.org/10.1007/s10766-022-00739-0

Abstract

This paper introduces the Yet Another Kernel Launcher (YAKL) C++ portability library, which strives to enable user-level code with the look and feel of Fortran code. The intended audience includes both C++ developers and Fortran developers unfamiliar with C++. The C++ portability approach is briefly explained, YAKL's main features are described, and code examples are given that demonstrate YAKL's usage. YAKL is not as multi-featured as other C++ portability frameworks such as kokkos, RAJA, and SYCL, but it does fulfill a niche capability important to some scientific applications, especially applications seeking to port Fortran code quickly to a portable C++ library. YAKL places heavy emphasis on simplicity, readability, and productivity with performance mainly emphasizing Graphics Processing Units (GPUs). Central to YAKL's ability to allow Fortran-like user-level code are three features: (1) a multi-dimensional Array class that allows Fortran behavior; (2) a limited library of Fortran intrinsic functions; and (3) an efficient pool allocator that transparently enables cheap frequent allocations and deallocations of YAKL Arrays. While YAKL allows Fortran-style code, it also allows Arrays that exhibit C-like behavior as well, including row-major index ordering and lower bounds of ``0''. YAKL currently supports CPUs, CPU threading, and Nvidia, AMD, and Intel GPUs.