Developer Reference

Intel® oneAPI Math Kernel Library LAPACK Examples

ID 766877
Date 12/20/2021

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

Document Table of Contents

SGESV Example

The routine solves the system of linear equations for X:

A*X = B


  • A is a square matrix.

  • The columns of matrix B are individual right-hand sides.

  • The columns of X are the corresponding solutions.

The matrix B is overwritten by X.

The LU decomposition with partial pivoting and row interchanges is used to factor A as:

A = P*L*U


  • P is a permutation matrix.

  • L is a unit lower triangular.

  • U is an upper triangular.

The factored form of A is then used to solve the system of equations A*X = B.

C Interface

Please refer to the Matrix Layout section of the C Interface Conventions for the description of Row Major (C default) and Column Major (Fortran default).