?larf

Applies an elementary reflector to a general rectangular matrix.

Syntax

call slarf( side, m, n, v, incv, tau, c, ldc, work )

call dlarf( side, m, n, v, incv, tau, c, ldc, work )

call clarf( side, m, n, v, incv, tau, c, ldc, work )

call zlarf( side, m, n, v, incv, tau, c, ldc, work )

• mkl.fi

Description

The routine applies a real/complex elementary reflector H to a real/complex m-by-n matrix C, from either the left or the right. H is represented in one of the following forms:

• H = I - tau*v*vT

where tau is a real scalar and v is a real vector.

If tau = 0, then H is taken to be the unit matrix.

• H = I - tau*v*vH

where tau is a complex scalar and v is a complex vector.

If tau = 0, then H is taken to be the unit matrix. For clarf/zlarf, to apply HH (the conjugate transpose of H), supply conjg(tau) instead of tau.

Input Parameters

side

CHARACTER*1.

If side = 'L': form H*C

If side = 'R': form C*H.

m

INTEGER. The number of rows of the matrix C.

n

INTEGER. The number of columns of the matrix C.

v

REAL for slarf

DOUBLE PRECISION for dlarf

COMPLEX for clarf

DOUBLE COMPLEX for zlarf

Array, DIMENSION

(1 + (m-1)*abs(incv)) if side = 'L' or

(1 + (n-1)*abs(incv)) if side = 'R'. The vector v in the representation of H. v is not used if tau = 0.

incv

INTEGER. The increment between elements of v.

incv 0.

tau

REAL for slarf

DOUBLE PRECISION for dlarf

COMPLEX for clarf

DOUBLE COMPLEX for zlarf

The value tau in the representation of H.

c

REAL for slarf

DOUBLE PRECISION for dlarf

COMPLEX for clarf

DOUBLE COMPLEX for zlarf

Array, DIMENSION (ldc,n).

On entry, the m-by-n matrix C.

ldc

INTEGER. The leading dimension of the array c.

ldc max(1,m).

work

REAL for slarf

DOUBLE PRECISION for dlarf

COMPLEX for clarf

DOUBLE COMPLEX for zlarf

Workspace array, DIMENSION

(n) if side = 'L' or

(m) if side = 'R'.

Output Parameters

c

On exit, C is overwritten by the matrix H*C if side = 'L', or C*H if side = 'R'.

For more complete information about compiler optimizations, see our Optimization Notice.