Cgerc

Applicable Products

Hardware Model

Supported or Not

Atlas 200I/500 A2 inference products

Not supported

Atlas inference products

Not supported

Atlas training products

Not supported

Atlas A2 training products/Atlas A2 inference products

Supported

Atlas A3 inference products/Atlas A3 training products

Supported

Function Description

API function:

  • asdBlasMakeCgercPlan: initializes the Cgerc operator configuration corresponding to the handle.
  • asdBlasCgerc: A complex vector is multiplied by a conjugate transpose of another complex vector, and then added to a matrix.

Formula:

  • asdBlasCgerc formula:
  • Example:

    Input x:

    [1.0 + 1.0j, 2.0 + 2.0j]

    Input alpha:

    1.0 + 1.0j

    Input y:

    [1.0 + 1.0j, 1.0 + 2.0j]

    Input A:

    [ [2.0 + 3.0j, 3.0 + 4.0j], 
      [3.0 + 3.0j, 4.0 + 4.0j] ]

    After the Cgerc operator is called, the output A is as follows:

    [ [4.0 + 5.0j, 7.0 + 6.0j], 
      [7.0 + 7.0j, 12.0 + 8.0j] ]

Function Prototype

  • AspbStatus asdBlasMakeCgercPlan(asdBlasHandle handle)
  • AspbStatus asdBlasCgerc(asdBlasHandle handle, const int64_t m, const int64_t n, const std::complex<float> &alpha,aclTensor *x, const int64_t incx, aclTensor *y, const int64_t incy, aclTensor *A,const int64_t lda)

Parameter Description

  • asdBlasMakeCgercPlan

    Parameter

    Input/Output

    Type

    Description

    handle

    Input

    asdBlasHandle

    Cgerc operator handle.

  • asdBlasCgerc

    Parameter

    Input/Output

    Type

    Description

    handle

    Input

    asdBlasHandle

    Cgerc operator handle.

    m

    Input

    const int64_t

    Number of complex elements in vector x, corresponding to the number of rows in matrix A.

    n

    Input

    const int64_t

    Number of complex elements in vector y, corresponding to the number of columns in matrix A.

    alpha

    Input

    const std::complex<float> *

    Alpha in the formula, which is the input complex scalar. The data type can be COMPLEX64.

    x

    Input

    aclTensor *

    x in the formula, which is a tensor on the device. The data type can be COMPLEX64, the data format can be ND, and the shape is [m].

    incx

    Input

    const int64_t

    Memory address increment between consecutive elements of x (currently restricted to 1).

    y

    Input

    aclTensor *

    y in the formula, which is a tensor on the device. The data type can be COMPLEX64, the data format can be ND, and the shape is [n].

    incy

    Input

    const int64_t

    Memory address increment between consecutive elements of y (currently restricted to 1).

    A

    Input/Output

    aclTensor *

    A in the formula, which is a tensor on the device. The data type can be COMPLEX64, the data format can be ND, and the shape is [m, n].

    lda

    Input

    const int64_t

    Leading dimension of matrix A (currently restricted to m).

Return Value Description

For details about the return values, see Return Value.

Constraints

  • asdBlasMakeCgercPlan: none.
  • asdBlasCgerc
    • The input element count (m, n) currently supports the range [1, 8192].
    • The input shape of the operator is [m], [n], or [m, n], and the output shape is [m, n].
    • The operator does not support the calculation for three or more dimensions.

Calling Example

For details about the operator calling example, see Cgerc.