From Jason Turner

[linalg.algs.blas2.symherrank1]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpmj3djfj4/{from.md → to.md} +90 -0
tmp/tmpmj3djfj4/{from.md → to.md} RENAMED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Symmetric or Hermitian Rank-1 (outer product) update of a matrix <a id="linalg.algs.blas2.symherrank1">[[linalg.algs.blas2.symherrank1]]</a>
2
+
3
+ [*Note 1*: These functions correspond to the BLAS functions `xSYR`,
4
+ `xSPR`, `xHER`, and `xHPR`. They have overloads taking a scaling factor
5
+ `alpha`, because it would be impossible to express the update
6
+ $A = A - x x^T$ otherwise. — *end note*]
7
+
8
+ The following elements apply to all functions in
9
+ [[linalg.algs.blas2.symherrank1]].
10
+
11
+ *Mandates:*
12
+
13
+ - If `InOutMat` has `layout_blas_packed` layout, then the layout’s
14
+ `Triangle` template argument has the same type as the function’s
15
+ `Triangle` template argument;
16
+ - `compatible-static-extents<decltype(A), decltype(A)>(0, 1)` is `true`;
17
+ and
18
+ - `compatible-static-extents<decltype(A), decltype(x)>(0, 0)` is `true`.
19
+
20
+ *Preconditions:*
21
+
22
+ - `A.extent(0)` equals `A.extent(1)`, and
23
+ - `A.extent(0)` equals `x.extent(0)`.
24
+
25
+ *Complexity:* 𝑂(`x.extent(0)` × `x.extent(0)`).
26
+
27
+ ``` cpp
28
+ template<class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
29
+ void symmetric_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t);
30
+ template<class ExecutionPolicy,
31
+ class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
32
+ void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec,
33
+ Scalar alpha, InVec x, InOutMat A, Triangle t);
34
+ ```
35
+
36
+ These functions perform a symmetric rank-1 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 matrix A' such that $A' = A + \alpha x x^T$, where
41
+ the scalar α is `alpha`, and assigns each element of A' to the
42
+ corresponding element of A.
43
+
44
+ ``` cpp
45
+ template<in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
46
+ void symmetric_matrix_rank_1_update(InVec x, InOutMat A, Triangle t);
47
+ template<class ExecutionPolicy,
48
+ in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
49
+ void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
50
+ ```
51
+
52
+ These functions perform a symmetric rank-1 update of the symmetric
53
+ matrix `A`, taking into account the `Triangle` parameter that applies to
54
+ `A` [[linalg.general]].
55
+
56
+ *Effects:* Computes a matrix A' such that $A' = A + x x^T$ and assigns
57
+ each element of A' to the corresponding element of A.
58
+
59
+ ``` cpp
60
+ template<class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
61
+ void hermitian_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t);
62
+ template<class ExecutionPolicy,
63
+ class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
64
+ void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec,
65
+ Scalar alpha, InVec x, InOutMat A, Triangle t);
66
+ ```
67
+
68
+ These functions perform a Hermitian rank-1 update of the Hermitian
69
+ matrix `A`, taking into account the `Triangle` parameter that applies to
70
+ `A` [[linalg.general]].
71
+
72
+ *Effects:* Computes A' such that $A' = A + \alpha x x^H$, where the
73
+ scalar α is `alpha`, and assigns each element of A' to the corresponding
74
+ element of A.
75
+
76
+ ``` cpp
77
+ template<in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
78
+ void hermitian_matrix_rank_1_update(InVec x, InOutMat A, Triangle t);
79
+ template<class ExecutionPolicy,
80
+ in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
81
+ void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
82
+ ```
83
+
84
+ These functions perform a Hermitian rank-1 update of the Hermitian
85
+ matrix `A`, taking into account the `Triangle` parameter that applies to
86
+ `A` [[linalg.general]].
87
+
88
+ *Effects:* Computes a matrix A' such that $A' = A + x x^H$ and assigns
89
+ each element of A' to the corresponding element of A.
90
+