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ond to the BLAS function
|
| 4 |
+
`xTRSM`. — *end note*]
|
| 5 |
+
|
| 6 |
+
``` cpp
|
| 7 |
+
template<in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 8 |
+
in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
|
| 9 |
+
void triangular_matrix_matrix_left_solve(InMat1 A, Triangle t, DiagonalStorage d,
|
| 10 |
+
InMat2 B, OutMat X, BinaryDivideOp divide);
|
| 11 |
+
template<class ExecutionPolicy,
|
| 12 |
+
in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 13 |
+
in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
|
| 14 |
+
void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
|
| 15 |
+
InMat1 A, Triangle t, DiagonalStorage d,
|
| 16 |
+
InMat2 B, OutMat X, BinaryDivideOp divide);
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
These functions perform multiple matrix solves, taking into account the
|
| 20 |
+
`Triangle` and `DiagonalStorage` parameters that apply to the triangular
|
| 21 |
+
matrix `A` [[linalg.general]].
|
| 22 |
+
|
| 23 |
+
*Mandates:*
|
| 24 |
+
|
| 25 |
+
- If `InMat1` has `layout_blas_packed` layout, then the layout’s
|
| 26 |
+
`Triangle` template argument has the same type as the function’s
|
| 27 |
+
`Triangle` template argument;
|
| 28 |
+
- *`possibly-multipliable`*`<InMat1, OutMat, InMat2>()` is `true`; and
|
| 29 |
+
- *`compatible-static-extents`*`<InMat1, InMat1>(0, 1)` is `true`.
|
| 30 |
+
|
| 31 |
+
*Preconditions:*
|
| 32 |
+
|
| 33 |
+
- *`multipliable`*`(A, X, B)` is `true`, and
|
| 34 |
+
- `A.extent(0) == A.extent(1)` is `true`.
|
| 35 |
+
|
| 36 |
+
*Effects:* Computes X' such that AX' = B, and assigns each element of X'
|
| 37 |
+
to the corresponding element of X. If no such X' exists, then the
|
| 38 |
+
elements of `X` are valid but unspecified.
|
| 39 |
+
|
| 40 |
+
*Complexity:* 𝑂(`A.extent(0)` × `X.extent(1)` × `X.extent(1)`).
|
| 41 |
+
|
| 42 |
+
[*Note 2*: Since the triangular matrix is on the left, the desired
|
| 43 |
+
`divide` implementation in the case of noncommutative multiplication is
|
| 44 |
+
mathematically equivalent to $y^{-1} x$, where x is the first argument
|
| 45 |
+
and y is the second argument, and $y^{-1}$ denotes the multiplicative
|
| 46 |
+
inverse of y. — *end note*]
|
| 47 |
+
|
| 48 |
+
``` cpp
|
| 49 |
+
template<in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 50 |
+
in-matrix InMat2, out-matrix OutMat>
|
| 51 |
+
void triangular_matrix_matrix_left_solve(InMat1 A, Triangle t, DiagonalStorage d,
|
| 52 |
+
InMat2 B, OutMat X);
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
*Effects:* Equivalent to:
|
| 56 |
+
|
| 57 |
+
``` cpp
|
| 58 |
+
triangular_matrix_matrix_left_solve(A, t, d, B, X, divides<void>{});
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
``` cpp
|
| 62 |
+
template<class ExecutionPolicy, in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 63 |
+
in-matrix InMat2, out-matrix OutMat>
|
| 64 |
+
void triangular_matrix_matrix_left_solve(ExecutionPolicy&& exec,
|
| 65 |
+
InMat1 A, Triangle t, DiagonalStorage d,
|
| 66 |
+
InMat2 B, OutMat X);
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
*Effects:* Equivalent to:
|
| 70 |
+
|
| 71 |
+
``` cpp
|
| 72 |
+
triangular_matrix_matrix_left_solve(std::forward<ExecutionPolicy>(exec),
|
| 73 |
+
A, t, d, B, X, divides<void>{});
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
``` cpp
|
| 77 |
+
template<in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 78 |
+
in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
|
| 79 |
+
void triangular_matrix_matrix_right_solve(InMat1 A, Triangle t, DiagonalStorage d,
|
| 80 |
+
InMat2 B, OutMat X, BinaryDivideOp divide);
|
| 81 |
+
template<class ExecutionPolicy,
|
| 82 |
+
in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 83 |
+
in-matrix InMat2, out-matrix OutMat, class BinaryDivideOp>
|
| 84 |
+
void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
|
| 85 |
+
InMat1 A, Triangle t, DiagonalStorage d,
|
| 86 |
+
InMat2 B, OutMat X, BinaryDivideOp divide);
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
These functions perform multiple matrix solves, taking into account the
|
| 90 |
+
`Triangle` and `DiagonalStorage` parameters that apply to the triangular
|
| 91 |
+
matrix `A` [[linalg.general]].
|
| 92 |
+
|
| 93 |
+
*Mandates:*
|
| 94 |
+
|
| 95 |
+
- If `InMat1` has `layout_blas_packed` layout, then the layout’s
|
| 96 |
+
`Triangle` template argument has the same type as the function’s
|
| 97 |
+
`Triangle` template argument;
|
| 98 |
+
- *`possibly-multipliable`*`<OutMat, InMat1, InMat2>()` is `true`; and
|
| 99 |
+
- *`compatible-static-extents`*`<InMat1, InMat1>(0,1)` is `true`.
|
| 100 |
+
|
| 101 |
+
*Preconditions:*
|
| 102 |
+
|
| 103 |
+
- *`multipliable`*`(X, A, B)` is `true`, and
|
| 104 |
+
- `A.extent(0) == A.extent(1)` is `true`.
|
| 105 |
+
|
| 106 |
+
*Effects:* Computes X' such that X'A = B, and assigns each element of X'
|
| 107 |
+
to the corresponding element of X. If no such X' exists, then the
|
| 108 |
+
elements of `X` are valid but unspecified.
|
| 109 |
+
|
| 110 |
+
*Complexity:* O( `B.extent(0)` ⋅ `B.extent(1)` ⋅ `A.extent(1)` )
|
| 111 |
+
|
| 112 |
+
[*Note 1*: Since the triangular matrix is on the right, the desired
|
| 113 |
+
`divide` implementation in the case of noncommutative multiplication is
|
| 114 |
+
mathematically equivalent to $x y^{-1}$, where x is the first argument
|
| 115 |
+
and y is the second argument, and $y^{-1}$ denotes the multiplicative
|
| 116 |
+
inverse of y. — *end note*]
|
| 117 |
+
|
| 118 |
+
``` cpp
|
| 119 |
+
template<in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 120 |
+
in-matrix InMat2, out-matrix OutMat>
|
| 121 |
+
void triangular_matrix_matrix_right_solve(InMat1 A, Triangle t, DiagonalStorage d,
|
| 122 |
+
InMat2 B, OutMat X);
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
*Effects:* Equivalent to:
|
| 126 |
+
|
| 127 |
+
``` cpp
|
| 128 |
+
triangular_matrix_matrix_right_solve(A, t, d, B, X, divides<void>{});
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
``` cpp
|
| 132 |
+
template<class ExecutionPolicy, in-matrix InMat1, class Triangle, class DiagonalStorage,
|
| 133 |
+
in-matrix InMat2, out-matrix OutMat>
|
| 134 |
+
void triangular_matrix_matrix_right_solve(ExecutionPolicy&& exec,
|
| 135 |
+
InMat1 A, Triangle t, DiagonalStorage d,
|
| 136 |
+
InMat2 B, OutMat X);
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
*Effects:* Equivalent to:
|
| 140 |
+
|
| 141 |
+
``` cpp
|
| 142 |
+
triangular_matrix_matrix_right_solve(std::forward<ExecutionPolicy>(exec),
|
| 143 |
+
A, t, d, B, X, divides<void>{});
|
| 144 |
+
```
|
| 145 |
+
|