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)
此函数执行三角带状矩阵向量乘法
o p ( A ) x = b op(A)x = b op(A)x=b
其中 A 是三角带状矩阵,x 是向量。 此外,对于矩阵 A
o
p
(
A
)
=
{
A
如
果
t
r
a
n
s
a
=
=
C
U
B
L
A
S
_
O
P
_
N
,
A
T
如
果
t
r
a
n
s
a
=
=
C
U
B
L
A
S
_
O
P
_
T
,
A
H
如
果
t
r
a
n
s
a
=
=
C
U
B
L
A
S
_
O
P
_
C
op(A)= \begin{cases} A\ \ \ \ 如果 transa == CUBLAS\_OP\_N,\\ A^T \ \ 如果 transa == CUBLAS\_OP\_T,\\ A^H \ \ 如果 transa == CUBLAS\_OP\_C \end{cases}
op(A)=⎩⎪⎨⎪⎧A 如果transa==CUBLAS_OP_N,AT 如果transa==CUBLAS_OP_T,AH 如果transa==CUBLAS_OP_C
解决方案 x 会在退出时覆盖右侧的 b。
此函数中不包含对奇点或接近奇点的测试。
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. | |
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 | input | vector with n elements. |
incx | input | stride between consecutive elements of x. |
下面列出了此函数可能返回的错误值及其含义:
ErrorValue | Meaning |
---|---|
CUBLAS_STATUS_SUCCESS | 操作成功完成 |
CUBLAS_STATUS_NOT_INITIALIZED | 库未初始化 |
CUBLAS_STATUS_INVALID_VALUE | If n < 0 or if incx = 0 or if trans != CUBLAS_OP_N,CUBLAS_OP_C, CUBLAS_OP_T or if uplo != CUBLAS_FILL_MODE_LOWER, CUBLAS_FILL_MODE_UPPER or if diag != CUBLAS_DIAG_UNIT,CUBLAS_DIAG_NON_UNIT or lda < max(1, n) |
CUBLAS_STATUS_EXECUTION_FAILED | 该功能无法在 GPU 上启动 |