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


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

    此函数执行对称矩阵向量乘法。

    y = α A x + β y y = \alpha Ax+\beta y y=αAx+βy

    其中 A 是以低模式或高模式存储的 n*n 对称矩阵,x 和y 是向量,而 α \alpha α β \beta β是标量。

    这个函数有另一个更快的实现,它使用可以通过 cublasSetAtomicsMode() 启用的原子。

    请参阅函数 cublasSetAtomicsMode() 部分了解有关原子使用的更多详细信息。

    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.
    ninputnumber of rows and columns of matrix A.
    alphahost or deviceinput scalar used for multiplication.
    Adeviceinput array of dimension 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.
    betahost or deviceinput scalar used for multiplication, if beta==0 then y does not have to be a valid input.
    ydeviceinput vector with n elements.
    incyinputstride between consecutive elements of y.

    该函数可能返回的错误值及其含义如下所列。

    ErrorValueMeaning
    CUBLAS_STATUS_SUCCESS操作成功完成
    CUBLAS_STATUS_NOT_INITIALIZED库未初始化
    CUBLAS_STATUS_INVALID_VALUE参数 m,n<0 或 incx,incy=0
    CUBLAS_STATUS_EXECUTION_FAILED该功能无法在 GPU 上启动

    请参考:
    ssymv, dsymv

  • 相关阅读:
    python的自定义函数的用法和实例
    GPT-4 Alpha:OpenAI的革命性升级
    ASP.NET Core 6框架揭秘实例演示[12]:诊断跟踪的进阶用法
    dsu on tree模板
    1.【小迪安全学习笔记】基础入门-概念名词
    Spring Cloud 篇
    mysql事故复盘: 单行字节最大阈值65535字节(原创)
    基于java+SpringBoot+HTML+Mysql二手物品购物网站
    K8S学习之Service实现服务发现原理分析与实践
    基于SSM实现微博系统
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/126519179