caffe中openblas函数

本文汇总了 Caffe 中使用 OpenBLAS 的关键函数,包括 cblas_?axpby、cblas_?gemv、cblas_?scal 和 cblas_?gemm,详细解释了它们的功能、参数及用途。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值