Skip to main content

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

by Matthew R Norman, Isaac R Lyngaas, Abhishek Bagusetty, Mark A Berrill
Publication Type
Journal Name
International Journal of Parallel Programming
Publication Date
Page Numbers
209 to 230

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.