tmp/tmp7d8b__8r/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### Symmetric and Hermitian rank-2 matrix updates <a id="linalg.algs.blas2.rank2">[[linalg.algs.blas2.rank2]]</a>
|
| 2 |
+
|
| 3 |
+
[*Note 1*: These functions correspond to the BLAS functions
|
| 4 |
+
`xSYR2`,`xSPR2`, `xHER2` and `xHPR2`. — *end note*]
|
| 5 |
+
|
| 6 |
+
The following elements apply to all functions in
|
| 7 |
+
[[linalg.algs.blas2.rank2]].
|
| 8 |
+
|
| 9 |
+
*Mandates:*
|
| 10 |
+
|
| 11 |
+
- If `InOutMat` has `layout_blas_packed` layout, then the layout’s
|
| 12 |
+
`Triangle` template argument has the same type as the function’s
|
| 13 |
+
`Triangle` template argument;
|
| 14 |
+
- `compatible-static-extents<decltype(A), decltype(A)>(0, 1)` is `true`;
|
| 15 |
+
and
|
| 16 |
+
- `possibly-multipliable<decltype(A), decltype(x), decltype(y)>()` is
|
| 17 |
+
`true`.
|
| 18 |
+
|
| 19 |
+
*Preconditions:*
|
| 20 |
+
|
| 21 |
+
- `A.extent(0)` equals `A.extent(1)`, and
|
| 22 |
+
- `multipliable(A, x, y)` is `true`.
|
| 23 |
+
|
| 24 |
+
*Complexity:* 𝑂(`x.extent(0)` × `y.extent(0)`).
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
template<in-vector InVec1, in-vector InVec2,
|
| 28 |
+
possibly-packed-inout-matrix InOutMat, class Triangle>
|
| 29 |
+
void symmetric_matrix_rank_2_update(InVec1 x, InVec2 y, InOutMat A, Triangle t);
|
| 30 |
+
template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2,
|
| 31 |
+
possibly-packed-inout-matrix InOutMat, class Triangle>
|
| 32 |
+
void symmetric_matrix_rank_2_update(ExecutionPolicy&& exec,
|
| 33 |
+
InVec1 x, InVec2 y, InOutMat A, Triangle t);
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
These functions perform a symmetric rank-2 update of the symmetric
|
| 37 |
+
matrix `A`, taking into account the `Triangle` parameter that applies to
|
| 38 |
+
`A` [[linalg.general]].
|
| 39 |
+
|
| 40 |
+
*Effects:* Computes A' such that $A' = A + x y^T + y x^T$ and assigns
|
| 41 |
+
each element of A' to the corresponding element of A.
|
| 42 |
+
|
| 43 |
+
``` cpp
|
| 44 |
+
template<in-vector InVec1, in-vector InVec2,
|
| 45 |
+
possibly-packed-inout-matrix InOutMat, class Triangle>
|
| 46 |
+
void hermitian_matrix_rank_2_update(InVec1 x, InVec2 y, InOutMat A, Triangle t);
|
| 47 |
+
template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2,
|
| 48 |
+
possibly-packed-inout-matrix InOutMat, class Triangle>
|
| 49 |
+
void hermitian_matrix_rank_2_update(ExecutionPolicy&& exec,
|
| 50 |
+
InVec1 x, InVec2 y, InOutMat A, Triangle t);
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
These functions perform a Hermitian rank-2 update of the Hermitian
|
| 54 |
+
matrix `A`, taking into account the `Triangle` parameter that applies to
|
| 55 |
+
`A` [[linalg.general]].
|
| 56 |
+
|
| 57 |
+
*Effects:* Computes A' such that $A' = A + x y^H + y x^H$ and assigns
|
| 58 |
+
each element of A' to the corresponding element of A.
|
| 59 |
+
|