Stride of an array

In computer programming, the stride of an array (also referred to as increment, pitch or step size) is the number of locations in memory between beginnings of successive array elements, measured in bytes or in units of the size of the array's elements.

Arrays may have a stride larger than their elements' width in bytes in at least two cases: Some languages allow arrays of structures to be treated as overlapping parallel arrays with non-unit stride: This idiom is a form of type punning.

Some languages like PL/I or Fortran allow what is known as an array cross-section, which selects certain columns or rows from a larger array.

[1]: p.262  For example, if a two-dimensional array is declared as an array of one dimension consisting only of the second column may be referenced as Non-unit stride is particularly useful for images.

It allows for creating subimages without copying the pixel data.