cuBLAS使用(3)
创始人
2025-05-29 07:44:10
0

目录

 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)函数。

 cublasgbmv()

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

scalar used for multiplication.

AP

device

input

array with � stored in packed format.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • alpha == NULL or beta == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasspr()

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

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

AP

device

in/out

array with � stored in packed format.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 ​​​​​​cublasspr2()

 

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

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

AP

device

in/out

array with � stored in packed format.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublassbmv()

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 A 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 A.

k

input

number of sub- and super-diagonals of matrix A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimension lda x n with \lda >= k+1.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or k < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if alpha == NULL or beta == NULL or

  • lda < (1 + k)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasspmv()

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

scalar used for multiplication.

AP

device

input

array with � stored in packed format.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • alpha == NULL or beta == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasspr()

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

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

AP

device

in/out

array with � stored in packed format.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublasgemvStridedBatched()

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(A[i]) that is non- or (conj.) transpose.

m

input

number of rows of matrix A[i].

n

input

number of columns of matrix A[i].

alpha

host or device

input

scalar used for multiplication.

A

device

input

* pointer to the A matrix corresponding to the first instance of the batch, with dimensions lda x n with lda>=max(1,m).

lda

input

leading dimension of two-dimensional array used to store each matrix A[i].

strideA

input

Value of type long long int that gives the offset in number of elements between A[i] and A[i+1]

x

device

input

* pointer to the x vector corresponding to the first instance of the batch, with each dimension n if trans==CUBLAS_OP_N and m otherwise.

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 x[i] and x[i+1]

beta

host or device

input

scalar used for multiplication. If beta == 0y does not have to be a valid input.

y

device

in/out

* pointer to the y vector corresponding to the first instance of the batch, with each dimension m if trans==CUBLAS_OP_N and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected.

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 y[i] and y[i+1]

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

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

the parameters m,n,batchCount<0

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasgemvBatched()

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(A[i]) that is non- or (conj.) transpose.

m

input

number of rows of matrix A[i].

n

input

number of columns of matrix A[i].

alpha

host or device

input

scalar used for multiplication.

Aarray

device

input

array of pointers to array, with each array of dim. lda x n with lda>=max(1,m).

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 A[i].

xarray

device

input

array of pointers to array, with each dimension n if trans==CUBLAS_OP_N and m otherwise.

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

scalar used for multiplication. If beta == 0y does not have to be a valid input.

yarray

device

in/out

array of pointers to array. It has dimensions m if trans==CUBLAS_OP_N and n otherwise. Vectors y[i] should not overlap; otherwise, undefined behavior is expected.

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

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

the parameters m,n,batchCount<0

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublashpr()

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 A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements.

n

input

number of rows and columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

A

device

in/out

array of dimensions lda x n, with lda>=max(1,n). The imaginary parts of the diagonal elements are assumed and set to zero.

lda

input

leading dimension of two-dimensional array used to store matrix A.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx == 0 or

  • if uplo != CUBLAS_FILL_MODE_UPPERCUBLAS_FILL_MODE_LOWER or

  • if lda < max(1, n) or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasher2()

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 A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements.

n

input

number of rows and columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

A

device

in/out

array of dimension lda x n with lda>=max(1,n). The imaginary parts of the diagonal elements are assumed and set to zero.

lda

input

leading dimension of two-dimensional array used to store matrix A.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx == 0 or incy == 0 or

  • if uplo != CUBLAS_FILL_MODE_UPPERCUBLAS_FILL_MODE_LOWER or

  • if lda < max(1, n) or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 

 

 cublashpmv()

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 A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements.

n

input

number of rows and columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

AP

device

input

array with A stored in packed format. The imaginary parts of the diagonal elements are assumed to be zero.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx == 0 or incy == 0 or

  • if uplo != CUBLAS_FILL_MODE_UPPERCUBLAS_FILL_MODE_LOWER or

  • alpha == NULL or beta == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublashbmv()

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 A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements.

n

input

number of rows and columns of matrix A.

k

input

number of sub- and super-diagonals of matrix A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimensions lda x n, with lda>=k+1. The imaginary parts of the diagonal elements are assumed to be zero.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or k < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if lda < (k + 1) or

  • alpha == NULL or beta == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublashemv()

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 A lower or upper part is stored, the other Hermitian part is not referenced and is inferred from the stored elements.

n

input

number of rows and columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimension lda x n, with lda>=max(1,n). The imaginary parts of the diagonal elements are assumed to be zero.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • lda < n

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublastrsv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) that is non- or (conj.) transpose.

diag

input

indicates if the elements on the main diagonal of matrix A are unity and should not be accessed.

n

input

number of rows and columns of matrix A.

A

device

input

array of dimension lda x n, with lda>=max(1,n).

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if trans != CUBLAS_OP_NCUBLAS_OP_CCUBLAS_OP_T or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if diag != CUBLAS_DIAG_UNITCUBLAS_DIAG_NON_UNIT or

  • lda < max(1, n)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublastrmv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) (that is, non- or conj.) transpose.

diag

input

indicates if the elements on the main diagonal of matrix A are unity and should not be accessed.

n

input

number of rows and columns of matrix A.

A

device

input

array of dimensions lda x n , with lda>=max(1,n).

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if trans != CUBLAS_OP_NCUBLAS_OP_CCUBLAS_OP_T or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if diag != CUBLAS_DIAG_UNITCUBLAS_DIAG_NON_UNIT or

  • lda < max(1, n)

CUBLAS_STATUS_ALLOC_FAILED

the allocation of internal scratch memory failed

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublastpsv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) that is non- or (conj.) transpose.

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 A.

AP

device

input

array with A stored in packed format.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if trans != CUBLAS_OP_NCUBLAS_OP_CCUBLAS_OP_T or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • diag != CUBLAS_DIAG_UNITCUBLAS_DIAG_NON_UNIT

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublastpmv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) that is non- or (conj.) transpose.

diag

input

indicates if the elements on the main diagonal of matrix A are unity and should not be accessed.

n

input

number of rows and columns of matrix A.

AP

device

input

array with � stored in packed format.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx == 0 or

  • if uplo != CUBLAS_FILL_MODE_UPPER, CUBLAS_FILL_MODE_LOWER or

  • if trans != CUBLAS_OP_N, CUBLAS_OP_T, CUBLAS_OP_C or

  • diag != CUBLAS_DIAG_UNIT, CUBLAS_DIAG_NON_UNIT

CUBLAS_STATUS_ALLOC_FAILED

the allocation of internal scratch memory failed

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublastbsv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) that is non- or (conj.) transpose.

diag

input

indicates if the elements on the main diagonal of matrix A are unity and should not be accessed.

n

input

number of rows and columns of matrix A.

k

input

number of sub- and super-diagonals of matrix A.

A

device

input

array of dimension lda x n, with lda >= k+1.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or k < 0 or

  • if incx = 0 or

  • if trans != CUBLAS_OP_NCUBLAS_OP_CCUBLAS_OP_T or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if diag != CUBLAS_DIAG_UNITCUBLAS_DIAG_NON_UNIT or

  • lda < (1 + k)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublastbmv()

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 A lower or upper part is stored, the other part is not referenced and is inferred from the stored elements.

trans

input

operation op(A) that is non- or (conj.) transpose.

diag

input

indicates if the elements on the main diagonal of matrix A are unity and should not be accessed.

n

input

number of rows and columns of matrix A.

k

input

number of sub- and super-diagonals of matrix .

A

device

input

array of dimension lda x n, with lda>=k+1.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

in/out

vector with n elements.

incx

input

stride between consecutive elements of x.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or k < 0 or

  • if incx = 0 or

  • if trans != CUBLAS_OP_NCUBLAS_OP_CCUBLAS_OP_T or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if diag != CUBLAS_DIAG_UNITCUBLAS_DIAG_NON_UNIT or

  • lda < (1 + k)

CUBLAS_STATUS_ALLOC_FAILED

the allocation of internal scratch memory failed

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublassyr2()

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 A 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 A.

alpha

host or device

input

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

A

device

in/out

array of dimensions lda x n, with lda>=max(1,n).

lda

input

leading dimension of two-dimensional array used to store matrix A.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if alpha == NULL or

  • lda < max(1, n)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublassyr()

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 A 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 A.

alpha

host or device

input

scalar used for multiplication.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

A

device

in/out

array of dimensions lda x n, with lda>=max(1,n).

lda

input

leading dimension of two-dimensional array used to store matrix A.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if lda < max(1, n) or

  • alpha == NULL

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublassymv()

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 A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimension lda x n with lda>=max(1,n).

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • lda < n

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublassbmv()

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 A 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 A.

k

input

number of sub- and super-diagonals of matrix A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimension lda x n with \lda >= k+1.

lda

input

leading dimension of two-dimensional array used to store matrix A.

x

device

input

vector with n elements.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector with n elements.

incy

input

stride between consecutive elements of y.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If n < 0 or k < 0 or

  • if incx = 0 or incy = 0 or

  • if uplo != CUBLAS_FILL_MODE_LOWERCUBLAS_FILL_MODE_UPPER or

  • if alpha == NULL or beta == NULL or

  • lda < (1 + k)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

 cublasger()

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 A.

n

input

number of columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

x

device

input

vector with m elements.

incx

input

stride between consecutive elements of x.

y

device

input

vector with n elements.

incy

input

stride between consecutive elements of y.

A

device

in/out

array of dimension lda x n with lda >= max(1,m).

lda

input

leading dimension of two-dimensional array used to store matrix A.

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

  • If m < 0 or n < 0

  • if incx = 0 or incy = 0 or

  • if alpha == NULL or

  • lda < max(1, m)

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

cublasgemv()

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(A) that is non- or (conj.) transpose.

m

input

number of rows of matrix A.

n

input

number of columns of matrix A.

alpha

host or device

input

scalar used for multiplication.

A

device

input

array of dimension lda x n with lda >= max(1,m). Before entry, the leading m by n part of the array A must contain the matrix of coefficients. Unchanged on exit.

lda

input

leading dimension of two-dimensional array used to store matrix Alda must be at least max(1,m).

x

device

input

vector at least (1+(n-1)*abs(incx)) elements if transa==CUBLAS_OP_N and at least (1+(m-1)*abs(incx)) elements otherwise.

incx

input

stride between consecutive elements of x.

beta

host or device

input

scalar used for multiplication, if beta==0 then y does not have to be a valid input.

y

device

in/out

vector at least (1+(m-1)*abs(incy)) elements if transa==CUBLAS_OP_N and at least (1+(n-1)*abs(incy)) elements otherwise.

incy

input

stride between consecutive elements of y

The possible error values returned by this function and their meanings are listed below.

Error Value

Meaning

CUBLAS_STATUS_SUCCESS

the operation completed successfully

CUBLAS_STATUS_NOT_INITIALIZED

the library was not initialized

CUBLAS_STATUS_INVALID_VALUE

the parameters m,n<0 or incx,incy=0

CUBLAS_STATUS_EXECUTION_FAILED

the function failed to launch on the GPU

相关内容

热门资讯

喜欢穿一身黑的男生性格(喜欢穿... 今天百科达人给各位分享喜欢穿一身黑的男生性格的知识,其中也会对喜欢穿一身黑衣服的男人人好相处吗进行解...
发春是什么意思(思春和发春是什... 本篇文章极速百科给大家谈谈发春是什么意思,以及思春和发春是什么意思对应的知识点,希望对各位有所帮助,...
网络用语zl是什么意思(zl是... 今天给各位分享网络用语zl是什么意思的知识,其中也会对zl是啥意思是什么网络用语进行解释,如果能碰巧...
为什么酷狗音乐自己唱的歌不能下... 本篇文章极速百科小编给大家谈谈为什么酷狗音乐自己唱的歌不能下载到本地?,以及为什么酷狗下载的歌曲不是...
华为下载未安装的文件去哪找(华... 今天百科达人给各位分享华为下载未安装的文件去哪找的知识,其中也会对华为下载未安装的文件去哪找到进行解...
家里可以做假山养金鱼吗(假山能... 今天百科达人给各位分享家里可以做假山养金鱼吗的知识,其中也会对假山能放鱼缸里吗进行解释,如果能碰巧解...
四分五裂是什么生肖什么动物(四... 本篇文章极速百科小编给大家谈谈四分五裂是什么生肖什么动物,以及四分五裂打一生肖是什么对应的知识点,希...
怎么往应用助手里添加应用(应用... 今天百科达人给各位分享怎么往应用助手里添加应用的知识,其中也会对应用助手怎么添加微信进行解释,如果能...
美团联名卡审核成功待激活(美团... 今天百科达人给各位分享美团联名卡审核成功待激活的知识,其中也会对美团联名卡审核未通过进行解释,如果能...
一帆风顺二龙腾飞三阳开泰祝福语... 本篇文章极速百科给大家谈谈一帆风顺二龙腾飞三阳开泰祝福语,以及一帆风顺二龙腾飞三阳开泰祝福语结婚对应...