29 Numerics library [numerics]

29.9 Basic linear algebra algorithms [linalg]

29.9.15 BLAS 3 algorithms [linalg.algs.blas3]

29.9.15.4 Rank-k update of a symmetric or Hermitian matrix [linalg.algs.blas3.rankk]

[Note 1: 
These functions correspond to the BLAS functions xSYRK and xHERK[bib].
— end note]
The following elements apply to all functions in [linalg.algs.blas3.rankk].
For any function F in this subclause with a parameter named t, an InMat2 template parameter, and a function parameter InMat2 E, t applies to accesses done through the parameter E.
F only accesses the triangle of E specified by t.
For accesses of diagonal elements E[i, i], F only uses the value real-if-needed(E[i, i]) if the name of F starts with hermitian.
For accesses E[i, j] outside the triangle specified by t, F only uses the value
  • conj-if-needed(E[j, i]) if the name of F starts with hermitian, or
  • E[j, i] if the name of F starts with symmetric.
Mandates:
  • If OutMat has layout_blas_packed layout, then the layout's Triangle template argument has the same type as the function's Triangle template argument;
  • If the function has an InMat2 template parameter and if InMat2 has layout_blas_packed layout, then the layout's Triangle template argument has the same type as the function's Triangle template argument;
  • possibly-multipliable<decltype(A), decltype(transposed(A)), decltype(C)>() is true; and
  • possibly-addable<decltype(C), decltype(E), decltype(C)>() is true for those overloads with an E parameter.
Preconditions:
  • multipliable(A, transposed(A), C) is true; and
    [Note 2: 
    This implies that C is square.
    — end note]
  • addable(C, E, C) is true for those overloads with an E parameter.
Complexity: .
Remarks: C may alias E for those overloads with an E parameter.
template<scalar Scalar, in-matrix InMat, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_k_update(Scalar alpha, InMat A, OutMat C, Triangle t); template<class ExecutionPolicy, scalar Scalar, in-matrix InMat, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_k_update(ExecutionPolicy&& exec, Scalar alpha, InMat A, OutMat C, Triangle t);
Effects: Computes , where the scalar α is alpha.
template<scalar Scalar, in-matrix InMat, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_k_update(Scalar alpha, InMat A, OutMat C, Triangle t); template<class ExecutionPolicy, scalar Scalar, in-matrix InMat, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_k_update(ExecutionPolicy&& exec, Scalar alpha, InMat A, OutMat C, Triangle t);
Effects: Computes , where the scalar α is real-if-needed(alpha).
template<scalar Scalar, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_k_update(Scalar alpha, InMat1 A, InMat2 E, OutMat C, Triangle t); template<class ExecutionPolicy, scalar Scalar, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_k_update(ExecutionPolicy&& exec, Scalar alpha, InMat1 A, InMat2 E, OutMat C, Triangle t);
Effects: Computes , where the scalar α is alpha.
template<scalar Scalar, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_k_update(Scalar alpha, InMat1 A, InMat2 E, OutMat C, Triangle t); template<class ExecutionPolicy, scalar Scalar, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_k_update(ExecutionPolicy&& exec, Scalar alpha, InMat1 A, InMat2 E, OutMat C, Triangle t);
Effects: Computes , where the scalar α is real-if-needed(alpha).