目录
cublasgbmv()
cublasspr()
cublasspr2()
cublasspmv()
cublasspr()
cublasgemvStridedBatched()
cublasgemvBatched()
cublashpr()
cublasher2()
cublashpmv()
cublashbmv()
cublashemv()
cublastrsv()
cublastrmv()
cublastpsv()
cublastpmv()
cublastbsv()
cublastbmv()
cublassyr2()
cublassyr()
cublassymv()
cublassbmv()
cublasger()
cublasgemv()
在本章中,我们将介绍执行矩阵-向量运算的二级基本线性代数子程序(BLAS2)函数。
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)
此函数支持64位整数接口。
此函数执行带状矩阵向量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix � lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix � . | |
alpha | host or device | input | |
AP | device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | input |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSspr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const float *x, int incx, float *AP)
cublasStatus_t cublasDspr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const double *x, int incx, double *AP)
此函数支持64位整数接口。
此函数执行压缩对称秩1更新
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix � lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix � . | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
AP | device | in/out | |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSspr2(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const float *x, int incx,const float *y, int incy, float *AP)
cublasStatus_t cublasDspr2(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const double *x, int incx,const double *y, int incy, double *AP)
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix � lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix � . | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
y | device | input |
|
incy | input | stride between consecutive elements of | |
AP | device | in/out | |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublas
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)
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
k | input | number of sub- and super-diagonals of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
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)
此函数支持64位整数接口。
此函数执行对称压缩矩阵-向量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix � lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix � . | |
alpha | host or device | input | |
AP | device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | input |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSspr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const float *x, int incx, float *AP)
cublasStatus_t cublasDspr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const double *x, int incx, double *AP)
此函数支持64位整数接口。
此函数执行压缩对称秩1更新
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix � lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix � . | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
AP | device | in/out | |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const float *alpha,const float *A, int lda,long long int strideA,const float *x, int incx,long long int stridex,const float *beta,float *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasDgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const double *alpha,const double *A, int lda,long long int strideA,const double *x, int incx,long long int stridex,const double *beta,double *yarray[], int incy,long long int stridey,int batchCount)
cublasStatus_t cublasCgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const cuComplex *alpha,const cuComplex *A, int lda,long long int strideA,const cuComplex *x, int incx,long long int stridex,const cuComplex *beta,cuComplex *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasZgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const cuDoubleComplex *alpha,const cuDoubleComplex *A, int lda,long long int strideA,const cuDoubleComplex *x, int incx,long long int stridex,const cuDoubleComplex *beta,cuDoubleComplex *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasHSHgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const float *alpha,const __half *A, int lda,long long int strideA,const __half *x, int incx,long long int stridex,const float *beta,__half *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasHSSgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const float *alpha,const __half *A, int lda,long long int strideA,const __half *x, int incx,long long int stridex,const float *beta,float *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasTSTgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const float *alpha,const __nv_bfloat16 *A, int lda,long long int strideA,const __nv_bfloat16 *x, int incx,long long int stridex,const float *beta,__nv_bfloat16 *y, int incy,long long int stridey,int batchCount)
cublasStatus_t cublasTSSgemvStridedBatched(cublasHandle_t handle,cublasOperation_t trans,int m, int n,const float *alpha,const __nv_bfloat16 *A, int lda,long long int strideA,const __nv_bfloat16 *x, int incx,long long int stridex,const float *beta,float *y, int incy,long long int stridey,int batchCount)
此函数支持64位整数接口。
此函数执行一批矩阵和向量的矩阵向量乘法。该批被认为是“均匀的,”即所有实例对于它们各自的A矩阵、x和y向量具有相同的维数(m,n)、前导维数(lda)、增量(incx,incy)和转置(trans).批处理的每个实例的输入矩阵A和向量x以及输出向量y位于相对于它们在前一实例中的位置的固定元素偏移量处。指向A矩阵的指针、第一个实例的x和y向量以及元素数量的偏移量(strideA、stridex和stridey)由用户传递给函数,这些元素确定输入矩阵和向量的位置,以及未来实例中的输出向量。
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
trans | input | operation op( | |
m | input | number of rows of matrix | |
n | input | number of columns of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store each matrix | |
strideA | input | Value of type long long int that gives the offset in number of elements between | |
x | device | input |
|
incx | input | stride of each one-dimensional array x[i]. | |
stridex | input | Value of type long long int that gives the offset in number of elements between | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride of each one-dimensional array y[i]. | |
stridey | input | Value of type long long int that gives the offset in number of elements between | |
batchCount | input | number of GEMVs to perform in the batch. |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
| the parameters |
| the function failed to launch on the GPU |
cublasStatus_t cublasSgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const float *alpha,const float *Aarray[], int lda,const float *xarray[], int incx,const float *beta,float *yarray[], int incy,int batchCount)
cublasStatus_t cublasDgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const double *alpha,const double *Aarray[], int lda,const double *xarray[], int incx,const double *beta,double *yarray[], int incy,int batchCount)
cublasStatus_t cublasCgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const cuComplex *alpha,const cuComplex *Aarray[], int lda,const cuComplex *xarray[], int incx,const cuComplex *beta,cuComplex *yarray[], int incy,int batchCount)
cublasStatus_t cublasZgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const cuDoubleComplex *alpha,const cuDoubleComplex *Aarray[], int lda,const cuDoubleComplex *xarray[], int incx,const cuDoubleComplex *beta,cuDoubleComplex *yarray[], int incy,int batchCount)
cublasStatus_t cublasHSHgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const float *alpha,const __half *Aarray[], int lda,const __half *xarray[], int incx,const float *beta,__half *yarray[], int incy,int batchCount)
cublasStatus_t cublasHSSgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const float *alpha,const __half *Aarray[], int lda,const __half *xarray[], int incx,const float *beta,float *yarray[], int incy,int batchCount)
cublasStatus_t cublasTSTgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const float *alpha,const __nv_bfloat16 *Aarray[], int lda,const __nv_bfloat16 *xarray[], int incx,const float *beta,__nv_bfloat16 *yarray[], int incy,int batchCount)
cublasStatus_t cublasTSSgemvBatched(cublasHandle_t handle, cublasOperation_t trans,int m, int n,const float *alpha,const __nv_bfloat16 *Aarray[], int lda,const __nv_bfloat16 *xarray[], int incx,const float *beta,float *yarray[], int incy,int batchCount)
此函数支持64位整数接口。
此函数执行一批矩阵和向量的矩阵向量乘法。该批被认为是“均匀的,”即所有实例对于它们各自的A矩阵、x和y向量具有相同的维数(m,n)、前导维数(lda)、增量(incx,incy)和转置(trans).输入矩阵和向量的地址以及批处理的每个实例的输出向量是从调用方传递给函数的指针数组中读取的。
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
trans | input | operation op( | |
m | input | number of rows of matrix | |
n | input | number of columns of matrix | |
alpha | host or device | input | |
Aarray | device | input | array of pointers to All pointers must meet certain alignment criteria. Please see below for details. |
lda | input | leading dimension of two-dimensional array used to store each matrix | |
xarray | device | input | array of pointers to All pointers must meet certain alignment criteria. Please see below for details. |
incx | input | stride of each one-dimensional array x[i]. | |
beta | host or device | input |
|
yarray | device | in/out | array of pointers to All pointers must meet certain alignment criteria. Please see below for details. |
incy | input | stride of each one-dimensional array y[i]. | |
batchCount | input | number of pointers contained in Aarray, xarray and yarray. |
If math mode enables fast math modes when using cublasSgemvBatched()
, pointers (not the pointer arrays) placed in the GPU memory must be properly aligned to avoid misaligned memory access errors. Ideally all pointers are aligned to at least 16 Bytes. Otherwise it is recommended that they meet the following rule:
if k % 4==0
then ensure intptr_t(ptr) % 16 == 0
,
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
| the parameters |
| the function failed to launch on the GPU |
cublasStatus_t cublasChpr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const cuComplex *x, int incx,cuComplex *AP)
cublasStatus_t cublasZhpr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const cuDoubleComplex *x, int incx,cuDoubleComplex *AP)
此函数支持64位整数接口。
此函数执行压缩厄米特秩-1更新
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
A | device | in/out |
|
lda | input | leading dimension of two-dimensional array used to store matrix |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasCher2(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuComplex *alpha,const cuComplex *x, int incx,const cuComplex *y, int incy,cuComplex *A, int lda)
cublasStatus_t cublasZher2(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuDoubleComplex *alpha,const cuDoubleComplex *x, int incx,const cuDoubleComplex *y, int incy,cuDoubleComplex *A, int lda)
此函数支持64位整数接口。
此函数执行厄米特秩2更新
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
y | device | input |
|
incy | input | stride between consecutive elements of | |
A | device | in/out |
|
lda | input | leading dimension of two-dimensional array used to store matrix |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasChpmv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuComplex *alpha,const cuComplex *AP,const cuComplex *x, int incx,const cuComplex *beta,cuComplex *y, int incy)
cublasStatus_t cublasZhpmv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuDoubleComplex *alpha,const cuDoubleComplex *AP,const cuDoubleComplex *x, int incx,const cuDoubleComplex *beta,cuDoubleComplex *y, int incy)
此功能支持64位整数接口。此功能执行Hermitian包装的矩阵矢量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
AP | device | input |
|
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasChbmv(cublasHandle_t handle, cublasFillMode_t uplo,int n, int k, const cuComplex *alpha,const cuComplex *A, int lda,const cuComplex *x, int incx,const cuComplex *beta,cuComplex *y, int incy)
cublasStatus_t cublasZhbmv(cublasHandle_t handle, cublasFillMode_t uplo,int n, int k, const cuDoubleComplex *alpha,const cuDoubleComplex *A, int lda,const cuDoubleComplex *x, int incx,const cuDoubleComplex *beta,cuDoubleComplex *y, int incy)
此函数支持64位整数接口。
This function performs the Hermitian banded matrix-vector multiplication
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
k | input | number of sub- and super-diagonals of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasChemv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuComplex *alpha,const cuComplex *A, int lda,const cuComplex *x, int incx,const cuComplex *beta,cuComplex *y, int incy)
cublasStatus_t cublasZhemv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuDoubleComplex *alpha,const cuDoubleComplex *A, int lda,const cuDoubleComplex *x, int incx,const cuDoubleComplex *beta,cuDoubleComplex *y, int incy)
此函数支持64位整数接口。
此函数执行厄米特矩阵-向量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasStrsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const float *A, int lda,float *x, int incx) cublasStatus_t cublasDtrsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const double *A, int lda,double *x, int incx) cublasStatus_t cublasCtrsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuComplex *A, int lda,cuComplex *x, int incx) cublasStatus_t cublasZtrsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuDoubleComplex *A, int lda,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数求解具有单个右侧边的三角线性系统
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix | |
n | input | number of rows and columns of matrix | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasStrmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const float *A, int lda,float *x, int incx)
cublasStatus_t cublasDtrmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const double *A, int lda,double *x, int incx)
cublasStatus_t cublasCtrmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuComplex *A, int lda,cuComplex *x, int incx)
cublasStatus_t cublasZtrmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuDoubleComplex *A, int lda,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数执行三角矩阵-向量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix | |
n | input | number of rows and columns of matrix | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the allocation of internal scratch memory failed |
| the function failed to launch on the GPU |
cublasStatus_t cublasStpsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const float *AP,float *x, int incx)
cublasStatus_t cublasDtpsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const double *AP,double *x, int incx)
cublasStatus_t cublasCtpsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuComplex *AP,cuComplex *x, int incx)
cublasStatus_t cublasZtpsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuDoubleComplex *AP,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数求解具有单个右侧边的压缩三角线性系统
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix are unity and should not be accessed. | |
n | input | number of rows and columns of matrix | |
AP | device | input |
|
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasStpmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const float *AP,float *x, int incx)
cublasStatus_t cublasDtpmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const double *AP,double *x, int incx)
cublasStatus_t cublasCtpmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuComplex *AP,cuComplex *x, int incx)
cublasStatus_t cublasZtpmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, const cuDoubleComplex *AP,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数求解具有单个右侧边的压缩三角线性系统
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix | |
n | input | number of rows and columns of matrix | |
AP | device | input | |
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the allocation of internal scratch memory failed |
| the function failed to launch on the GPU |
cublasStatus_t cublasStbsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const float *A, int lda,float *x, int incx)
cublasStatus_t cublasDtbsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const double *A, int lda,double *x, int incx)
cublasStatus_t cublasCtbsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const cuComplex *A, int lda,cuComplex *x, int incx)
cublasStatus_t cublasZtbsv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const cuDoubleComplex *A, int lda,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数求解具有单个右侧边的三角带状线性系统
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix | |
n | input | number of rows and columns of matrix | |
k | input | number of sub- and super-diagonals of matrix | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasStbmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const float *A, int lda,float *x, int incx)
cublasStatus_t cublasDtbmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const double *A, int lda,double *x, int incx)
cublasStatus_t cublasCtbmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const cuComplex *A, int lda,cuComplex *x, int incx)
cublasStatus_t cublasZtbmv(cublasHandle_t handle, cublasFillMode_t uplo,cublasOperation_t trans, cublasDiagType_t diag,int n, int k, const cuDoubleComplex *A, int lda,cuDoubleComplex *x, int incx)
此函数支持64位整数接口。
此函数用于执行三角带矩阵向量乘法
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
trans | input | operation op( | |
diag | input | indicates if the elements on the main diagonal of matrix | |
n | input | number of rows and columns of matrix | |
k | input | number of sub- and super-diagonals of matrix . | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | in/out |
|
incx | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the allocation of internal scratch memory failed |
| the function failed to launch on the GPU |
cublasStatus_t cublasSsyr2(cublasHandle_t handle, cublasFillMode_t uplo, int n,const float *alpha, const float *x, int incx,const float *y, int incy, float *A, int lda
cublasStatus_t cublasDsyr2(cublasHandle_t handle, cublasFillMode_t uplo, int n,const double *alpha, const double *x, int incx,const double *y, int incy, double *A, int lda
cublasStatus_t cublasCsyr2(cublasHandle_t handle, cublasFillMode_t uplo, int n,const cuComplex *alpha, const cuComplex *x, int incx,const cuComplex *y, int incy, cuComplex *A, int lda
cublasStatus_t cublasZsyr2(cublasHandle_t handle, cublasFillMode_t uplo, int n,const cuDoubleComplex *alpha, const cuDoubleComplex *x, int incx,const cuDoubleComplex *y, int incy, cuDoubleComplex *A, int lda
此函数支持64位整数接口。
此函数执行对称秩2更新
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
y | device | input |
|
incy | input | stride between consecutive elements of | |
A | device | in/out |
|
lda | input | leading dimension of two-dimensional array used to store matrix |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSsyr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const float *x, int incx, float *A, int lda)
cublasStatus_t cublasDsyr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const double *x, int incx, double *A, int lda)
cublasStatus_t cublasCsyr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuComplex *alpha,const cuComplex *x, int incx, cuComplex *A, int lda)
cublasStatus_t cublasZsyr(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuDoubleComplex *alpha,const cuDoubleComplex *x, int incx, cuDoubleComplex *A, int lda)
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
A | device | in/out |
|
lda | input | leading dimension of two-dimensional array used to store matrix |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
cublasStatus_t cublasSsymv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const float *alpha,const float *A, int lda,const float *x, int incx, const float *beta,float *y, int incy)
cublasStatus_t cublasDsymv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const double *alpha,const double *A, int lda,const double *x, int incx, const double *beta,double *y, int incy)
cublasStatus_t cublasCsymv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuComplex *alpha, /* host or device pointer */const cuComplex *A, int lda,const cuComplex *x, int incx, const cuComplex *beta,cuComplex *y, int incy)
cublasStatus_t cublasZsymv(cublasHandle_t handle, cublasFillMode_t uplo,int n, const cuDoubleComplex *alpha,const cuDoubleComplex *A, int lda,const cuDoubleComplex *x, int incx, const cuDoubleComplex *beta,cuDoubleComplex *y, int incy)
此函数支持64位整数接口。
此函数执行对称矩阵向量乘法。
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements. | |
n | input | number of rows and columns of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
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)
This function supports the 64-bit Integer Interface.
This function performs the symmetric banded matrix-vector multiplication
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
uplo | input | indicates if matrix | |
n | input | number of rows and columns of matrix | |
k | input | number of sub- and super-diagonals of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
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)
This function supports the 64-bit Integer Interface.
This function performs the rank-1 update
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
m | input | number of rows of matrix | |
n | input | number of columns of matrix | |
alpha | host or device | input | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
y | device | input |
|
incy | input | stride between consecutive elements of | |
A | device | in/out |
|
lda | input | leading dimension of two-dimensional array used to store matrix |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
|
|
| the function failed to launch on the GPU |
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)
Param. | Memory | In/out | Meaning |
---|---|---|---|
handle | input | handle to the cuBLAS library context. | |
trans | input | operation op( | |
m | input | number of rows of matrix | |
n | input | number of columns of matrix | |
alpha | host or device | input | |
A | device | input |
|
lda | input | leading dimension of two-dimensional array used to store matrix | |
x | device | input |
|
incx | input | stride between consecutive elements of | |
beta | host or device | input |
|
y | device | in/out |
|
incy | input | stride between consecutive elements of |
The possible error values returned by this function and their meanings are listed below.
Error Value | Meaning |
---|---|
| the operation completed successfully |
| the library was not initialized |
| the parameters |
| the function failed to launch on the GPU |
上一篇:威远豪生温泉酒店(豪生温泉大酒店) 威远豪生温泉酒店 威远豪生温泉酒店499套餐
下一篇:【YOLOv8/YOLOv7/YOLOv5/YOLOv4/Faster-rcnn系列算法改进NO.60】损失函数改进为wiou