PrevUpHomeNext
gemv
Prototype

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

gemv( const Scalar >, const MatrixA& a, const VectorX& x,
        const Scalar >, VectorY& y );

gemv( const Scalar alpha, const MatrixA& a, const VectorX& x,
        const Scalar beta, VectorY& y );

Description

gemv (short for generic matrix-vector operation) provides a C++ interface to BLAS routines SGEMV, DGEMV, CGEMV, and ZGEMV. gemv performs one of the matrix-vector operations

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

y := alpha*conjg( A' )*x + beta*y,

where alpha and beta are scalars, x and y are vectors and A is an m by n matrix.

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.34. Dispatching of gemv.

Value type of MatrixA

BLAS routine

CBLAS routine

CUBLAS routine

float

SGEMV

cblas_sgemv

cublasSgemv

double

DGEMV

cblas_dgemv

cublasDgemv

complex<float>

CGEMV

cblas_cgemv

cublasCgemv

complex<double>

ZGEMV

cblas_zgemv

cublasZgemv


The original routines SGEMV, DGEMV, CGEMV, and ZGEMV have eleven arguments, whereas gemv requires five arguments.

Table 1.35. Deduction of arguments of gemv.


Definition

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

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

this will output

[5] 0 1 2 3 4 5

Notes
See Also

PrevUpHomeNext