So I am trying to solve a sparse linear least squares min||Ax - b|| where the matrix A is sparse.
The MKL 2019 introduced QR solver with the documentation available at
Now I cannot utilize such function and my guess is that I have not fully understood the parameters specially ldx & ldb since once I call the function nothing happens or the program crashes!
- Matrix A is is "m x n" & specified in CSR (since only CSR is supported at the moment)
- b is an aligned array (so 1 column only for b) and the length is m
- The solution array x is aligned (allocated) & has a length of "n"
I call (apologies for pseudo code!)
success_solve = mkl_sparse_s_qr(
operation = SPARSE_OPERATION_NON_TRANSPOSE,
A = CSR description,
descr = SPARSE_MATRIX_TYPE_GENERAL,
layout = SPARSE_LAYOUT_ROW_MAJOR,
columns = 1,
ldx = 1, //I have tried with both 0 & 1 and I failed at both
ldb = 1 ); //again tried with both 0 & 1 and failed at both
Appreciate any help && cheers