Function

NumCosmoMathlapack_dgesv

Declaration [src]

gint
ncm_lapack_dgesv (
  gint n,
  gint nrhs,
  gdouble* a,
  gint lda,
  gint* ipiv,
  gdouble* b,
  gint ldb
)

Description [src]

This function computes the solution of $A X = B$ for a general n by n matrix a = A using the LU factorization with partial pivoting and row interchanges. On entry b contain the vectors $B$ and on exit b contain the solutions if the return is 0. The array ipiv records the pivot indices from the factorization.

Warning: this function expects a to be a square matrix and in column-major format as in Fortran.

Parameters

n

Type: gint

The number of equations, n >= 0.

nrhs

Type: gint

Number of right-hand-side vectors to solve.

a

Type: gdouble*

Array of doubles with dimension (n, lda).

The data is owned by the caller of the function.
lda

Type: gint

The leading dimension of the array a, lda >= max (1, n).

ipiv

Type: gint*

Array of integers with dimension n for pivot indices.

The data is owned by the caller of the function.
b

Type: gdouble*

Array of doubles with dimension (n, ldb).

The data is owned by the caller of the function.
ldb

Type: gint

The leading dimension of the array b, ldb >= max (1, n).

Return value

Type: gint

I = 0: successful exit

     < 0:  -i, the i-th argument had an illegal value

     > 0: the (i,i) element of the factor U is exactly zero,
          so the matrix is singular and the solution could not be computed.