Multidimensional grids and data
Abstract
This chapter introduces key concepts of the thread organization and thread-to-data mapping in CUDA. It first gives an overview of the multidimensional organization of CUDA threads, blocks, and grids. It then elaborates on the use of thread indexes and block indexes to map threads to different parts of the data, which is illustrated with a two-dimensional (2D) image color-to-grayscale conversion example and a 2D image blur example. The chapter concludes with a matrix multiplication example that will be used extensively in later parts of the book.
Keywords
Kernel execution configuration parameters; multidimensional arrays; multidimensional grids; linearization; multidimensional blocks; row-major layout; ...
Get Programming Massively Parallel Processors, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.