Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 6/24/2024
Public

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

Document Table of Contents

?her2k

Performs a Hermitian rank-2k update.

Syntax

call cher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)

call zher2k(uplo, trans, n, k, alpha, a, lda, b, ldb, beta, c, ldc)

call her2k(a, b, c [,uplo][,trans] [,alpha][,beta])

Include Files

  • mkl.fi, blas.f90

Description

The ?her2k routines perform a rank-2k matrix-matrix operation using general matrices A and B and a Hermitian matrix C. The operation is defined as

C := alpha*A*BH + conjg(alpha)B*AH + beta*C

or

C := alpha*AH*B + conjg(alpha)*BH*A + beta*C

where:

alpha is a scalar and beta is a real scalar.

C is an n-by-n Hermitian matrix.

A and B are n-by-k matrices in the first case and k-by-n matrices in the second case.

Input Parameters

uplo

CHARACTER*1. Specifies whether the upper or lower triangular part of the array c is used.

If uplo = 'U' or 'u' , then the upper triangular of the array c is used.

If uplo = 'L' or 'l' , then the low triangular of the array c is used.

trans

CHARACTER*1. Specifies the operation:

iftrans= 'N' or 'n', then C:=alpha*A*BH + alpha*B*AH + beta*C;

if trans= 'C' or 'c', then C:=alpha*AH*B + alpha*BH*A + beta*C.

n

INTEGER. Specifies the order of the matrix C. The value of n must be at least zero.

k

INTEGER. With trans= 'N' or 'n' specifies the number of columns of the matrix A, and with trans= 'C' or 'c', k specifies the number of rows of the matrix A.

The value of k must be at least equal to zero.

alpha

COMPLEX for cher2k

DOUBLE COMPLEX for zher2k

Specifies the scalar alpha.

a

COMPLEX for cher2k

DOUBLE COMPLEX for zher2k

Array, size (lda, ka), where ka is k when trans= 'N' or 'n', and is n otherwise. Before entry with trans= 'N' or 'n', the leading n-by-k part of the array a must contain the matrix A, otherwise the leading k-by-n part of the array a must contain the matrix A.

lda

INTEGER. Specifies the leading dimension of a as declared in the calling (sub)program.

When trans= 'N' or 'n'trans= 'N' or 'n', then lda must be at least max(1, n), otherwise lda must be at least max(1, k).

beta

REAL for cher2k

DOUBLE PRECISION for zher2k

Specifies the scalar beta.

b

COMPLEX for cher2k

DOUBLE COMPLEX for zher2k

Array, size (ldb, kb), where kb is k when trans= 'N' or 'n', and is n otherwise. Before entry with trans= 'N' or 'n', the leading n-by-k part of the array b must contain the matrix B, otherwise the leading k-by-n part of the array b must contain the matrix B.

ldb

INTEGER. Specifies the leading dimension of a as declared in the calling (sub)program.

When trans= 'N' or 'n', then ldb must be at least max(1, n), otherwise ldb must be at least max(1, k).

c

COMPLEX for cher2k

DOUBLE COMPLEX for zher2k

Array, size ldc by n.

Before entry withuplo = 'U' or 'u', the leading n-by-n upper triangular part of the array c must contain the upper triangular part of the Hermitian matrix and the strictly lower triangular part of c is not referenced.

Before entry with uplo = 'L' or 'l', the leading n-by-n lower triangular part of the array c must contain the lower triangular part of the Hermitian matrix and the strictly upper triangular part of c is not referenced.

The imaginary parts of the diagonal elements need not be set, they are assumed to be zero.

ldc

INTEGER. Specifies the leading dimension of c as declared in the calling (sub)program. The value of ldc must be at least max(1, n).

Output Parameters

c

With uplo = 'U' or 'u', the upper triangular part of the array c is overwritten by the upper triangular part of the updated matrix.

With uplo = 'L' or 'l', the lower triangular part of the array c is overwritten by the lower triangular part of the updated matrix.

The imaginary parts of the diagonal elements are set to zero.

BLAS 95 Interface Notes

Routines in Fortran 95 interface have fewer arguments in the calling sequence than their FORTRAN 77 counterparts. For general conventions applied to skip redundant or reconstructible arguments, see BLAS 95 Interface Conventions.

Specific details for the routine her2k interface are the following:

a

Holds the matrix A of size (ma,ka) where

ka = k if trans = 'N',

ka = n otherwise,

ma = n if trans = 'N',

ma = k otherwise.

b

Holds the matrix B of size (mb,kb) where

kb = k if trans = 'N',

kb = n otherwise,

mb = n if trans = 'N',

mb = k otherwise.

c

Holds the matrix C of size (n,n).

uplo

Must be 'U' or 'L'. The default value is 'U'.

trans

Must be 'N' or 'C'. The default value is 'N'.

alpha

The default value is 1.

beta

The default value is 0.