This appendix gathers the mathematics that appears throughout the text. It is
not a mathematics course; it is a dictionary. Every symbol below appears at
least once in the main chapters.
The roofline inequality: \(P \le \min(P_{\text{peak}},\; I \cdot B)\),
with the two regimes compute-bound (\(I > I_{\text{ridge}}\)) and
memory-bound (\(I < I_{\text{ridge}}\)). Chapter 1, §1.8.
Tree reduction performs \(n/2\) additions per level over \(\log_2 n\)
levels; the bank index is \(\lfloor \text{addr}/4 \rfloor \bmod 32\).
Chapter 2, §2.8; Chapter 8.
Row-major storage is assumed everywhere unless stated otherwise:
element \((i, j)\) of a \(W\)-wide matrix lives at linear index
\(i \cdot W + j\). Consecutive threads map to consecutive \(j\) - the
coalescing convention of Chapter 7.
Zero-based indexing, matching the hardware (threadIdx.x starts at 0).
FLOPs counts a fused multiply-add as two operations (the convention
behind Chapter 2’s peak rates).
Powers of two dominate block sizes and tile sizes; when a formula
requires one, the text says so (Chapter 8, §8.3).