• 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

  • 相关阅读:
    2.5w字 + 36 张图爆肝操作系统面试题 学不吐你
    【规范】看看人家Git提交描述,那叫一个规矩
    langchain主要模块(三):Chain
    大三Web课程设计——悬崖上的波妞(4页) HTML+CSS(可以很好的应付老师的作业)
    文心一言 VS 讯飞星火 VS chatgpt (116)-- 算法导论10.3 1题
    Hudi第三章:集成Flink
    OpenHarmony 3.1 Beta版本关键特性解析——分布式DeviceProfile
    OpenWrt环境下,由于wget不支持ssl/tls导致执行opkg update失败的解决方法
    java运算符(算数、关系、逻辑、条件、赋值)
    【Mysql】mysql学习之旅05-多表操作
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/127977339