• 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

  • 相关阅读:
    使用Python构造VARIMA模型
    机器学习中的数学基础(一)
    LLVIP数据集下载
    Quicker快速开发,简单的网页数据爬取(示例,获取天眼查指定公司基础工商数据)
    27. Ubuntu 20.04 开机自动挂载文件/etc/fstab
    03_ElasticSearch下载安装
    全光谱护眼灯有哪些?2023全光谱护眼台灯推荐
    【数据测试】之前段端(二)
    java.io.IOException: Unable to establish loopback connection
    Scott-Knott ESD test
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/126578022