Skip to content

Commit

Permalink
Added clad::estimate-error based on Clad Readme
Browse files Browse the repository at this point in the history
Minor Change:

- Added `clad::estimate-error` based on Clad Readme
  • Loading branch information
QuillPusher committed Mar 31, 2024
1 parent e04970e commit 202dcc7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _pages/clad.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ Since Clad is a Clang plugin, it must be properly attached when Clang compiler i
```
clang -cc1 -x c++ -std=c++11 -load /full/path/to/lib/clad.so -plugin clad SourceFile.cpp
```
Clad provides four API functions:
Clad provides five API functions:
- `clad::differentiate` to use forward-mode AD
- `clad::gradient` to use reverse-mode AD
- `clad::hessian` to compute Hessian matrix using a combination of forward-mode and reverse-mode AD
- `clad::jacobian` to compute Jacobian matrix using reverse-mode AD
- `clad::estimate-error` to compute the floating-point error of the given program using reverse-mode AD.

API functions are used to label an existing function for differentiation.
Both functions return a functor object containing the generated derivative which can be called via `.execute` method, which forwards provided arguments to the generated derivative function. Example:
Expand Down

0 comments on commit 202dcc7

Please sign in to comment.