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 );
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 |
---|---|---|---|
|
SSYR2 |
cblas_ssyr2 |
cublasSsyr2 |
|
DSYR2 |
cblas_dsyr2 |
Unavailable |
|
CHER2 |
cblas_cher2 |
cublasCher2 |
|
ZHER2 |
cblas_zher2 |
Unavailable |
The original routines SSYR2, DSYR2, CHER2, and ZHER2 have nine arguments,
whereas her2
requires
four arguments.
Defined in header boost/numeric/bindings/blas/level2/her2.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/level2/her2.hpp> using namespace boost::numeric::bindings; blas::her2( x, y, z );
this will output
[5] 0 1 2 3 4 5