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

Questions about sgels example

$
0
0

I have two questions about sgels example:

(1) why need to call sgels twice?

/* Query and allocate the optimal workspace */
    lwork = -1;
    sgels( "No transpose", &m, &n, &nrhs, a, &lda, b, &ldb, &wkopt, &lwork, &info );
    lwork = (MKL_INT)wkopt;
    work = (float*)malloc( lwork*sizeof(float) );
    /* Solve the equations A*X = B */
    sgels( "No transpose", &m, &n, &nrhs, a, &lda, b, &ldb, work, &lwork,  &info );

(2) where to decide row-major matrix or column -major matrix?

Thank you very much!


Viewing all articles
Browse latest Browse all 2652

Trending Articles



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