From Jason Turner

[linalg.syn]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpok3t6qy_/{from.md → to.md} +700 -0
tmp/tmpok3t6qy_/{from.md → to.md} RENAMED
@@ -0,0 +1,700 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### Header `<linalg>` synopsis <a id="linalg.syn">[[linalg.syn]]</a>
2
+
3
+ ``` cpp
4
+ namespace std::linalg {
5
+ // [linalg.tags.order], storage order tags
6
+ struct column_major_t;
7
+ inline constexpr column_major_t column_major;
8
+ struct row_major_t;
9
+ inline constexpr row_major_t row_major;
10
+
11
+ // [linalg.tags.triangle], triangle tags
12
+ struct upper_triangle_t;
13
+ inline constexpr upper_triangle_t upper_triangle;
14
+ struct lower_triangle_t;
15
+ inline constexpr lower_triangle_t lower_triangle;
16
+
17
+ // [linalg.tags.diagonal], diagonal tags
18
+ struct implicit_unit_diagonal_t;
19
+ inline constexpr implicit_unit_diagonal_t implicit_unit_diagonal;
20
+ struct explicit_diagonal_t;
21
+ inline constexpr explicit_diagonal_t explicit_diagonal;
22
+
23
+ // [linalg.layout.packed], class template layout_blas_packed
24
+ template<class Triangle, class StorageOrder>
25
+ class layout_blas_packed;
26
+
27
+ // [linalg.helpers], exposition-only helpers
28
+
29
+ // [linalg.helpers.concepts], linear algebra argument concepts
30
+ template<class T>
31
+ constexpr bool is-mdspan = see below; // exposition only
32
+
33
+ template<class T>
34
+ concept in-vector = see below; // exposition only
35
+
36
+ template<class T>
37
+ concept out-vector = see below; // exposition only
38
+
39
+ template<class T>
40
+ concept inout-vector = see below; // exposition only
41
+
42
+ template<class T>
43
+ concept in-matrix = see below; // exposition only
44
+
45
+ template<class T>
46
+ concept out-matrix = see below; // exposition only
47
+
48
+ template<class T>
49
+ concept inout-matrix = see below; // exposition only
50
+
51
+ template<class T>
52
+ concept possibly-packed-inout-matrix = see below; // exposition only
53
+
54
+ template<class T>
55
+ concept in-object = see below; // exposition only
56
+
57
+ template<class T>
58
+ concept out-object = see below; // exposition only
59
+
60
+ template<class T>
61
+ concept inout-object = see below; // exposition only
62
+
63
+ // [linalg.scaled], scaled in-place transformation
64
+
65
+ // [linalg.scaled.scaledaccessor], class template scaled_accessor
66
+ template<class ScalingFactor, class NestedAccessor>
67
+ class scaled_accessor;
68
+
69
+ // [linalg.scaled.scaled], function template scaled
70
+ template<class ScalingFactor,
71
+ class ElementType, class Extents, class Layout, class Accessor>
72
+ constexpr auto scaled(ScalingFactor alpha, mdspan<ElementType, Extents, Layout, Accessor> x);
73
+
74
+ // [linalg.conj], conjugated in-place transformation
75
+
76
+ // [linalg.conj.conjugatedaccessor], class template conjugated_accessor
77
+ template<class NestedAccessor>
78
+ class conjugated_accessor;
79
+
80
+ // [linalg.conj.conjugated], function template conjugated
81
+ template<class ElementType, class Extents, class Layout, class Accessor>
82
+ constexpr auto conjugated(mdspan<ElementType, Extents, Layout, Accessor> a);
83
+
84
+ // [linalg.transp], transpose in-place transformation
85
+
86
+ // [linalg.transp.layout.transpose], class template layout_transpose
87
+ template<class Layout>
88
+ class layout_transpose;
89
+
90
+ // [linalg.transp.transposed], function template transposed
91
+ template<class ElementType, class Extents, class Layout, class Accessor>
92
+ constexpr auto transposed(mdspan<ElementType, Extents, Layout, Accessor> a);
93
+
94
+ // [linalg.conjtransposed], conjugated transpose in-place transformation
95
+ template<class ElementType, class Extents, class Layout, class Accessor>
96
+ constexpr auto conjugate_transposed(mdspan<ElementType, Extents, Layout, Accessor> a);
97
+
98
+ // [linalg.algs.blas1], BLAS 1 algorithms
99
+
100
+ // [linalg.algs.blas1.givens], Givens rotations
101
+
102
+ // [linalg.algs.blas1.givens.lartg], compute Givens rotation
103
+
104
+ template<class Real>
105
+ struct setup_givens_rotation_result {
106
+ Real c;
107
+ Real s;
108
+ Real r;
109
+ };
110
+ template<class Real>
111
+ struct setup_givens_rotation_result<complex<Real>> {
112
+ Real c;
113
+ complex<Real> s;
114
+ complex<Real> r;
115
+ };
116
+
117
+ template<class Real>
118
+ setup_givens_rotation_result<Real> setup_givens_rotation(Real a, Real b) noexcept;
119
+
120
+ template<class Real>
121
+ setup_givens_rotation_result<complex<Real>>
122
+ setup_givens_rotation(complex<Real> a, complex<Real> b) noexcept;
123
+
124
+ // [linalg.algs.blas1.givens.rot], apply computed Givens rotation
125
+ template<inout-vector InOutVec1, inout-vector InOutVec2, class Real>
126
+ void apply_givens_rotation(InOutVec1 x, InOutVec2 y, Real c, Real s);
127
+ template<class ExecutionPolicy, inout-vector InOutVec1, inout-vector InOutVec2, class Real>
128
+ void apply_givens_rotation(ExecutionPolicy&& exec,
129
+ InOutVec1 x, InOutVec2 y, Real c, Real s);
130
+ template<inout-vector InOutVec1, inout-vector InOutVec2, class Real>
131
+ void apply_givens_rotation(InOutVec1 x, InOutVec2 y, Real c, complex<Real> s);
132
+ template<class ExecutionPolicy, inout-vector InOutVec1, inout-vector InOutVec2, class Real>
133
+ void apply_givens_rotation(ExecutionPolicy&& exec,
134
+ InOutVec1 x, InOutVec2 y, Real c, complex<Real> s);
135
+
136
+ // [linalg.algs.blas1.swap], swap elements
137
+ template<inout-object InOutObj1, inout-object InOutObj2>
138
+ void swap_elements(InOutObj1 x, InOutObj2 y);
139
+ template<class ExecutionPolicy, inout-object InOutObj1, inout-object InOutObj2>
140
+ void swap_elements(ExecutionPolicy&& exec, InOutObj1 x, InOutObj2 y);
141
+
142
+ // [linalg.algs.blas1.scal], multiply elements by scalar
143
+ template<class Scalar, inout-object InOutObj>
144
+ void scale(Scalar alpha, InOutObj x);
145
+ template<class ExecutionPolicy, class Scalar, inout-object InOutObj>
146
+ void scale(ExecutionPolicy&& exec, Scalar alpha, InOutObj x);
147
+
148
+ // [linalg.algs.blas1.copy], copy elements
149
+ template<in-object InObj, out-object OutObj>
150
+ void copy(InObj x, OutObj y);
151
+ template<class ExecutionPolicy, in-object InObj, out-object OutObj>
152
+ void copy(ExecutionPolicy&& exec, InObj x, OutObj y);
153
+
154
+ // [linalg.algs.blas1.add], add elementwise
155
+ template<in-object InObj1, in-object InObj2, out-object OutObj>
156
+ void add(InObj1 x, InObj2 y, OutObj z);
157
+ template<class ExecutionPolicy, in-object InObj1, in-object InObj2, out-object OutObj>
158
+ void add(ExecutionPolicy&& exec, InObj1 x, InObj2 y, OutObj z);
159
+
160
+ // [linalg.algs.blas1.dot], dot product of two vectors
161
+ template<in-vector InVec1, in-vector InVec2, class Scalar>
162
+ Scalar dot(InVec1 v1, InVec2 v2, Scalar init);
163
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2, class Scalar>
164
+ Scalar dot(ExecutionPolicy&& exec, InVec1 v1, InVec2 v2, Scalar init);
165
+ template<in-vector InVec1, in-vector InVec2>
166
+ auto dot(InVec1 v1, InVec2 v2);
167
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2>
168
+ auto dot(ExecutionPolicy&& exec, InVec1 v1, InVec2 v2);
169
+
170
+ template<in-vector InVec1, in-vector InVec2, class Scalar>
171
+ Scalar dotc(InVec1 v1, InVec2 v2, Scalar init);
172
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2, class Scalar>
173
+ Scalar dotc(ExecutionPolicy&& exec, InVec1 v1, InVec2 v2, Scalar init);
174
+ template<in-vector InVec1, in-vector InVec2>
175
+ auto dotc(InVec1 v1, InVec2 v2);
176
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2>
177
+ auto dotc(ExecutionPolicy&& exec, InVec1 v1, InVec2 v2);
178
+
179
+ // [linalg.algs.blas1.ssq], scaled sum of squares of a vector's elements
180
+ template<class Scalar>
181
+ struct sum_of_squares_result {
182
+ Scalar scaling_factor;
183
+ Scalar scaled_sum_of_squares;
184
+ };
185
+ template<in-vector InVec, class Scalar>
186
+ sum_of_squares_result<Scalar>
187
+ vector_sum_of_squares(InVec v, sum_of_squares_result<Scalar> init);
188
+ template<class ExecutionPolicy, in-vector InVec, class Scalar>
189
+ sum_of_squares_result<Scalar>
190
+ vector_sum_of_squares(ExecutionPolicy&& exec,
191
+ InVec v, sum_of_squares_result<Scalar> init);
192
+
193
+ // [linalg.algs.blas1.nrm2], Euclidean norm of a vector
194
+ template<in-vector InVec, class Scalar>
195
+ Scalar vector_two_norm(InVec v, Scalar init);
196
+ template<class ExecutionPolicy, in-vector InVec, class Scalar>
197
+ Scalar vector_two_norm(ExecutionPolicy&& exec, InVec v, Scalar init);
198
+ template<in-vector InVec>
199
+ auto vector_two_norm(InVec v);
200
+ template<class ExecutionPolicy, in-vector InVec>
201
+ auto vector_two_norm(ExecutionPolicy&& exec, InVec v);
202
+
203
+ // [linalg.algs.blas1.asum], sum of absolute values of vector elements
204
+ template<in-vector InVec, class Scalar>
205
+ Scalar vector_abs_sum(InVec v, Scalar init);
206
+ template<class ExecutionPolicy, in-vector InVec, class Scalar>
207
+ Scalar vector_abs_sum(ExecutionPolicy&& exec, InVec v, Scalar init);
208
+ template<in-vector InVec>
209
+ auto vector_abs_sum(InVec v);
210
+ template<class ExecutionPolicy, in-vector InVec>
211
+ auto vector_abs_sum(ExecutionPolicy&& exec, InVec v);
212
+
213
+ // [linalg.algs.blas1.iamax], index of maximum absolute value of vector elements
214
+ template<in-vector InVec>
215
+ typename InVec::extents_type vector_idx_abs_max(InVec v);
216
+ template<class ExecutionPolicy, in-vector InVec>
217
+ typename InVec::extents_type vector_idx_abs_max(ExecutionPolicy&& exec, InVec v);
218
+
219
+ // [linalg.algs.blas1.matfrobnorm], Frobenius norm of a matrix
220
+ template<in-matrix InMat, class Scalar>
221
+ Scalar matrix_frob_norm(InMat A, Scalar init);
222
+ template<class ExecutionPolicy, in-matrix InMat, class Scalar>
223
+ Scalar matrix_frob_norm(ExecutionPolicy&& exec, InMat A, Scalar init);
224
+ template<in-matrix InMat>
225
+ auto matrix_frob_norm(InMat A);
226
+ template<class ExecutionPolicy, in-matrix InMat>
227
+ auto matrix_frob_norm(ExecutionPolicy&& exec, InMat A);
228
+
229
+ // [linalg.algs.blas1.matonenorm], one norm of a matrix
230
+ template<in-matrix InMat, class Scalar>
231
+ Scalar matrix_one_norm(InMat A, Scalar init);
232
+ template<class ExecutionPolicy, in-matrix InMat, class Scalar>
233
+ Scalar matrix_one_norm(ExecutionPolicy&& exec, InMat A, Scalar init);
234
+ template<in-matrix InMat>
235
+ auto matrix_one_norm(InMat A);
236
+ template<class ExecutionPolicy, in-matrix InMat>
237
+ auto matrix_one_norm(ExecutionPolicy&& exec, InMat A);
238
+
239
+ // [linalg.algs.blas1.matinfnorm], infinity norm of a matrix
240
+ template<in-matrix InMat, class Scalar>
241
+ Scalar matrix_inf_norm(InMat A, Scalar init);
242
+ template<class ExecutionPolicy, in-matrix InMat, class Scalar>
243
+ Scalar matrix_inf_norm(ExecutionPolicy&& exec, InMat A, Scalar init);
244
+ template<in-matrix InMat>
245
+ auto matrix_inf_norm(InMat A);
246
+ template<class ExecutionPolicy, in-matrix InMat>
247
+ auto matrix_inf_norm(ExecutionPolicy&& exec, InMat A);
248
+
249
+ // [linalg.algs.blas2], BLAS 2 algorithms
250
+
251
+ // [linalg.algs.blas2.gemv], general matrix-vector product
252
+ template<in-matrix InMat, in-vector InVec, out-vector OutVec>
253
+ void matrix_vector_product(InMat A, InVec x, OutVec y);
254
+ template<class ExecutionPolicy, in-matrix InMat, in-vector InVec, out-vector OutVec>
255
+ void matrix_vector_product(ExecutionPolicy&& exec, InMat A, InVec x, OutVec y);
256
+ template<in-matrix InMat, in-vector InVec1, in-vector InVec2, out-vector OutVec>
257
+ void matrix_vector_product(InMat A, InVec1 x, InVec2 y, OutVec z);
258
+ template<class ExecutionPolicy,
259
+ in-matrix InMat, in-vector InVec1, in-vector InVec2, out-vector OutVec>
260
+ void matrix_vector_product(ExecutionPolicy&& exec, InMat A, InVec1 x, InVec2 y, OutVec z);
261
+
262
+ // [linalg.algs.blas2.symv], symmetric matrix-vector product
263
+ template<in-matrix InMat, class Triangle, in-vector InVec, out-vector OutVec>
264
+ void symmetric_matrix_vector_product(InMat A, Triangle t, InVec x, OutVec y);
265
+ template<class ExecutionPolicy,
266
+ in-matrix InMat, class Triangle, in-vector InVec, out-vector OutVec>
267
+ void symmetric_matrix_vector_product(ExecutionPolicy&& exec,
268
+ InMat A, Triangle t, InVec x, OutVec y);
269
+ template<in-matrix InMat, class Triangle, in-vector InVec1, in-vector InVec2,
270
+ out-vector OutVec>
271
+ void symmetric_matrix_vector_product(InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);
272
+ template<class ExecutionPolicy,
273
+ in-matrix InMat, class Triangle, in-vector InVec1, in-vector InVec2,
274
+ out-vector OutVec>
275
+ void symmetric_matrix_vector_product(ExecutionPolicy&& exec,
276
+ InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);
277
+
278
+ // [linalg.algs.blas2.hemv], Hermitian matrix-vector product
279
+ template<in-matrix InMat, class Triangle, in-vector InVec, out-vector OutVec>
280
+ void hermitian_matrix_vector_product(InMat A, Triangle t, InVec x, OutVec y);
281
+ template<class ExecutionPolicy,
282
+ in-matrix InMat, class Triangle, in-vector InVec, out-vector OutVec>
283
+ void hermitian_matrix_vector_product(ExecutionPolicy&& exec,
284
+ InMat A, Triangle t, InVec x, OutVec y);
285
+ template<in-matrix InMat, class Triangle, in-vector InVec1, in-vector InVec2,
286
+ out-vector OutVec>
287
+ void hermitian_matrix_vector_product(InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);
288
+ template<class ExecutionPolicy,
289
+ in-matrix InMat, class Triangle, in-vector InVec1, in-vector InVec2,
290
+ out-vector OutVec>
291
+ void hermitian_matrix_vector_product(ExecutionPolicy&& exec,
292
+ InMat A, Triangle t, InVec1 x, InVec2 y, OutVec z);
293
+
294
+ // [linalg.algs.blas2.trmv], triangular matrix-vector product
295
+
296
+ // Overwriting triangular matrix-vector product
297
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, in-vector InVec,
298
+ out-vector OutVec>
299
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d,
300
+ InVec x, OutVec y);
301
+ template<class ExecutionPolicy,
302
+ in-matrix InMat, class Triangle, class DiagonalStorage, in-vector InVec,
303
+ out-vector OutVec>
304
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
305
+ InMat A, Triangle t, DiagonalStorage d,
306
+ InVec x, OutVec y);
307
+
308
+ // In-place triangular matrix-vector product
309
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
310
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d, InOutVec y);
311
+ template<class ExecutionPolicy,
312
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
313
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
314
+ InMat A, Triangle t, DiagonalStorage d, InOutVec y);
315
+
316
+ // Updating triangular matrix-vector product
317
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
318
+ in-vector InVec1, in-vector InVec2, out-vector OutVec>
319
+ void triangular_matrix_vector_product(InMat A, Triangle t, DiagonalStorage d,
320
+ InVec1 x, InVec2 y, OutVec z);
321
+ template<class ExecutionPolicy, in-matrix InMat, class Triangle, class DiagonalStorage,
322
+ in-vector InVec1, in-vector InVec2, out-vector OutVec>
323
+ void triangular_matrix_vector_product(ExecutionPolicy&& exec,
324
+ InMat A, Triangle t, DiagonalStorage d,
325
+ InVec1 x, InVec2 y, OutVec z);
326
+
327
+ // [linalg.algs.blas2.trsv], solve a triangular linear system
328
+
329
+ // Solve a triangular linear system, not in place
330
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
331
+ in-vector InVec, out-vector OutVec, class BinaryDivideOp>
332
+ void triangular_matrix_vector_solve(InMat A, Triangle t, DiagonalStorage d,
333
+ InVec b, OutVec x, BinaryDivideOp divide);
334
+ template<class ExecutionPolicy, in-matrix InMat, class Triangle, class DiagonalStorage,
335
+ in-vector InVec, out-vector OutVec, class BinaryDivideOp>
336
+ void triangular_matrix_vector_solve(ExecutionPolicy&& exec,
337
+ InMat A, Triangle t, DiagonalStorage d,
338
+ InVec b, OutVec x, BinaryDivideOp divide);
339
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
340
+ in-vector InVec, out-vector OutVec>
341
+ void triangular_matrix_vector_solve(InMat A, Triangle t, DiagonalStorage d,
342
+ InVec b, OutVec x);
343
+ template<class ExecutionPolicy, in-matrix InMat, class Triangle, class DiagonalStorage,
344
+ in-vector InVec, out-vector OutVec>
345
+ void triangular_matrix_vector_solve(ExecutionPolicy&& exec,
346
+ InMat A, Triangle t, DiagonalStorage d,
347
+ InVec b, OutVec x);
348
+
349
+ // Solve a triangular linear system, in place
350
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
351
+ inout-vector InOutVec, class BinaryDivideOp>
352
+ void triangular_matrix_vector_solve(InMat A, Triangle t, DiagonalStorage d,
353
+ InOutVec b, BinaryDivideOp divide);
354
+ template<class ExecutionPolicy, in-matrix InMat, class Triangle, class DiagonalStorage,
355
+ inout-vector InOutVec, class BinaryDivideOp>
356
+ void triangular_matrix_vector_solve(ExecutionPolicy&& exec,
357
+ InMat A, Triangle t, DiagonalStorage d,
358
+ InOutVec b, BinaryDivideOp divide);
359
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
360
+ void triangular_matrix_vector_solve(InMat A, Triangle t, DiagonalStorage d, InOutVec b);
361
+ template<class ExecutionPolicy,
362
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-vector InOutVec>
363
+ void triangular_matrix_vector_solve(ExecutionPolicy&& exec,
364
+ InMat A, Triangle t, DiagonalStorage d, InOutVec b);
365
+
366
+ // [linalg.algs.blas2.rank1], nonsymmetric rank-1 matrix update
367
+ template<in-vector InVec1, in-vector InVec2, inout-matrix InOutMat>
368
+ void matrix_rank_1_update(InVec1 x, InVec2 y, InOutMat A);
369
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2, inout-matrix InOutMat>
370
+ void matrix_rank_1_update(ExecutionPolicy&& exec, InVec1 x, InVec2 y, InOutMat A);
371
+
372
+ template<in-vector InVec1, in-vector InVec2, inout-matrix InOutMat>
373
+ void matrix_rank_1_update_c(InVec1 x, InVec2 y, InOutMat A);
374
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2, inout-matrix InOutMat>
375
+ void matrix_rank_1_update_c(ExecutionPolicy&& exec, InVec1 x, InVec2 y, InOutMat A);
376
+
377
+ // [linalg.algs.blas2.symherrank1], symmetric or Hermitian rank-1 matrix update
378
+ template<class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
379
+ void symmetric_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t);
380
+ template<class ExecutionPolicy,
381
+ class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
382
+ void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec,
383
+ Scalar alpha, InVec x, InOutMat A, Triangle t);
384
+ template<in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
385
+ void symmetric_matrix_rank_1_update(InVec x, InOutMat A, Triangle t);
386
+ template<class ExecutionPolicy,
387
+ in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
388
+ void symmetric_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
389
+
390
+ template<class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
391
+ void hermitian_matrix_rank_1_update(Scalar alpha, InVec x, InOutMat A, Triangle t);
392
+ template<class ExecutionPolicy,
393
+ class Scalar, in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
394
+ void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec,
395
+ Scalar alpha, InVec x, InOutMat A, Triangle t);
396
+ template<in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
397
+ void hermitian_matrix_rank_1_update(InVec x, InOutMat A, Triangle t);
398
+ template<class ExecutionPolicy,
399
+ in-vector InVec, possibly-packed-inout-matrix InOutMat, class Triangle>
400
+ void hermitian_matrix_rank_1_update(ExecutionPolicy&& exec, InVec x, InOutMat A, Triangle t);
401
+
402
+ // [linalg.algs.blas2.rank2], symmetric and Hermitian rank-2 matrix updates
403
+
404
+ // symmetric rank-2 matrix update
405
+ template<in-vector InVec1, in-vector InVec2,
406
+ possibly-packed-inout-matrix InOutMat, class Triangle>
407
+ void symmetric_matrix_rank_2_update(InVec1 x, InVec2 y, InOutMat A, Triangle t);
408
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2,
409
+ possibly-packed-inout-matrix InOutMat, class Triangle>
410
+ void symmetric_matrix_rank_2_update(ExecutionPolicy&& exec,
411
+ InVec1 x, InVec2 y, InOutMat A, Triangle t);
412
+
413
+ // Hermitian rank-2 matrix update
414
+ template<in-vector InVec1, in-vector InVec2,
415
+ possibly-packed-inout-matrix InOutMat, class Triangle>
416
+ void hermitian_matrix_rank_2_update(InVec1 x, InVec2 y, InOutMat A, Triangle t);
417
+ template<class ExecutionPolicy, in-vector InVec1, in-vector InVec2,
418
+ possibly-packed-inout-matrix InOutMat, class Triangle>
419
+ void hermitian_matrix_rank_2_update(ExecutionPolicy&& exec,
420
+ InVec1 x, InVec2 y, InOutMat A, Triangle t);
421
+
422
+ // [linalg.algs.blas3], BLAS 3 algorithms
423
+
424
+ // [linalg.algs.blas3.gemm], general matrix-matrix product
425
+ template<in-matrix InMat1, in-matrix InMat2, out-matrix OutMat>
426
+ void matrix_product(InMat1 A, InMat2 B, OutMat C);
427
+ template<class ExecutionPolicy, in-matrix InMat1, in-matrix InMat2, out-matrix OutMat>
428
+ void matrix_product(ExecutionPolicy&& exec,
429
+ InMat1 A, InMat2 B, OutMat C);
430
+ template<in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, out-matrix OutMat>
431
+ void matrix_product(InMat1 A, InMat2 B, InMat3 E, OutMat C);
432
+ template<class ExecutionPolicy,
433
+ in-matrix InMat1, in-matrix InMat2, in-matrix InMat3, out-matrix OutMat>
434
+ void matrix_product(ExecutionPolicy&& exec,
435
+ InMat1 A, InMat2 B, InMat3 E, OutMat C);
436
+
437
+ // [linalg.algs.blas3.xxmm], symmetric, Hermitian, and triangular matrix-matrix product
438
+
439
+ template<in-matrix InMat1, class Triangle, in-matrix InMat2, out-matrix OutMat>
440
+ void symmetric_matrix_product(InMat1 A, Triangle t, InMat2 B, OutMat C);
441
+ template<class ExecutionPolicy,
442
+ in-matrix InMat1, class Triangle, in-matrix InMat2, out-matrix OutMat>
443
+ void symmetric_matrix_product(ExecutionPolicy&& exec,
444
+ InMat1 A, Triangle t, InMat2 B, OutMat C);
445
+
446
+ template<in-matrix InMat1, class Triangle, in-matrix InMat2, out-matrix OutMat>
447
+ void hermitian_matrix_product(InMat1 A, Triangle t, InMat2 B, OutMat C);
448
+ template<class ExecutionPolicy,
449
+ in-matrix InMat1, class Triangle, in-matrix InMat2, out-matrix OutMat>
450
+ void hermitian_matrix_product(ExecutionPolicy&& exec,
451
+ InMat1 A, Triangle t, InMat2 B, OutMat C);
452
+
453
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
454
+ in-matrix InMat2, out-matrix OutMat>
455
+ void triangular_matrix_product(InMat1 A, Triangle t, DiagonalStorage d, InMat2 B, OutMat C);
456
+ template<class ExecutionPolicy,
457
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
458
+ in-matrix InMat2, out-matrix OutMat>
459
+ void triangular_matrix_product(ExecutionPolicy&& exec,
460
+ InMat1 A, Triangle t, DiagonalStorage d, InMat2 B, OutMat C);
461
+
462
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, out-matrix OutMat>
463
+ void symmetric_matrix_product(InMat1 A, InMat2 B, Triangle t, OutMat C);
464
+ template<class ExecutionPolicy,
465
+ in-matrix InMat1, in-matrix InMat2, class Triangle, out-matrix OutMat>
466
+ void symmetric_matrix_product(ExecutionPolicy&& exec,
467
+ InMat1 A, InMat2 B, Triangle t, OutMat C);
468
+
469
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, out-matrix OutMat>
470
+ void hermitian_matrix_product(InMat1 A, InMat2 B, Triangle t, OutMat C);
471
+ template<class ExecutionPolicy,
472
+ in-matrix InMat1, in-matrix InMat2, class Triangle, out-matrix OutMat>
473
+ void hermitian_matrix_product(ExecutionPolicy&& exec,
474
+ InMat1 A, InMat2 B, Triangle t, OutMat C);
475
+
476
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, class DiagonalStorage,
477
+ out-matrix OutMat>
478
+ void triangular_matrix_product(InMat1 A, InMat2 B, Triangle t, DiagonalStorage d, OutMat C);
479
+ template<class ExecutionPolicy,
480
+ in-matrix InMat1, in-matrix InMat2, class Triangle, class DiagonalStorage,
481
+ out-matrix OutMat>
482
+ void triangular_matrix_product(ExecutionPolicy&& exec,
483
+ InMat1 A, InMat2 B, Triangle t, DiagonalStorage d, OutMat C);
484
+
485
+ template<in-matrix InMat1, class Triangle, in-matrix InMat2, in-matrix InMat3,
486
+ out-matrix OutMat>
487
+ void symmetric_matrix_product(InMat1 A, Triangle t, InMat2 B, InMat3 E, OutMat C);
488
+ template<class ExecutionPolicy,
489
+ in-matrix InMat1, class Triangle, in-matrix InMat2, in-matrix InMat3,
490
+ out-matrix OutMat>
491
+ void symmetric_matrix_product(ExecutionPolicy&& exec,
492
+ InMat1 A, Triangle t, InMat2 B, InMat3 E, OutMat C);
493
+
494
+ template<in-matrix InMat1, class Triangle, in-matrix InMat2, in-matrix InMat3,
495
+ out-matrix OutMat>
496
+ void hermitian_matrix_product(InMat1 A, Triangle t, InMat2 B, InMat3 E, OutMat C);
497
+ template<class ExecutionPolicy,
498
+ in-matrix InMat1, class Triangle, in-matrix InMat2, in-matrix InMat3,
499
+ out-matrix OutMat>
500
+ void hermitian_matrix_product(ExecutionPolicy&& exec,
501
+ InMat1 A, Triangle t, InMat2 B, InMat3 E, OutMat C);
502
+
503
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
504
+ in-matrix InMat2, in-matrix InMat3, out-matrix OutMat>
505
+ void triangular_matrix_product(InMat1 A, Triangle t, DiagonalStorage d, InMat2 B, InMat3 E,
506
+ OutMat C);
507
+ template<class ExecutionPolicy,
508
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
509
+ in-matrix InMat2, in-matrix InMat3, out-matrix OutMat>
510
+ void triangular_matrix_product(ExecutionPolicy&& exec,
511
+ InMat1 A, Triangle t, DiagonalStorage d, InMat2 B, InMat3 E,
512
+ OutMat C);
513
+
514
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, in-matrix InMat3,
515
+ out-matrix OutMat>
516
+ void symmetric_matrix_product(InMat1 A, InMat2 B, Triangle t, InMat3 E, OutMat C);
517
+ template<class ExecutionPolicy,
518
+ in-matrix InMat1, in-matrix InMat2, class Triangle, in-matrix InMat3,
519
+ out-matrix OutMat>
520
+ void symmetric_matrix_product(ExecutionPolicy&& exec,
521
+ InMat1 A, InMat2 B, Triangle t, InMat3 E, OutMat C);
522
+
523
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, in-matrix InMat3,
524
+ out-matrix OutMat>
525
+ void hermitian_matrix_product(InMat1 A, InMat2 B, Triangle t, InMat3 E, OutMat C);
526
+ template<class ExecutionPolicy,
527
+ in-matrix InMat1, in-matrix InMat2, class Triangle, in-matrix InMat3,
528
+ out-matrix OutMat>
529
+ void hermitian_matrix_product(ExecutionPolicy&& exec,
530
+ InMat1 A, InMat2 B, Triangle t, InMat3 E, OutMat C);
531
+
532
+ template<in-matrix InMat1, in-matrix InMat2, class Triangle, class DiagonalStorage,
533
+ in-matrix InMat3, out-matrix OutMat>
534
+ void triangular_matrix_product(InMat1 A, InMat2 B, Triangle t, DiagonalStorage d, InMat3 E,
535
+ OutMat C);
536
+ template<class ExecutionPolicy,
537
+ in-matrix InMat1, in-matrix InMat2, class Triangle, class DiagonalStorage,
538
+ in-matrix InMat3, out-matrix OutMat>
539
+ void triangular_matrix_product(ExecutionPolicy&& exec,
540
+ InMat1 A, InMat2 B, Triangle t, DiagonalStorage d, InMat3 E,
541
+ OutMat C);
542
+
543
+ // [linalg.algs.blas3.trmm], in-place triangular matrix-matrix product
544
+
545
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
546
+ void triangular_matrix_left_product(InMat A, Triangle t, DiagonalStorage d, InOutMat C);
547
+ template<class ExecutionPolicy,
548
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
549
+ void triangular_matrix_left_product(ExecutionPolicy&& exec,
550
+ InMat A, Triangle t, DiagonalStorage d, InOutMat C);
551
+
552
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
553
+ void triangular_matrix_right_product(InMat A, Triangle t, DiagonalStorage d, InOutMat C);
554
+ template<class ExecutionPolicy,
555
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
556
+ void triangular_matrix_right_product(ExecutionPolicy&& exec,
557
+ InMat A, Triangle t, DiagonalStorage d, InOutMat C);
558
+
559
+ // [linalg.algs.blas3.rankk], rank-k update of a symmetric or Hermitian matrix
560
+
561
+ // rank-k symmetric matrix update
562
+ template<class Scalar, in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
563
+ void symmetric_matrix_rank_k_update(Scalar alpha, InMat A, InOutMat C, Triangle t);
564
+ template<class ExecutionPolicy, class Scalar,
565
+ in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
566
+ void symmetric_matrix_rank_k_update(ExecutionPolicy&& exec,
567
+ Scalar alpha, InMat A, InOutMat C, Triangle t);
568
+
569
+ template<in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
570
+ void symmetric_matrix_rank_k_update(InMat A, InOutMat C, Triangle t);
571
+ template<class ExecutionPolicy,
572
+ in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
573
+ void symmetric_matrix_rank_k_update(ExecutionPolicy&& exec,
574
+ InMat A, InOutMat C, Triangle t);
575
+
576
+ // rank-k Hermitian matrix update
577
+ template<class Scalar, in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
578
+ void hermitian_matrix_rank_k_update(Scalar alpha, InMat A, InOutMat C, Triangle t);
579
+ template<class ExecutionPolicy,
580
+ class Scalar, in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
581
+ void hermitian_matrix_rank_k_update(ExecutionPolicy&& exec,
582
+ Scalar alpha, InMat A, InOutMat C, Triangle t);
583
+
584
+ template<in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
585
+ void hermitian_matrix_rank_k_update(InMat A, InOutMat C, Triangle t);
586
+ template<class ExecutionPolicy,
587
+ in-matrix InMat, possibly-packed-inout-matrix InOutMat, class Triangle>
588
+ void hermitian_matrix_rank_k_update(ExecutionPolicy&& exec,
589
+ InMat A, InOutMat C, Triangle t);
590
+
591
+ // [linalg.algs.blas3.rank2k], rank-2k update of a symmetric or Hermitian matrix
592
+
593
+ // rank-2k symmetric matrix update
594
+ template<in-matrix InMat1, in-matrix InMat2,
595
+ possibly-packed-inout-matrix InOutMat, class Triangle>
596
+ void symmetric_matrix_rank_2k_update(InMat1 A, InMat2 B, InOutMat C, Triangle t);
597
+ template<class ExecutionPolicy,
598
+ in-matrix InMat1, in-matrix InMat2,
599
+ possibly-packed-inout-matrix InOutMat, class Triangle>
600
+ void symmetric_matrix_rank_2k_update(ExecutionPolicy&& exec,
601
+ InMat1 A, InMat2 B, InOutMat C, Triangle t);
602
+
603
+ // rank-2k Hermitian matrix update
604
+ template<in-matrix InMat1, in-matrix InMat2,
605
+ possibly-packed-inout-matrix InOutMat, class Triangle>
606
+ void hermitian_matrix_rank_2k_update(InMat1 A, InMat2 B, InOutMat C, Triangle t);
607
+ template<class ExecutionPolicy,
608
+ in-matrix InMat1, in-matrix InMat2,
609
+ possibly-packed-inout-matrix InOutMat, class Triangle>
610
+ void hermitian_matrix_rank_2k_update(ExecutionPolicy&& exec,
611
+ InMat1 A, InMat2 B, InOutMat C, Triangle t);
612
+
613
+ // [linalg.algs.blas3.trsm], solve multiple triangular linear systems
614
+
615
+ // solve multiple triangular systems on the left, not-in-place
616
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
617
+ in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
618
+ void triangular_matrix_matrix_left_solve(InMat1 A, Triangle t, DiagonalStorage d,
619
+ InMat2 B, OutMat X, BinaryDivideOp divide);
620
+ template<class ExecutionPolicy,
621
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
622
+ in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
623
+ void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
624
+ InMat1 A, Triangle t, DiagonalStorage d,
625
+ InMat2 B, OutMat X, BinaryDivideOp divide);
626
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
627
+ in-matrix InMat2, out-matrix OutMat>
628
+ void triangular_matrix_matrix_left_solve(InMat1 A, Triangle t, DiagonalStorage d,
629
+ InMat2 B, OutMat X);
630
+ template<class ExecutionPolicy,
631
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
632
+ in-matrix InMat2, out-matrix OutMat>
633
+ void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
634
+ InMat1 A, Triangle t, DiagonalStorage d,
635
+ InMat2 B, OutMat X);
636
+
637
+ // solve multiple triangular systems on the right, not-in-place
638
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
639
+ in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
640
+ void triangular_matrix_matrix_right_solve(InMat1 A, Triangle t, DiagonalStorage d,
641
+ InMat2 B, OutMat X, BinaryDivideOp divide);
642
+ template<class ExecutionPolicy,
643
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
644
+ in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
645
+ void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
646
+ InMat1 A, Triangle t, DiagonalStorage d,
647
+ InMat2 B, OutMat X, BinaryDivideOp divide);
648
+ template<in-matrix InMat1, class Triangle, class DiagonalStorage,
649
+ in-matrix InMat2, out-matrix OutMat>
650
+ void triangular_matrix_matrix_right_solve(InMat1 A, Triangle t, DiagonalStorage d,
651
+ InMat2 B, OutMat X);
652
+ template<class ExecutionPolicy,
653
+ in-matrix InMat1, class Triangle, class DiagonalStorage,
654
+ in-matrix InMat2, out-matrix OutMat>
655
+ void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
656
+ InMat1 A, Triangle t, DiagonalStorage d,
657
+ InMat2 B, OutMat X);
658
+
659
+ // solve multiple triangular systems on the left, in-place
660
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
661
+ inout-matrix InOutMat, class BinaryDivideOp>
662
+ void triangular_matrix_matrix_left_solve(InMat A, Triangle t, DiagonalStorage d,
663
+ InOutMat B, BinaryDivideOp divide);
664
+ template<class ExecutionPolicy,
665
+ in-matrix InMat, class Triangle, class DiagonalStorage,
666
+ inout-matrix InOutMat, class BinaryDivideOp>
667
+ void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
668
+ InMat A, Triangle t, DiagonalStorage d,
669
+ InOutMat B, BinaryDivideOp divide);
670
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
671
+ void triangular_matrix_matrix_left_solve(InMat A, Triangle t, DiagonalStorage d,
672
+ InOutMat B);
673
+ template<class ExecutionPolicy,
674
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
675
+ void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
676
+ InMat A, Triangle t, DiagonalStorage d,
677
+ InOutMat B);
678
+
679
+ // solve multiple triangular systems on the right, in-place
680
+ template<in-matrix InMat, class Triangle, class DiagonalStorage,
681
+ inout-matrix InOutMat, class BinaryDivideOp>
682
+ void triangular_matrix_matrix_right_solve(InMat A, Triangle t, DiagonalStorage d,
683
+ InOutMat B, BinaryDivideOp divide);
684
+ template<class ExecutionPolicy,
685
+ in-matrix InMat, class Triangle, class DiagonalStorage,
686
+ inout-matrix InOutMat, class BinaryDivideOp>
687
+ void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
688
+ InMat A, Triangle t, DiagonalStorage d,
689
+ InOutMat B, BinaryDivideOp divide);
690
+ template<in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
691
+ void triangular_matrix_matrix_right_solve(InMat A, Triangle t, DiagonalStorage d,
692
+ InOutMat B);
693
+ template<class ExecutionPolicy,
694
+ in-matrix InMat, class Triangle, class DiagonalStorage, inout-matrix InOutMat>
695
+ void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
696
+ InMat A, Triangle t, DiagonalStorage d,
697
+ InOutMat B);
698
+ }
699
+ ```
700
+