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


    2.6.10. 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
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    此函数执行对称 rank-2 更新:

    A = α ( x y T + y x T ) + A A = \alpha (xy^T + yx^T) + A A=α(xyT+yxT)+A

    其中 A 是以列主序存储的 n*n 对称矩阵,x和y 是向量,而 α \alpha α是标量。

    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.
    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 上启动

    请参考:
    ssyr2, dsyr2

  • 相关阅读:
    12. 虚拟机与类加载机制
    js实现拖动效果
    Android RecyclerView 两种以上ViewHolder显示错乱
    微信支付(小程序)-java实现与小程序实现
    【中秋国庆不断更】HarmonyOS对通知类消息的管理与发布通知(下)
    QT基础入门【QSS】 伪状态,冲突解决、级联介绍
    u-blox模块-- UBX protocol(NEO-M9N-00B-00)
    未能为 SSL/TLS 安全通道建立信任关系
    paddle篇---用yolov3训练自己的数据集
    select完成服务器并发
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/126578022