29 Numerics library [numerics]

29.9 Basic linear algebra algorithms [linalg]

29.9.15 BLAS 3 algorithms [linalg.algs.blas3]

29.9.15.5 Rank-2k update of a symmetric or Hermitian matrix [linalg.algs.blas3.rank2k]

[Note 1: 
These functions correspond to the BLAS functions xSYR2K and xHER2K[bib].
— end note]
The following elements apply to all functions in [linalg.algs.blas3.rank2k].
For any function F in this subclause with a parameter named t, an InMat3 template parameter, and a function parameter InMat3 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 InMat3 template parameter and if InMat3 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(B)), decltype(C)>() is true;
  • possibly-multipliable<decltype(B), 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(B), C) is true,
  • multipliable(B, transposed(A), C) is true, and
    [Note 2: 
    This and the previous imply 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<in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_2k_update(InMat1 A, InMat2 B, OutMat C, Triangle t); template<class ExecutionPolicy, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_2k_update(ExecutionPolicy&& exec, InMat1 A, InMat2 B, OutMat C, Triangle t);
Effects: Computes .
template<in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_2k_update(InMat1 A, InMat2 B, OutMat C, Triangle t); template<class ExecutionPolicy, in-matrix InMat1, in-matrix InMat2, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_2k_update(ExecutionPolicy&& exec, InMat1 A, InMat2 B, OutMat C, Triangle t);
Effects: Computes .
template<in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_2k_update(InMat1 A, InMat2 B, InMat3 E, OutMat C, Triangle t); template<class ExecutionPolicy, in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, possibly-packed-out-matrix OutMat, class Triangle> void symmetric_matrix_rank_2k_update(ExecutionPolicy&& exec, InMat1 A, InMat2 B, InMat3 E, OutMat C, Triangle t);
Computes .
template<in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_2k_update(InMat1 A, InMat2 B, InMat3 E, OutMat C, Triangle t); template<class ExecutionPolicy, in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, possibly-packed-out-matrix OutMat, class Triangle> void hermitian_matrix_rank_2k_update(ExecutionPolicy&& exec, InMat1 A, InMat2 B, InMat3 E, OutMat C, Triangle t);
Effects: Computes .