##### her2

###### Prototype

There are two prototypes of `her2` available, please see below.

    her2( const Scalar >, const VectorX& x, const VectorY& y, MatrixA& a );

    her2( const Scalar alpha, const VectorX& x, const VectorY& y,
            MatrixA& a );

###### Description

`her2` (short for hermitian rank-2 update) provides a C++ interface to BLAS routines SSYR2, DSYR2, CHER2, and ZHER2. `her2` performs the hermitian rank 2 operation

A := alpha*x*conjg( y' ) + conjg( alpha )*y*conjg( x' ) + A,

where alpha is a scalar, x and y are n element vectors and A is an n by n hermitian matrix.

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

Table 1.46. Dispatching of her2.

Value type of VectorX | BLAS routine | CBLAS routine | CUBLAS routine
--- | --- | --- | ---
`float` | SSYR2 | cblas_ssyr2 | cublasSsyr2
`double` | DSYR2 | cblas_dsyr2 | Unavailable
`complex<float>` | CHER2 | cblas_cher2 | cublasCher2
`complex<double>` | ZHER2 | cblas_zher2 | Unavailable

The original routines SSYR2, DSYR2, CHER2, and ZHER2 have nine arguments, whereas `her2` requires four arguments.

Table 1.47. Deduction of arguments of her2.

###### Definition

Defined in header `boost/numeric/bindings/blas/level2/her2.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/level2/her2.hpp>
    using namespace boost::numeric::bindings;

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

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files ssyr2.f, dsyr2.f, cher2.f, and zher2.f at Netlib.