You copied the Doc URL to your clipboard.

Stride patterns and data accesses

The stride pattern of data accesses in a loop is the pattern of accesses to data elements between sequential loop iterations.

For example, a loop that linearly accesses each element of an array has a stride pattern, or a stride, of one. A loop that accesses an array with a constant offset between each element used has a constant stride.

float *a, *b;
int i, j=0, n;
for (i = 0; i < n; i++)
 /* a is accessed with a stride of 2. */
 /* b is accessed with a stride of 1. */
    *(a+j) = x + b[i];
    j += 2;