Practice ยท 2 of 3
Blocked Transpose
CHALLENGE
Difficulty: advanced+25 XP
ISO C. Implement void transpose_blocked(int *dst, const int *src, size_t n, size_t block) โ standard n-by-n transpose, walking the matrix in block-by-block tiles (the cache-friendly order). For every i,j: dst[j*n+i] = src[i*n+j]. block 0 must be treated as 1. Correctness is what is tested; the tiling is the lesson.
Press Submit to check your solution.
Back to lesson: Practice: Layout and Measurement Drills