##### syrk

###### Prototype

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

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

    syrk( const Scalar alpha, const MatrixA& a, const Scalar beta,
            MatrixC& c );

###### Description

`syrk` (short for symmetric rank-k update) provides a C++ interface to BLAS routines SSYRK, DSYRK, CSYRK, and ZSYRK. `syrk` performs one of the symmetric rank k operations

C := alpha*A*A' + beta*C,

or

C := alpha*A'*A + beta*C,

where alpha and beta are scalars, C is an n by n symmetric 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.94. Dispatching of syrk.

Value type of MatrixA | BLAS routine | CBLAS routine | CUBLAS routine
--- | --- | --- | ---
`float` | SSYRK | cblas_ssyrk | cublasSsyrk
`double` | DSYRK | cblas_dsyrk | cublasDsyrk
`complex<float>` | CSYRK | cblas_csyrk | cublasCsyrk
`complex<double>` | ZSYRK | cblas_zsyrk | cublasZsyrk

The original routines SSYRK, DSYRK, CSYRK, and ZSYRK have ten arguments, whereas `syrk` requires four arguments.

Table 1.95. Deduction of arguments of syrk.

###### Definition

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

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

this will output

    [5] 0 1 2 3 4 5

###### Notes

###### See Also

- Originating Fortran source files ssyrk.f, dsyrk.f, csyrk.f, and zsyrk.f at Netlib.