Developer Reference

Intel® oneAPI Math Kernel Library LAPACK Examples

ID 766877
Date 12/20/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?gesv function

Computes the solution to the system of linear equations with a square coefficient matrix A and multiple right-hand sides.

Fortran-77 Interface

Calling from Fortran:

call sgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
call dgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
call cgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
call zgesv(n, nrhs, a, lda, ipiv, b, ldb, info)
call dsgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, iter, info)
call zcgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, rwork, iter, info)

Calling from C:

sgesv(n, nrhs, a, lda, ipiv, b, ldb, info);
dgesv(n, nrhs, a, lda, ipiv, b, ldb, info);
cgesv(n, nrhs, a, lda, ipiv, b, ldb, info);
zgesv(n, nrhs, a, lda, ipiv, b, ldb, info);
dsgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, iter, info)
zcgesv(n, nrhs, a, lda, ipiv, b, ldb, x, ldx, work, swork, rwork, iter, info)

C Interface

lapack_int LAPACKE_sgesv(int matrix_layout, lapack_int n, lapack_int nrhs, float* a, lapack_int lda, lapack_int* ipiv, float* b, lapack_int ldb);
lapack_int  LAPACKE_dgesv(int matrix_layout, lapack_int n, lapack_int nrhs, double* a, lapack_int lda, lapack_int* ipiv, double* b, lapack_int ldb);
lapack_int LAPACKE_cgesv(int matrix_layout, lapack_int n, lapack_int nrhs, lapack_complex_float* a, lapack_int lda, lapack_int* ipiv, lapack_complex_float* b, lapack_int ldb);
lapack_int LAPACKE_zgesv(int matrix_layout, lapack_int n, lapack_int nrhs, lapack_complex_double* a, lapack_int lda, lapack_int* ipiv, lapack_complex_double* b, lapack_int ldb);
lapack_int LAPACKE_dsgesv(int matrix_layout, lapack_int n, lapack_int nrhs, double * a, lapack_int lda, lapack_int * ipiv, double * b, lapack_int ldb, double * x, lapack_int ldx, lapack_int * iter);
lapack_int LAPACKE_zcgesv(int matrix_layout, lapack_int n, lapack_int nrhs, lapack_complex_double * a, lapack_int lda, lapack_int * ipiv, lapack_complex_double * b, lapack_int ldb, lapack_complex_double * x, lapack_int ldx, lapack_int * iter);