?larfg

Generates an elementary reflector (Householder matrix).

Syntax

call slarfg( n, alpha, x, incx, tau )

call dlarfg( n, alpha, x, incx, tau )

call clarfg( n, alpha, x, incx, tau )

call zlarfg( n, alpha, x, incx, tau )

C:

lapack_int LAPACKE_<?>larfg (lapack_int n, <datatype> * alpha, <datatype> * x, lapack_int incx, <datatype> * tau);

Include Files

  • Fortran: mkl.fi
  • C: mkl.h

Description

The routine ?larfg generates a real/complex elementary reflector H of order n, such that

for real flavors and

Equation for complex flavors,

where alpha and beta are scalars (with beta real for all flavors), and x is an (n-1)-element real/complex vector. H is represented in the form

for real flavors and

Equation for complex flavors,

where tau is a real/complex scalar and v is a real/complex (n-1)-element vector, respectively. Note that for clarfg/zlarfg, H is not Hermitian.

If the elements of x are all zero (and, for complex flavors, alpha is real), then tau = 0 and H is taken to be the unit matrix.

Otherwise, 1 ≤ tau ≤ 2 (for real flavors), or

1 ≤ Re(tau) ≤ 2 and abs(tau-1) ≤ 1 (for complex flavors).

Input Parameters

The data types are given for the Fortran interface. A <datatype> placeholder, if present, is used for the C interface data types in the C interface section above. See C Interface Conventions for the C interface principal conventions and type definitions.

n

INTEGER. The order of the elementary reflector.

alpha

REAL for slarfg

DOUBLE PRECISION for dlarfg

COMPLEX for clarfg

DOUBLE COMPLEX for zlarfg On entry, the value alpha.

x

REAL for slarfg

DOUBLE PRECISION for dlarfg

COMPLEX for clarfg

DOUBLE COMPLEX for zlarfg

Array, DIMENSION (1+(n-2)*abs(incx)).

On entry, the vector x.

incx

INTEGER.

The increment between elements of x. incx > 0.

Output Parameters

alpha

On exit, it is overwritten with the value beta.

x

On exit, it is overwritten with the vector v.

tau

REAL for slarfg

DOUBLE PRECISION for dlarfg

COMPLEX for clarfg

DOUBLE COMPLEX for zlarfg The value tau.

有关编译器优化的更完整信息,请参阅优化通知