cblas_?gemv
cblas_?gemv
Computes a matrix-vector product using a general matrix.
Syntax
void
cblas_sgemv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
m
,
const
MKL_INT
n
,
const
float
alpha
,
const
float
*a
,
const
MKL_INT
lda
,
const
float
*x
,
const
MKL_INT
incx
,
const
float
beta
,
float
*y
,
const
MKL_INT
incy
);
void
cblas_dgemv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
m
,
const
MKL_INT
n
,
const
double
alpha
,
const
double
*a
,
const
MKL_INT
lda
,
const
double
*x
,
const
MKL_INT
incx
,
const
double
beta
,
double
*y
,
const
MKL_INT
incy
);
void
cblas_cgemv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
m
,
const
MKL_INT
n
,
const
void
*alpha
,
const
void
*a
,
const
MKL_INT
lda
,
const
void
*x
,
const
MKL_INT
incx
,
const
void
*beta
,
void
*y
,
const
MKL_INT
incy
);
void
cblas_zgemv
(
const
CBLAS_LAYOUT
Layout
,
const
CBLAS_TRANSPOSE
trans
,
const
MKL_INT
m
,
const
MKL_INT
n
,
const
void
*alpha
,
const
void
*a
,
const
MKL_INT
lda
,
const
void
*x
,
const
MKL_INT
incx
,
const
void
*beta
,
void
*y
,
const
MKL_INT
incy
);
Include Files
- mkl.h
Description
The
?gemv
routines perform a matrix-vector operation defined as: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,A
is an m
-by-n
matrix.Input Parameters
- Layout
- Specifies whether two-dimensional array storage is row-major (CblasRowMajor) or column-major (CblasColMajor).
- trans
- Specifies the operation:iftrans=CblasNoTrans, then;y:=alpha*A*x+beta*yiftrans=CblasTrans, then;y:=alpha*A'*x+beta*yiftrans=CblasConjTrans, then.y:=alpha*conjg(A')*x+beta*y
- m
- Specifies the number of rows of the matrixA. The value ofmmust be at least zero.
- n
- Specifies the number of columns of the matrixA. The value ofnmust be at least zero.
- alpha
- Specifies the scalaralpha.
- a
- Array, sizelda*k.ForLayout=CblasColMajor,kisn. Before entry, the leadingm-by-npart of the arrayamust contain the matrixA.ForLayout=CblasRowMajor,kism. Before entry, the leadingn-by-mpart of the arrayamust contain the matrixA.
- lda
- Specifies the leading dimension ofaas declared in the calling (sub)program.ForLayout=CblasColMajor, the value ofldamust be at leastmax(1,.m)ForLayout=CblasRowMajor, the value ofldamust be at leastmax(1,.n)
- x
- Array, size at least(1+(whenn-1)*abs(incx))trans=CblasNoTransand at least(1+(otherwise. Before entry, the incremented arraym- 1)*abs(incx))xmust contain the vectorx.
- incx
- Specifies the increment for the elements ofx.The value ofincxmust not be zero.
- beta
- Specifies the scalarbeta. Whenbetais set to zero, thenyneed not be set on input.
- y
- Array, size at least(1 +(whenm- 1)*abs(incy))trans=CblasNoTransand at least(1 +(otherwise. Before entry with non-zeron- 1)*abs(incy))beta, the incremented arrayymust contain the vectory.
- incy
- Specifies the increment for the elements ofy.The value ofincymust not be zero.
Output Parameters
- y
- Updated vectory.