There are two prototypes of syr2k
available, please see below.
syr2k( const Scalar >, const MatrixA& a, const MatrixB& b, const Scalar >, MatrixC& c );
syr2k( const Scalar alpha, const MatrixA& a, const MatrixB& b, const Scalar beta, MatrixC& c );
syr2k
(short for symmetric
rank-2k update) provides a C++ interface to BLAS routines SSYR2K, DSYR2K,
CSYR2K, and ZSYR2K. syr2k
performs one of the symmetric rank 2k operations
C := alpha*A*B' + alpha*B*A' + beta*C,
or
C := alpha*A'*B + alpha*B'*A + beta*C,
where alpha and beta are scalars, C is an n by n symmetric matrix and A and B are n by k matrices in the first case and k by n matrices 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.92. Dispatching of syr2k.
Value type of MatrixA |
BLAS routine |
CBLAS routine |
CUBLAS routine |
---|---|---|---|
|
SSYR2K |
cblas_ssyr2k |
cublasSsyr2k |
|
DSYR2K |
cblas_dsyr2k |
cublasDsyr2k |
|
CSYR2K |
cblas_csyr2k |
cublasCsyr2k |
|
ZSYR2K |
cblas_zsyr2k |
Unavailable |
The original routines SSYR2K, DSYR2K, CSYR2K, and ZSYR2K have twelve
arguments, whereas syr2k
requires five arguments.
Defined in header boost/numeric/bindings/blas/level3/syr2k.hpp
.
Parameters
The definition of term 1
The definition of term 2
The definition of term 3.
Definitions may contain paragraphs.
#include <boost/numeric/bindings/blas/level3/syr2k.hpp> using namespace boost::numeric::bindings; blas::syr2k( x, y, z );
this will output
[5] 0 1 2 3 4 5