##### herk

###### Prototype

There is one prototype of `herk` available, please see below.

    herk( const Scalar >, const MatrixA& a, const Scalar >, MatrixC& c );

###### Description

`herk` (short for hermitian rank-k update) provides a C++ interface to BLAS routines SSYRK, DSYRK, CHERK, and ZHERK. `herk` performs one of the hermitian rank k operations

C := alpha*A*conjg( A' ) + beta*C,

or

C := alpha*conjg( A' )*A + beta*C,

where alpha and beta are real scalars, C is an n by n hermitian matrix and A is an n by k matrix in the first case and a k by n matrix in the second case.

The selection of the BLAS routine is done during compile-time, and is determined by the type of values contained in type `MatrixA`. The type of values is obtained through the `value_type` meta-function `typename value_type<MatrixA>::type`. Table X below illustrates to which specific routine this dispatching will take place.

Table 1.88. Dispatching of herk.

Value type of MatrixA | BLAS routine | CBLAS routine | CUBLAS routine
--- | --- | --- | ---
`float` | SSYRK | cblas_ssyrk | cublasSsyrk
`double` | DSYRK | cblas_dsyrk | cublasDsyrk
`complex<float>` | CHERK | cblas_cherk | cublasCherk
`complex<double>` | ZHERK | cblas_zherk | Unavailable

The original routines SSYRK, DSYRK, CHERK, and ZHERK have ten arguments, whereas `herk` requires four arguments.

Table 1.89. Deduction of arguments of herk.

###### Definition

Defined in header `boost/numeric/bindings/blas/level3/herk.hpp`.

###### Parameters or Requirements on Types

Parameters

MatrixA

  The definition of term 1

MatrixB

  The definition of term 2

MatrixC

  The definition of term 3.

  Definitions may contain paragraphs.

###### Complexity

###### Example

    #include <boost/numeric/bindings/blas/level3/herk.hpp>
    using namespace boost::numeric::bindings;

    blas::herk( x, y, z );

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files ssyrk.f, dsyrk.f, cherk.f, and zherk.f at Netlib.