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 );
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 |
|---|---|---|---|
|
|
SGEMV |
cblas_sgemv |
cublasSgemv |
|
|
DGEMV |
cblas_dgemv |
cublasDgemv |
|
|
CGEMV |
cblas_cgemv |
cublasCgemv |
|
|
ZGEMV |
cblas_zgemv |
cublasZgemv |
The original routines SGEMV, DGEMV, CGEMV, and ZGEMV have eleven arguments,
whereas gemv requires
five arguments.
Defined in header boost/numeric/bindings/blas/level2/gemv.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/gemv.hpp> using namespace boost::numeric::bindings; blas::gemv( x, y, z );
this will output
[5] 0 1 2 3 4 5