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

error in LAPACKE_dgesvd Example row major

$
0
0

Hello,
I wanted to share an error i found in the example for LAPACKE_dgesvd example for row major. https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11...
in the function:

print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );

it will print the left singular matrix as mxn while its a mxm. The matrix contain correct data but the print_matrix function gets it column from column of the original matrix. so it should be

print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );

also note the comment where it says "Example Program Results." should also be changed for the left singular vectors:
 Left singular vectors (stored columnwise)
  -0.59   0.26   0.36   0.31   0.23   0.55
  -0.40   0.24  -0.22  -0.75  -0.36   0.18
  -0.03  -0.60  -0.45   0.23  -0.31   0.54
  -0.43   0.24  -0.69   0.33   0.16  -0.39
  -0.47  -0.35   0.39   0.16  -0.52  -0.46
   0.29   0.58  -0.02   0.38  -0.65   0.11


Viewing all articles
Browse latest Browse all 2652

Trending Articles



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