LAPACK Archives

[Lapack] question about how to use a routine dgetri.c

yes 1D will be fine, just do a dimension of LDA*N.
The comments are coming from the Fortran LAPACK, this is why.
For info, CLAPACK has been replaced by the new Standard C language APIs for 
LAPACKE requires to have the Fortran LAPACK library as it is just an APIs.
The move from CLAPACK to LAPACKE should go smoothly.
Julie Langou
On Feb 23, 2011, at 3:49 PM, Carolina Brito wrote:


I have been using clapack to obtain the eigenvalues and eigenvectors of a 
matrix and it worked quite well.
I now need to invert a matrix and I see that the routine dgetri.c does it.
However, I can t undertand the arguments of this function because the 
declaration is 

/* Subroutine */ int dgetri_(integer *n, doublereal *a, integer *lda, integer 
        *ipiv, doublereal *work, integer *lwork, integer *info)

and the explanation about the matrix "a" says that:

 A       (input/output) DOUBLE PRECISION array, dimension (LDA,N)   
            On entry, the factors L and U from the factorization   
            A = P*L*U as computed by DGETRF.   
            On exit, if INFO = 0, the inverse of the original matrix A.   

What I don t understand is that  the matrix accepted by the function is of 
the type *matA, but in the explanation of the argument says that the 
dimension is ( LDA, N)
So how should I declare  the matrix  and pass it to  the function?

the matrix I want to invert is a n x n matrix and I declare this as, let s say
double **matA 
Should I transform this into a one dimensional matrix ?

Thank you in advance,

Lapack mailing list

Julie Langou; Research Associate in Computer Science
Innovative Computing Laboratory;
University of Tennessee from Denver, Colorado ;-)

-------------- next part --------------
An HTML attachment was scrubbed...

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or