• 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

  • 相关阅读:
    2023最新SSM计算机毕业设计选题大全(附源码+LW)之java基于网络安全维护的机房设备管理19rya
    PyTorch常用5个抽样函数
    SLAM从入门到精通(robot上层软件开发)
    c语言基础:数组的运用以及在内存中的地址的理解
    29.vuex
    深入理解JVM虚拟机
    【面试题 - mysql】事务
    程序规范化编写
    【Selenium & Other】一键摸鱼 & 一键采集数据
    JAVA面经整理(8)
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/126578022