Visible to Intel only — GUID: GUID-0467B3D8-9B85-4FC7-B2C1-8F4FA0CF54B6
Visible to Intel only — GUID: GUID-0467B3D8-9B85-4FC7-B2C1-8F4FA0CF54B6
mkl_sparse_?_qr
Computes the QR decomposition for the matrix of a sparse linear system and calculates the solution.
Syntax
stat = mkl_sparse_d_qr (operation, A, descr, layout, *columns, x, *ldx, b, ldb)
stat = mkl_sparse_s_qr (operation, A, descr, layout, x, columns, ldx, b, ldb)
Include Files
- mkl_sparse_qr.f90
Description
The mkl_sparse_?_qr routine computes the QR decomposition for the matrix of a sparse linear system A*x = b, so that A = Q*R where Q is the orthogonal matrix and R is upper triangular, and calculates the solution.
Currently, mkl_sparse_?_qr supports only square and overdetermined systems. For underdetermined systems you can manually transpose the system matrix and use QR decomposition for AT to get the minimum-norm solution for the original underdetermined system.
Input Parameters
- operation
-
C_INT
Specifies the operation to perform.
NOTE:Currently, the only suppored value is SPARSE_OPERATION_NON_TRANSPOSE (non-transpose case; that is, A*x = b is solved). - A
-
SPARSE_MATRIX_T
Handle containing a sparse matrix in an internal data structure.
- descr
-
MATRIX_DESCR
Structure specifying sparse matrix properties. Only the parameters listed here are currently supported.
- type
-
Specifies the type of sparse matrix.
NOTE:Currently, the only supported value is SPARSE_MATRIX_TYPE_GENERAL (the matrix is processed as-is). - layout
-
C_INT
Describes the storage scheme for the dense matrix:
SPARSE_LAYOUT_COLUMN_MAJOR Storage of elements uses column-major layout. SPARSE_LAYOUT_ROW_MAJOR Storage of elements uses row-major layout. - x
-
C_FLOAT for mkl_sparse_s_qr; C_DOUBLE for mkl_sparse_d_qr
Array with a size of at least rows*cols:
layout = SPARSE_LAYOUT_COLUMN_MAJOR layout = SPARSE_LAYOUT_ROW_MAJOR rows (number of rows in x) ldx Number of columns in A cols (number of columns in x) columns ldx - columns
-
C_INT
Number of columns in matrix b.
- ldx
-
C_INT
Specifies the leading dimension of matrix x.
- b
-
C_FLOAT for mkl_sparse_s_qr; C_DOUBLE for mkl_sparse_d_qr
Array with a size of at least rows*cols:
layout = SPARSE_LAYOUT_COLUMN_MAJOR layout = SPARSE_LAYOUT_ROW_MAJOR rows (number of rows in b) ldb Number of columns in A cols (number of columns in b) columns ldb - ldb
-
C_INT
Specifies the leading dimension of matrix b.
Output Parameters
- x
-
C_FLOAT for mkl_sparse_s_qr; C_DOUBLE for mkl_sparse_d_qr
Overwritten by the updated matrix y.
- stat
-
INTEGER
Value indicating whether the operation was successful, and if not, why:
SPARSE_STATUS_SUCCESS The operation was successful. SPARSE_STATUS_NOT_INITIALIZED The routine encountered an empty handle or matrix array. SPARSE_STATUS_ALLOC_FAILED Internal memory allocation failed. SPARSE_STATUS_INVALID_VALUE The input parameters contain an invalid value. SPARSE_STATUS_EXECUTION_FAILED Execution failed. SPARSE_STATUS_INTERNAL_ERROR An error in algorithm implementation occurred. SPARSE_STATUS_NOT_SUPPORTED The requested operation is not supported.