Commit 18d18dc
authored
Add unwrapping mechanism for triangular mul and solves (#50058)
This adds an unwrapping mechanism to triangular matrices, basically
following the BLAS example in terms of characters encoding wrappers. It
mirrors the `AdjOrTransOrHermOrSym` mechanism closely. Packages that
want to overload by storage type can overload `generic_trimatmul!` (and
potentially `generic_matrimul!`). Note the similarity to
`generic_matvecmul!` and `generic_matmatmul!`. There is, unfortunately,
some added code due to the fact that lazy conjugate wrappers have a
different "wrapper depth" compared to the classic, e.g.,
`*Triangular{<:Any,<:Adjoint}`. I believe that with this PR we cover all
wrappers of typically dense matrices with the unwrapping mechanism. ~~An
analogous approach could be applied to `ldiv!`, if that's of interest
and of benefit to the ecosystem.~~File tree
6 files changed
+550
-504
lines changed- stdlib/LinearAlgebra
- src
- test
6 files changed
+550
-504
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | | - | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| |||
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | | - | |
| 849 | + | |
850 | 850 | | |
851 | 851 | | |
852 | 852 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 11 | | |
16 | 12 | | |
17 | 13 | | |
| |||
115 | 111 | | |
116 | 112 | | |
117 | 113 | | |
118 | | - | |
119 | | - | |
| 114 | + | |
| 115 | + | |
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | 119 | | |
124 | | - | |
125 | | - | |
| 120 | + | |
| 121 | + | |
126 | 122 | | |
127 | 123 | | |
128 | 124 | | |
| |||
131 | 127 | | |
132 | 128 | | |
133 | 129 | | |
134 | | - | |
| 130 | + | |
135 | 131 | | |
136 | 132 | | |
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
| 136 | + | |
141 | 137 | | |
142 | 138 | | |
143 | 139 | | |
| |||
0 commit comments