stride(X)

Prototype

template <class X>
typename stride_functor<X>::result_type stride(X const&) ;

Description

Computes the stride of an object of type X. For a vector v should hold the following:
glas::pointer(v(i)) == glas::pointer(v)+i*glas::stride(v)

The reason glas has its own stride function is because of the extensibility through the use of the stride_functor<X>()(x) for which stride(X) is just a shortcut.

Definition

Defined in stride.hpp

Requirements on types

Example

See stride test programs