#ifndef glas_stride_hpp #define glas_stride_hpp namespace glas { /// By default, the stride is 1 template struct stride_functor { typedef T argument_type ; typedef typename T::size_type result_type ; inline result_type operator() ( argument_type const& v ) const { return 1 ; } }; /// Compute the stride of a vector template typename stride_functor::result_type stride( T const& t ) { return stride_functor()( t ) ; } } #endif