Skip to content

Commit

Permalink
Merge pull request #164 from QuillPusher/mention_fifth_api_on_clad_page
Browse files Browse the repository at this point in the history
Minor Change: mentioned `clad::estimate-error` API based on Clad Readme
  • Loading branch information
davidlange6 authored Apr 3, 2024
2 parents d65603f + 202dcc7 commit 9c4b855
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 9c4b855

Please sign in to comment.