Developer Reference

Contents

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:
if
trans
=
CblasNoTrans
, then
y
:=
alpha
*
A
*
x
+
beta
*
y
;
if
trans
=
CblasTrans
, then
y
:=
alpha
*
A
'*
x
+
beta
*
y
;
if
trans
=
CblasConjTrans
, then
y
:=
alpha
*conjg(
A
')*
x
+
beta
*
y
.
m
Specifies the number of rows of the matrix
A
. The value of
m
must be at least zero.
n
Specifies the number of columns of the matrix
A
. The value of
n
must be at least zero.
alpha
Specifies the scalar
alpha
.
a
Array, size
lda
*
k
.
For
Layout
=
CblasColMajor
,
k
is
n
. Before entry, the leading
m
-by-
n
part of the array
a
must contain the matrix
A
.
For
Layout
=
CblasRowMajor
,
k
is
m
. Before entry, the leading
n
-by-
m
part of the array
a
must contain the matrix
A
.
lda
Specifies the leading dimension of
a
as declared in the calling (sub)program.
For
Layout
=
CblasColMajor
, the value of
lda
must be at least
max(1,
m
)
.
For
Layout
=
CblasRowMajor
, the value of
lda
must be at least
max(1,
n
)
.
x
Array, size at least
(1+(
n
-1)*abs(
incx
))
when
trans
=
CblasNoTrans
and at least
(1+(
m
- 1)*abs(
incx
))
otherwise. Before entry, the incremented array
x
must contain the vector
x
.
incx
Specifies the increment for the elements of
x
.
The value of
incx
must not be zero.
beta
Specifies the scalar
beta
. When
beta
is set to zero, then
y
need not be set on input.
y
Array, size at least
(1 +(
m
- 1)*abs(
incy
))
when
trans
=
CblasNoTrans
and at least
(1 +(
n
- 1)*abs(
incy
))
otherwise. Before entry with non-zero
beta
, the incremented array
y
must contain the vector
y
.
incy
Specifies the increment for the elements of
y
.
The value of
incy
must not be zero.
Output Parameters
y
Updated vector
y
.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.