BLAS function syntax

The prototypes for the sgemv and dgemv functions are as follows:

void sgemv(const char *trans, int *m, int *n, float *alpha,
					void *a, int *lda, void *x, int *incx, 
					float *beta, void *y, int *incy);
void dgemv(const char *trans, int *m, int *n, double *alpha,
					void *a, int *lda, void *x, int *incx,
				  double *beta, void *y, int *incy);

The parameters are as follows:

trans
is a single character indicating the form of the input matrix a, where:
m
represents: The number of rows must be greater than or equal to zero, and less than the leading dimension of the matrix a (specified in lda)
n
represents: The number of columns must be greater than or equal to zero.
alpha
is the scaling constant for matrix a
a
is the input matrix of float (for sgemv) or double (for dgemv) values
lda
is the leading dimension of the array specified by a. The leading dimension must be greater than zero. The leading dimension must be greater than or equal to 1 and greater than or equal to the value specified in m.
x
is the input vector of float (for sgemv) or double (for dgemv) values.
incx
is the stride for vector x. It can have any value.
beta
is the scaling constant for vector y
y
is the output vector of float (for sgemv) or double (for dgemv) values.
incy
is the stride for vector y. It must not be zero.
Note:
Vector y must have no common elements with matrix a or vector x; otherwise, the results are unpredictable.

The prototypes for the sgemm and dgemm functions are as follows:

void sgemm(const char *transa, const char *transb,
   int *l, int *n, int *m, float *alpha,
   const void *a, int *lda, void *b, int *ldb,
   float *beta, void *c, int *ldc);
void dgemm(const char *transa, const char *transb,
   int *l, int *n, int *m, double *alpha, 
   const void *a, int *lda, void *b, int *ldb, 
   double *beta, void *c, int *ldc);

The parameters are as follows:

transa
is a single character indicating the form of the input matrix a, where:
transb
is a single character indicating the form of the input matrix b, where:
l
represents the number of rows in output matrix c. The number of rows must be greater than or equal to zero, and less than the leading dimension of c.
n
represents the number of columns in output matrix c. The number of columns must be greater than or equal to zero.
m
represents: and: m must be greater than or equal to zero.
alpha
is the scaling constant for matrix a
a
is the input matrix a of float (for sgemm) or double (for dgemm) values
lda
is the leading dimension of the array specified by a. The leading dimension must be greater than zero. If transa is specified as 'N' or 'n', the leading dimension must be greater than or equal to 1. If transa is specified as 'T' or 't', the leading dimension must be greater than or equal to the value specified in m.
b
is the input matrix b of float (for sgemm) or double (for dgemm) values.
ldb
is the leading dimension of the array specified by b. The leading dimension must be greater than zero. If transb is specified as 'N' or 'n', the leading dimension must be greater than or equal to the value specified in m. If transa is specified as 'T' or 't', the leading dimension must be greater than or equal to the value specified in n.
beta
is the scaling constant for matrix c
c
is the output matrix c of float (for sgemm) or double (for dgemm) values.
ldc
is the leading dimension of the array specified by c. The leading dimension must be greater than zero. If transb is specified as 'N' or 'n', the leading dimension must be greater than or equal to 0 and greater than or equal to the value specified in l.
Note:
Matrix c must have no common elements with matrices a or b; otherwise, the results are unpredictable.