Dr W.W. Schulz wrote:
> The alternative is to call sglu also with n in the parameterlist,
> but then one could also pass down the leading dim of a (as is
> standard practice in BLAS, LAPACK etc):
>
> subroutine glu( a,lda,n )
> dimension a(lda)
> if( n.eq.1 ) then
> a(n) = 1.
> elseif( n.eq.2 ) then
> a(n) = 2.
> end if
> end
This is only a standard practice for arrays of rank 2 or higher.
For example, the none of the BLAS 1 routines uses an LDA argument,
and the BLAS 2 routines only use LDA for matrix arguments. The
vector arguments in, for example, SGEMV have extents which are
inferred from the matrix row or column count and a vector-
specific stride argument; the LDA argument is for the matrix
and has nothing to do with the vectors.
-------- Cray Research --------- Roger Glover
-- A Silicon Graphics Company -- http://home.cray.com/~glover
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|