subroutine zher2k( uplo, trans, n, k, alpha, a, lda, b, ldb, $ beta, c, ldc ) * .. scalar arguments .. character*1 uplo, trans integer n, k, lda, ldb, ldc double precision beta complex*16 alpha * .. array arguments .. complex*16 a( lda, * ), b( ldb, * ), c( ldc, * ) * .. * * purpose * ======= * * zher2k performs one of the hermitian rank 2k operations * * c := alpha*a*conjg( b' ) + conjg( alpha )*b*conjg( a' ) + beta*c, * * or * * c := alpha*conjg( a' )*b + conjg( alpha )*conjg( b' )*a + beta*c, * * where alpha and beta are scalars with beta real, c is an n by n * hermitian matrix and a and b are n by k matrices in the first case * and k by n matrices in the second case. * * parameters * ========== * * uplo - character*1. * on entry, uplo specifies whether the upper or lower * triangular part of the array c is to be referenced as * follows: * * uplo = 'u' or 'u' only the upper triangular part of c * is to be referenced. * * uplo = 'l' or 'l' only the lower triangular part of c * is to be referenced. * * unchanged on exit. * * trans - character*1. * on entry, trans specifies the operation to be performed as * follows: * * trans = 'n' or 'n' c := alpha*a*conjg( b' ) + * conjg( alpha )*b*conjg( a' ) + * beta*c. * * trans = 'c' or 'c' c := alpha*conjg( a' )*b + * conjg( alpha )*conjg( b' )*a + * beta*c. * * unchanged on exit. * * n - integer. * on entry, n specifies the order of the matrix c. n must be * at least zero. * unchanged on exit. * * k - integer. * on entry with trans = 'n' or 'n', k specifies the number * of columns of the matrices a and b, and on entry with * trans = 'c' or 'c', k specifies the number of rows of the * matrices a and b. k must be at least zero. * unchanged on exit. * * alpha - complex*16 . * on entry, alpha specifies the scalar alpha. * unchanged on exit. * * a - complex*16 array of dimension ( 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. * unchanged on exit. * * lda - integer. * on entry, lda specifies the first dimension of a as declared * in the calling (sub) program. when trans = 'n' or 'n' * then lda must be at least max( 1, n ), otherwise lda must * be at least max( 1, k ). * unchanged on exit. * * b - complex*16 array of dimension ( 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. * unchanged on exit. * * ldb - integer. * on entry, ldb specifies the first dimension of b 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 ). * unchanged on exit. * * beta - double precision. * on entry, beta specifies the scalar beta. * unchanged on exit. * * c - complex*16 array of dimension ( ldc, n ). * before entry with uplo = '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. on exit, the * upper triangular part of the array c is overwritten by the * upper triangular part of the updated matrix. * 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. on exit, the * lower triangular part of the array c is overwritten by the * lower triangular part of the updated matrix. * note that the imaginary parts of the diagonal elements need * not be set, they are assumed to be zero, and on exit they * are set to zero. * * ldc - integer. * on entry, ldc specifies the first dimension of c as declared * in the calling (sub) program. ldc must be at least * max( 1, n ). * unchanged on exit. * * * level 3 blas routine. * * -- written on 8-february-1989. * jack dongarra, argonne national laboratory. * iain duff, aere harwell. * jeremy du croz, numerical algorithms group ltd. * sven hammarling, numerical algorithms group ltd. *