March 2026
Intermediate
534 pages
12h 51m
English
This chapter explores how to solve the heat equation, a fundamental partial differential equation (PDE) used in science and engineering, such as weather forecasting. We will apply previously introduced concepts, including parallel execution of CUDA kernels and utilization of memory layouts, to optimize the heat equation solver. Solving the heat equation as a stencil problem is well-suited for GPUs because each grid point is updated using only its nearest neighbors, meaning the same computation is applied independently, which can be mapped onto the thousands of threads available on a GPU. Additionally, stencil computations involve structured access to memory, which aligns well with GPU memory hierarchies ...
Read now
Unlock full access