PrevUpHomeNext
spr2
Prototype

There is one prototype of spr2 available, please see below.

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

Description

spr2 (short for symmetric, packed, rank-2 update) provides a C++ interface to BLAS routines SSPR2 and DSPR2. spr2 performs the symmetric rank 2 operation

A := alpha*x*y' + alpha*y*x' + A,

where alpha is a scalar, x and y are n element vectors and A is an n by n symmetric 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.60. Dispatching of spr2.

Value type of VectorX

BLAS routine

CBLAS routine

CUBLAS routine

float

SSPR2

cblas_sspr2

cublasSspr2

double

DSPR2

cblas_dspr2

Unavailable


The original routines SSPR2 and DSPR2 have eight arguments, whereas spr2 requires four arguments.

Table 1.61. Deduction of arguments of spr2.


Definition

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

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

this will output

[5] 0 1 2 3 4 5

Notes
See Also

PrevUpHomeNext