A warp has scattered memory access when its threads request unrelated locations. Unlike a regular stride, these addresses may not share cache lines, so the hardware cannot combine their requests. section 10.7
In the 128-byte cache-line teaching model, 32 scattered float loads can require 32 transactions: 4,096 bytes fetched for 128 useful bytes, about 3% utilization. Modern GPUs count 32-byte sectors, making the corresponding figure about 12.5%; these figures compare access patterns, not runtime. section 10.7 section 10.4
__global__ void copyScattered(float* input, float* output,
int* indices, int n) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < n) {
output[idx] = input[indices[idx]]; #A
}
}This indexed copy can produce scattered reads when neighboring threads’ indices refer to unrelated memory locations. section 10.7
Reverse order is not necessarily scattered
With consecutive idx values, input[n - 1 - idx] still accesses consecutive addresses, just in reverse. Reversing direction alone does not make accesses scattered. section 10.7
