caffe中openblas函数说明汇总
- 为了方便查阅将官网中的说明直接拷贝过来
cblas_?axpby
Scales two vectors, adds them to one another and stores result in the vector.
Syntax
void cblas_saxpby (const MKL_INT n, const float a, const float *x, const MKL_INT incx, const float b, float *y, const MKL_INT incy);
void cblas_daxpby (const MKL_INT n, const double a, const double *x, const MKL_INT incx, const double b, double *y, const MKL_INT incy);
void cblas_caxpby (const MKL_INT n, const void *a, const void *x, const MKL_INT incx, const void *b, void *y, const MKL_INT incy);
void cblas_zaxpby (const MKL_INT n, const void *a, const void *x, const MKL_INT incx, const void *b, void *y, const MKL_INT incy);
Include Files
mkl.h
Description
The ?axpby routines perform a vector-vector operation defined as
y := a*x + b*y
where:
a and b are scalars
x and y are vectors each with n elements.
Input Parameters
n
Specifies the number of elements in vectors x and y.
a
Specifies the scalar a.
x
Array, size at least (1 + (n-1)*abs(incx)).
incx
Specifies the increment for the elements of x.
b
Specifies the scalar b.
y
Array, size at least (1 + (n-1)*abs(incy)).
incy
Specifies the increment for the elements of y.
Output Parameters
y
Contains the updated vector y.
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, cons

本文汇总了 Caffe 中使用 OpenBLAS 的关键函数,包括 cblas_?axpby、cblas_?gemv、cblas_?scal 和 cblas_?gemm,详细解释了它们的功能、参数及用途。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



