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.
Original language | English (US) |
---|---|
Title of host publication | Programming Massively Parallel Processors |
Subtitle of host publication | a Hands-on Approach, Fourth Edition |
Publisher | Elsevier |
Pages | 47-68 |
Number of pages | 22 |
ISBN (Electronic) | 9780323912310 |
ISBN (Print) | 9780323984638 |
DOIs | |
State | Published - Jan 1 2022 |
Keywords
- Kernel execution configuration parameters
- column-major layout
- inner product
- linearization
- matrix multiplication
- multidimensional arrays
- multidimensional blocks
- multidimensional grids
- row-major layout
- thread-data mapping
ASJC Scopus subject areas
- General Computer Science