Commit 981e21c
Feature/autodiff (#1413)
* Update for regex 20 lookbehind test.
Removed cpp file and added cpp2 file.
* Fix for name lookup issues with MSVC.
* Add missing files.
* Refactor of autodiff with generalized traversal.
Added test for autodiff.
* Handling of expression lists.
* Handling of expresson terms.
* Handling of function calls.
* Added special handling of math functions.
* Added declarations and statements to simple_traversal.
* Handling if/else statements.
* Added handling of direct return.
* Stub handling of value declarations.
* Added example for non differential variable.
* Added handling of while and do while loops.
* Handling of for loops and added special functions.
* Unified function call handling.
* Proper handling of initializer expressions.
* Fix initializer problem.
* Suffix can now be user defined.
* Added second order test.
* Remove initialization order workaround.
* Taylor polynomial propagation implementation.
* Basic handling of higher order derivatives and handling of add and minus.
* Added handling for multiply and division.
* Higher order handling for special functions.
* Remaining tests for higher order derivatives.
* Declaration lookup and lookup of function return name.
* Basic changes for adding new things for the differentiation.
* Moved handling of types and functions to autodiff_declaration_handler.
* Added handling for differentiation of symbols outside of metafunction type declaration.
* Basic differentation for type and namespace value declarations.
* Refactor of autodiff_expression_handler.
The expression handler no longer generates the assignments. It stores
the primal and forward expression. The assignments can now be generated
with helper functions or by accessing the expressions.
* Handling of member access.
* Moved assignment handling code to proper traverse function.
* Added type differentiation for types without member functions.
* Handling of member function calls.
First basic setup for declared variable lookup.
* Handling of prefix + and -.
* Basic preperations for reverse mode AD.
* Refactor of diff string to structure.
Currently placeholder that defaults to the forward derivatives.
* Reverse handling of function declaration.
* Reverse differentiation of additive expressions.
* Basic handling of multiplication and division.
* Fix for to_string of expressions.
* Activity analysis for variables and functions.
* Update for tests and acitivity analysis.
* Added tests for combined binary expressions.
* Handling of special functions for reverse mode.
* Added handling of function calls for reverse.
* Handling of statement parameters for loops in forward mode.
* Reverse handling of for loops.
* Temp.
* Build clean with GCC 10 and Clang 21, and update regression test results
* Bugfix for passive variables in addition or subtraction statements.
* Add an AD unit test
---------
Co-authored-by: Herb Sutter <herb.sutter@gmail.com>1 parent ced2de1 commit 981e21c
File tree
44 files changed
+17660
-2859
lines changed- include
- regression-tests
- test-results
- clang-12-c++20
- gcc-10-c++20
- gcc-13-c++2b
- gcc-14-c++2b
- msvc-2022-c++latest
- source
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+17660
-2859
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | | - | |
| 930 | + | |
931 | 931 | | |
932 | | - | |
| 932 | + | |
933 | 933 | | |
934 | | - | |
| 934 | + | |
935 | 935 | | |
936 | | - | |
| 936 | + | |
937 | 937 | | |
938 | 938 | | |
939 | 939 | | |
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
1156 | | - | |
| 1156 | + | |
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
| |||
1164 | 1164 | | |
1165 | 1165 | | |
1166 | 1166 | | |
1167 | | - | |
| 1167 | + | |
1168 | 1168 | | |
1169 | 1169 | | |
1170 | 1170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
| 577 | + | |
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| |||
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
591 | | - | |
| 591 | + | |
592 | 592 | | |
593 | 593 | | |
594 | 594 | | |
| |||
0 commit comments