Developer Reference for Intel® oneAPI Math Kernel Library for C
?lacn2
Estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products.
Syntax
C:
lapack_int LAPACKE_slacn2(lapack_int n, float *v, float *x, lapack_int *isgn, float *est,
lapack_int *kase, lapack_int *isave);
lapack_int LAPACKE_clacn2(lapack_int n, lapack_complex_float *v, lapack_complex_float *x,
float *est, lapack_int *kase, lapack_int *isave);
lapack_int LAPACKE_dlacn2(lapack_int n, double *v, double *x, lapack_int *isgn,
double *est, lapack_int *kase, lapack_int *isave);
lapack_int LAPACKE_zlacn2(lapack_int n, lapack_complex_double *v,
lapack_complex_double *x, double *est, lapack_int *kase,
lapack_int *isave);
Include Files
mkl.h
Description
The routine estimates the 1-norm of a square, real or complex matrix A . Reverse communication is used for evaluating matrix-vector products.
Input Parameters
- n
-
Specifies the order of the matrix A . The value of n must be at least zero.
- v , x
-
REAL for slacn2 DOUBLE PRECISION for dlacn2 COMPLEX for clacn2 DOUBLE COMPLEX for zlacn2 . Arrays, size ( n ) each. v is a workspace array. x is used as input after an intermediate return.
- isgn
-
INTEGER . Workspace array, size ( n ), used with real flavors only.
- est
-
REAL for slacn2 / clacn2 DOUBLE PRECISION for dlacn2 / zlacn2 On entry with kase set to 1 or 2, and isave(1) = 1 , est must be unchanged from the previous call to the routine.
- kase
-
INTEGER . On the initial call to the routine, kase must be set to 0.
isave
Array, size ( 3 ).
Contains variables from the previous call to the routine.
Output Parameters
- est
-
An estimate (a lower bound) for norm( A ).
- kase
-
On an intermediate return, kase is set to 1 or 2, indicating whether x is overwritten by A * x or AT * x for real flavors and A * x or AH * x for complex flavors. On the final return, kase is set to 0.
- v
-
On the final return, v = A*w , where est = norm(v)/norm(w) ( w is not returned).
- x
-
On an intermediate return, x is overwritten by A*x , if kase = 1 , A^{T}*x , if kase = 2 (for real flavors), A^{H}*x , if kase = 2 (for complex flavors), and the routine must be re-called with all the other parameters unchanged.
- isave
-
This parameter is used to save variables between calls to the routine.
Return Values
This function returns a value info .
If info = 0 , the execution is successful.
If info = -i , the i -th parameter had an illegal value.