LESSON 26.07 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Memory coalescing
Watch one warp's 32 loads join into a few 32-byte memory sectors.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 26.07 · GPU BAYPIXEL (9, 6) · BYTE 516 · ROW 80 B
01
Stage 1 of 5 · Row-major memory
Memory keeps the image in row-major order, one row after the next. Pixel (9, 6) is at byte 516.
Explain it simply
On the left is the image, and next to it is the same image laid out in memory. Memory is one long line of bytes, so row 0 comes first, then row 1, and so on. Each pixel is a 4-byte float, so a row of 20 pixels takes 80 bytes. The traced pixel sits at byte 516.
A 20 by 12 image and the same pixels in memory, 960 bytes in rows of 128 bytes. Pixel 9, 6 is at byte 516.
pixels, floats asked forsectors movedwaste: bytes not used, idle threadsthe traced warpempty lane
Toy: 26.C2 · a 20 × 12 image of 4-byte floats · 32-byte sectors
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
The byte address of a pixel is four times its place in the rows.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.