cuBLAS Level-2 Function
Level-2进行向量与矩阵的操作
- cublas
gbmv()
cublasStatus_t cublasSgbmv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n, int kl, int ku,
const float *alpha,
const float *A, int lda,
const float *x, int incx,
const float *beta,
float *y, int incy)
cublasStatus_t cublasDgbmv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n, int kl, int ku,
const double *alpha,
const double *A, int lda,
const double *x, int incx,
const double *beta,
double *y, int incy)
cublasStatus_t cublasCgbmv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n, int kl, int ku,
const cuComplex *alpha,
const cuComplex *A, int lda,
const cuComplex *x, int incx,
const cuComplex *beta,
cuComplex *y, int incy)
cublasStatus_t cublasZgbmv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n, int kl, int ku,
const cuDoubleComplex *alpha,
const cuDoubleComplex *A, int lda,
const cuDoubleComplex *x, int incx,
const cuDoubleComplex *beta,
cuDoubleComplex *y, int incy)
进行如下操作:
其中为带状矩阵,它有个subdiagonals,个superdiagonals,对于矩阵:
参数如图:
- cublas
gemv()
cublasStatus_t cublasSgemv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n,
const float *alpha,
const float *A, int lda,
const float *x, int incx,
const float *beta,
float *y, int incy)
cublasStatus_t cublasDgemv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n,
const double *alpha,
const double *A, int lda,
const double *x, int incx,
const double *beta,
double *y, int incy)
cublasStatus_t cublasCgemv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n,
const cuComplex *alpha,
const cuComplex *A, int lda,
const cuComplex *x, int incx,
const cuComplex *beta,
cuComplex *y, int incy)
cublasStatus_t cublasZgemv(cublasHandle_t handle, cublasOperation_t trans,
int m, int n,
const cuDoubleComplex *alpha,
const cuDoubleComplex *A, int lda,
const cuDoubleComplex *x, int incx,
const cuDoubleComplex *beta,
cuDoubleComplex *y, int incy)
该函数计算,其中为维的按列存储的矩阵。
- cublas
ger()
cublasStatus_t cublasSger(cublasHandle_t handle, int m, int n,
const float *alpha,
const float *x, int incx,
const float *y, int incy,
float *A, int lda)
cublasStatus_t cublasDger(cublasHandle_t handle, int m, int n,
const double *alpha,
const double *x, int incx,
const double *y, int incy,
double *A, int lda)
cublasStatus_t cublasCgeru(cublasHandle_t handle, int m, int n,
const cuComplex *alpha,
const cuComplex *x, int incx,
const cuComplex *y, int incy,
cuComplex *A, int lda)
cublasStatus_t cublasCgerc(cublasHandle_t handle, int m, int n,
const cuComplex *alpha,
const cuComplex *x, int incx,
const cuComplex *y, int incy,
cuComplex *A, int lda)
cublasStatus_t cublasZgeru(cublasHandle_t handle, int m, int n,
const cuDoubleComplex *alpha,
const cuDoubleComplex *x, int incx,
const cuDoubleComplex *y, int incy,
cuDoubleComplex *A, int lda)
cublasStatus_t cublasZgerc(cublasHandle_t handle, int m, int n,
const cuDoubleComplex *alpha,
const cuDoubleComplex *x, int incx,
const cuDoubleComplex *y, int incy,
cuDoubleComplex *A, int lda)
- cublas
sbmv
cublasStatus_t cublasSsbmv(cublasHandle_t handle, cublasFillMode_t uplo,
int n, int k, const float *alpha,
const float *A, int lda,
const float *x, int incx,
const float *beta, float *y, int incy)
cublasStatus_t cublasDsbmv(cublasHandle_t handle, cublasFillMode_t uplo,
int n, int k, const double *alpha,
const double *A, int lda,
const double *x, int incx,
const double *beta, double *y, int incy)
计算对称带状矩阵和向量相乘:
其中是一个的对称带状矩阵,拥有个subdiagonals和superdiagonals。
- cublas
spmv()
cublasStatus_t cublasSspmv(cublasHandle_t handle, cublasFillMode_t uplo,
int n, const float *alpha, const float *AP,
const float *x, int incx, const float *beta,
float *y, int incy)
cublasStatus_t cublasDspmv(cublasHandle_t handle, cublasFillMode_t uplo,
int n, const double *alpha, const double *AP,
const double *x, int incx, const double *beta,
double *y, int incy)
计算对称packed矩阵向量相乘