Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
6977 Discussions

LAPACK Linear Equation Routines for non square matrix

Dimitry_N_Intel
Employee
300 Views

Hi , I am trying to use LAPACKE function to compute system of linear equations.

I use 2 functions :

LAPACKE_sgetrf , LAPACKE_sgetrs

Input matrix A is MxN. According to your documentation first I call LAPACKE_sgetrf that support MxN matrix and then I should call LAPACKE_sgetrs. But in LAPACKE_sgetrs description there is only square matrix support.

 

Please explain if there solution for MxN matrix? If yes how to resolve?

P.S.

 

my Code:

Matrix _A is 110=rows 4=cols (x,y,z,w) 

B is -1;

        lapack_int info = LAPACKE_sgetrf(LAPACK_ROW_MAJOR, A_.rows, A_.cols, (float*)A_.data, A_.cols, &ipiv[0]);

        info = LAPACKE_sgetrs(LAPACK_ROW_MAJOR, 'N', A_.cols, 1, (float*)A_.data, A_.cols, &ipiv[0], (float*)&b[0], 1);

Values return from LAPACKE_sgetrs are garbage.

Thanks

 

0 Kudos
0 Replies
Reply