Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dimitry_N_Intel
Employee
108 Views

LAPACK Linear Equation Routines for non square matrix

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