From Jason Turner

[linalg.algs.blas2.trmv]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpx5ztyxau/{from.md → to.md} +92 -0
tmp/tmpx5ztyxau/{from.md → to.md} RENAMED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #### Triangular matrix-vector product <a id="linalg.algs.blas2.trmv">[[linalg.algs.blas2.trmv]]</a>
2
+
3
+ [*Note 1*: These functions correspond to the BLAS functions `xTRMV` and
4
+ `xTPMV`. — *end note*]
5
+
6
+ The following elements apply to all functions in
7
+ [[linalg.algs.blas2.trmv]].
8
+
9
+ *Mandates:*
10
+
11
+ - If `InMat` 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
+ - `compatible-static-extents<decltype(A), decltype(y)>(0, 0)` is `true`;
16
+ - `compatible-static-extents<decltype(A), decltype(x)>(0, 0)` is `true`
17
+ for those overloads that take an `x` parameter; and
18
+ - `compatible-static-extents<decltype(A), decltype(z)>(0, 0)` is `true`
19
+ for those overloads that take a `z` parameter.
20
+
21
+ *Preconditions:*
22
+
23
+ - `A.extent(0)` equals `A.extent(1)`,
24
+ - `A.extent(0)` equals `y.extent(0)`,
25
+ - `A.extent(0)` equals `x.extent(0)` for those overloads that take an
26
+ `x` parameter, and
27
+ - `A.extent(0)` equals `z.extent(0)` for those overloads that take a `z`
28
+ parameter.
29
+
30
+ ``` cpp
31
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, in-vector InVec,
32
+ out-vector OutVec>
33
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d, InVec x, OutVec y);
34
+ template<class ExecutionPolicy,
35
+ in-matrix InMat, class Triangle, class DiagonalStorage, in-vector InVec,
36
+ out-vector OutVec>
37
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
38
+ InMat A, Triangle t, DiagonalStorage d, InVec x, OutVec y);
39
+ ```
40
+
41
+ These functions perform an overwriting triangular matrix-vector product,
42
+ taking into account the `Triangle` and `DiagonalStorage` parameters that
43
+ apply to the triangular matrix `A` [[linalg.general]].
44
+
45
+ *Effects:* Computes y = A x.
46
+
47
+ *Complexity:* 𝑂(`x.extent(0)` × `A.extent(1)`).
48
+
49
+ ``` cpp
50
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
51
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d, InOutVec y);
52
+ template<class ExecutionPolicy,
53
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
54
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
55
+ InMat A, Triangle t, DiagonalStorage d, InOutVec y);
56
+ ```
57
+
58
+ These functions perform an in-place triangular matrix-vector product,
59
+ taking into account the `Triangle` and `DiagonalStorage` parameters that
60
+ apply to the triangular matrix `A` [[linalg.general]].
61
+
62
+ [*Note 1*: Performing this operation in place hinders parallelization.
63
+ However, other `ExecutionPolicy` specific optimizations, such as
64
+ vectorization, are still possible. — *end note*]
65
+
66
+ *Effects:* Computes a vector y' such that y' = A y, and assigns each
67
+ element of y' to the corresponding element of y.
68
+
69
+ *Complexity:* 𝑂(`y.extent(0)` × `A.extent(1)`).
70
+
71
+ ``` cpp
72
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
73
+ in-vector InVec1, in-vector InVec2, out-vector OutVec>
74
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d,
75
+ InVec1 x, InVec2 y, OutVec z);
76
+ template<class ExecutionPolicy, in-matrix InMat, class Triangle, class DiagonalStorage,
77
+ in-vector InVec1, in-vector InVec2, out-vector OutVec>
78
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
79
+ InMat A, Triangle t, DiagonalStorage d,
80
+ InVec1 x, InVec2 y, OutVec z);
81
+ ```
82
+
83
+ These functions perform an updating triangular matrix-vector product,
84
+ taking into account the `Triangle` and `DiagonalStorage` parameters that
85
+ apply to the triangular matrix `A` [[linalg.general]].
86
+
87
+ *Effects:* Computes z = y + A x.
88
+
89
+ *Complexity:* 𝑂(`x.extent(0)` × `A.extent(1)`).
90
+
91
+ *Remarks:* `z` may alias `y`.
92
+