Shared-memory addressing · 20 drills

Tiling Index Drills

Row-major memory doesn't know what a "row" or "column" is — it only understands one flat address. Every tiling bug traces back to row * N + col arithmetic done on autopilot. Work through these until it isn't.

DECODED  00 / 20
Conventions used below
layout
All matrices are row-major, flattened to 1D arrays.
A, B, C
A is M×K, B is K×N, C = A×B is M×N.
TILE_DIM
Square tile width. blockDim.x = blockDim.y = TILE_DIM.
row, col
This thread's fixed global output coordinates in C.
t / tile
Current tile index (0-based) inside the loop over the shared K dimension.
Signature module

Cell ⇔ Address

A 4×6 matrix (N = 6), row-major, flattened into one strip. This is the exact mapping row * N + col is doing, every time.

Hover a cell → decode its address

Hover or focus a cell to decode it →

Type an address → decode its cell

Type an index above →