1 unstable release
Uses new Rust 2024
| 0.0.0 | Oct 18, 2025 |
|---|
#18 in #ad
200KB
3K
SLoC
A Rust Automatic Differentiation Library
- Objective
- Operations Implemented
- Under Construction
- Wish List
- User Documentation
- Developer Documentation
- Testing
- Contact Us
Objective
This package is intended to include most of the features in CppAD in a way that :
- It is easy to use.
- Its source code is easy to understand and maintain.
- It works well with may threads.
- It supports machine learning algorithms.
Operations Implemented
-
Addition and subtraction: We have held off on other simple numerical operations while we focus on more complicated features.
-
Forward and reverse mode derivative calculations.
-
Forward and reverse mode sparsity calculations.
-
Generic code that is is the same for different floating point types. These types include numerical vectors that act element wise.
-
Derivative calculations can be used in the definition of new functions (that can be differentiated). This is called AD evaluation of the original functions.
-
Atomic functions and Checkpointing. Atomic function have been extended so that they stay atomic when used in functions that are AD evaluated.
Under Construction
- Generate compile and link source code for derivative calculations.
Goals Before Stable API and First Release
-
Subtraction, multiplication and all the standard math functions.
-
Optimizing the operation sequence.
-
Add dynamic parameters; i.e., function arguments that can change value but act as constants when differentiating.
Wish List
- Generate llvm, similar to the source code generation and use it to speed up evaluation of ForwardZero, ForwardOne, and ReverseOne for values.
User Documentation
This package does not yet have a stable API. More work needs to be done to separate implementation details from the API. You can see to current user documentation by executing the following:
cargo doc
firefox target/doc/rustad/index.html
Developer Documentation
You can see to current developer documentation by executing the following:
cargo doc --document-private-items
firefox target/doc/rustad/index.html
Testing
The following command should build and run all of the tests on Unix (including MacOS):
bin/check_all.sh
The following command will just run the speed test:
cargo run --release