leading_dimension(X)

Prototype

template <class X>
typename leading_dimension_functor<X>::result_type leading_dimension(X const&) ;

Description

Computes the leading_dimension of an object of type X. For a matrix m should hold the following:
glas::pointer(m(i,j)) == glas::pointerglas::pointer(m)+j* glas::leading_dimension(m)+i

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

Definition

Defined in leading_dimension.hpp

Requirements on types

Example

See leading_dimension test programs