• 33.cuBLAS开发指南中文版--cuBLAS中的Level-2函数trsv()


    2.6.16. 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)
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16

    此函数执行三角带状矩阵向量乘法

    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.MemoryIn/outMeaning
    handleinputhandle to the cuBLAS library context.
    uploinputindicates if matrix A lower or upper part is stored, the other symmetric part is not referenced and is inferred from the stored elements.
    transinputoperation op(A) that is non- or (conj.) transpose.
    diaginputindicates if the elements on the main diagonal of matrix A are unity and should not be accessed.
    ninputnumber of rows and columns of matrix A.
    Adeviceinput array of dimensions lda x n , with lda>=max(1,n).
    ldainputleading dimension of two-dimensional array used to store matrix A.
    xdeviceinput vector with n elements.
    incxinputstride between consecutive elements of x.

    下面列出了此函数可能返回的错误值及其含义:

    ErrorValueMeaning
    CUBLAS_STATUS_SUCCESS操作成功完成
    CUBLAS_STATUS_NOT_INITIALIZED库未初始化
    CUBLAS_STATUS_INVALID_VALUEIf 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 上启动

    详细信息, 请参考:
    strsv, dtrsv, ctrsv, ztrsv

  • 相关阅读:
    Class类
    架构师考试周报四
    php &&和and的区别
    2022年苹果审核4.3相关问题总结
    Java自学注意细节快速成长
    Camera1 源码解析系列(二)—— Camera1 Open() 流程解析
    中科大计网学习记录笔记(十二):TCP 套接字编程
    Python——BeautifulSoup库
    var、let、const的区别
    《视觉 SLAM 十四讲》第 7 讲 视觉里程计1 【如何根据图像 估计 相机运动】【特征点法】
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/127977339