• 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

  • 相关阅读:
    Naopore基因组数据组装软件---NECAT下载试用
    解决Canvas画布跨域图片方法
    【经验总结】Jupyter 配置内核
    学习在C++中使用位运算符做“int”和“4个char”之间的转换
    Linux磁盘文件管理
    Bootstrap5 组件
    【Verilog】跨时钟域处理(一)——多bit MUX同步
    【pytest】 pytest拓展功能 pycharm PermissionError: [Errno 13] Permission denied:
    vite+react+typescript 遇到的问题
    CSS 定位布局
  • 原文地址:https://blog.csdn.net/kunhe0512/article/details/126578022