PrevUpHomeNext
hpr2
Prototype

There are two prototypes of hpr2 available, please see below.

hpr2( const Scalar >, const VectorX& x, const VectorY& y, MatrixAP& ap );

hpr2( const Scalar alpha, const VectorX& x, const VectorY& y,
        MatrixAP& ap );

Description

hpr2 (short for hermitian, packed, rank-2 update) provides a C++ interface to BLAS routines SSPR2, DSPR2, CHPR2, and ZHPR2. hpr2 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, supplied in packed form.

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.52. Dispatching of hpr2.

Value type of VectorX

BLAS routine

CBLAS routine

CUBLAS routine

float

SSPR2

cblas_sspr2

cublasSspr2

double

DSPR2

cblas_dspr2

Unavailable

complex<float>

CHPR2

cblas_chpr2

cublasChpr2

complex<double>

ZHPR2

cblas_zhpr2

Unavailable


The original routines SSPR2, DSPR2, CHPR2, and ZHPR2 have eight arguments, whereas hpr2 requires four arguments.

Table 1.53. Deduction of arguments of hpr2.


Definition

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

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

this will output

[5] 0 1 2 3 4 5

Notes
See Also

PrevUpHomeNext