Commit 6c9fbac
Specialize functions on f parameter for trim compatibility
Similar to #684 and SciML/OrdinaryDiffEq.jl#2854, this PR adds type specialization for the f parameter in several functions across NonlinearSolve.jl to improve compatibility with --trim and reduce dynamic dispatch.
Functions specialized:
- _make_py_residual in NonlinearSolveSciPy.jl
- _make_py_scalar in NonlinearSolveSciPy.jl
- dogleg_method!! in trust_region.jl
- construct_jacobian in jacobian_handling.jl (both general and AutoEnzyme versions)
These functions either call f directly, pass f to other functions, or work with f in ways that benefit from type specialization for better compiler optimizations.1 parent b37b31b commit 6c9fbac
File tree
3 files changed
+5
-5
lines changed- lib
- NonlinearSolveHomotopyContinuation/src
- NonlinearSolveSciPy/src
- SimpleNonlinearSolve/src
3 files changed
+5
-5
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
0 commit comments