Abstract
We present Template Numerical Library (TNL, www.tnl-project.org) with native support of modern parallel architectures like multi–core CPUs and GPUs. The library offers an abstract layer for accessing these architectures via unified interface tailored for easy and fast development of high-performance algorithms and numerical solvers. The library is written in C++ and it benefits from template meta–programming techniques. In this paper, we present the most important data structures and algorithms in TNL together with scalability on multi–core CPUs and speed–up on GPUs supporting CUDA.
Highlights
TNL aims to be an efficient and user friendly library for numerical simulations
An implicit time discretization of linear problems allows to construct the linear system once on the CPU, transfer it to the GPU and solve it repeatedly there by some iterative solver like CG. Such solvers require only common linear algebraic operations implemented in libraries like CUBLAS or CUSPARSE which are part of the CUDA toolkit
The first two methods can be called from the host even for arrays allocated on the device but they cannot be called from the CUDA kernels
Summary
TNL aims to be an efficient and user friendly library for numerical simulations To fulfill this goal, it must support modern parallel architectures like GPUs (graphical processing units) and multi-core CPUs on one hand and offer simple and flexible interface for implementation of complex numerical solvers on the other hand. An implicit time discretization of linear problems allows to construct the linear system once on the CPU, transfer it to the GPU and solve it repeatedly there by some iterative solver like CG (conjugate gradients) Such solvers require only common linear algebraic operations implemented in libraries like CUBLAS or CUSPARSE which are part of the CUDA toolkit. We demonstrate the performance of TNL by showing the scalability on multi-core CPUs and speed–up of GPUs (Section 4)
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.