PrevUpHomeNext
spmv
Prototype

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

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

Description

spmv (short for symmetric, packed, matrix-vector operation) provides a C++ interface to BLAS routines SSPMV and DSPMV. spmv performs the matrix-vector operation

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

where alpha and beta are scalars, 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 MatrixAP. The type of values is obtained through the value_type meta-function typename value_type<MatrixAP>::type. Table X below illustrates to which specific routine this dispatching will take place.

Table 1.58. Dispatching of spmv.

Value type of MatrixAP

BLAS routine

CBLAS routine

CUBLAS routine

float

SSPMV

cblas_sspmv

cublasSspmv

double

DSPMV

cblas_dspmv

Unavailable


The original routines SSPMV and DSPMV have nine arguments, whereas spmv requires five arguments.

Table 1.59. Deduction of arguments of spmv.


Definition

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

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

this will output

[5] 0 1 2 3 4 5

Notes
See Also

PrevUpHomeNext