Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

LAPACK Linear Equation Routines for non square matrix

$
0
0

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

 


Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>