Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 12/16/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?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

The order of the matrix A (n 1).

v, x

Arrays, size (n) each.

v is a workspace array.

x is used as input after an intermediate return.

isgn

Workspace array, size (n), used with real flavors only.

est

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

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,

AT*x, if kase = 2 (for real flavors),

AH*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.