Skip to content

Commit f3a3118

Browse files
committed
Add primitive docs for custom derivatives in Clad sphinx docs
1 parent b17af42 commit f3a3118

3 files changed

Lines changed: 405 additions & 15 deletions

File tree

docs/userDocs/source/index.rst

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,26 @@ Release v\ |version|.
1111
Overview
1212
------------
1313

14-
Clad enables
14+
Clad enables
1515
`automatic differentiation (AD) <https://en.wikipedia.org/wiki/Automatic_differentiation>`_
16-
for C++. It is based on LLVM compiler infrastructure and is a plugin for
17-
`Clang compiler <http://clang.llvm.org/>`_. Clad is based on source code
16+
for C++. It is based on LLVM compiler infrastructure and is a plugin for
17+
`Clang compiler <http://clang.llvm.org/>`_. Clad is based on source code
1818
transformation. Given C++ source code of a mathematical function, it can
1919
automatically generate C++ code for computing derivatives of the function.
2020

2121
.. todo::
22-
22+
2323
Add section that describes complete set of supported language features.
2424

25-
Clad supports a large set of C++ features including control flow statements and
26-
function calls. Please visit (add hyperlink here) to know more about the
27-
support of language features. It supports reverse-mode AD (a.k.a backpropagation)
28-
as well as forward-mode AD. It also facilitates computation of hessian matrix and
25+
Clad supports a large set of C++ features including control flow statements and
26+
function calls. Please visit (add hyperlink here) to know more about the
27+
support of language features. It supports reverse-mode AD (a.k.a backpropagation)
28+
as well as forward-mode AD. It also facilitates computation of hessian matrix and
2929
jacobian matrix of any arbitrary function.
3030

31-
Automatic differentiation solves all the usual problems of numerical
32-
differentiation (precision loss) and symbolic differentiation
33-
(inefficient code produced). If you are just getting started with clad, then please
31+
Automatic differentiation solves all the usual problems of numerical
32+
differentiation (precision loss) and symbolic differentiation
33+
(inefficient code produced). If you are just getting started with clad, then please
3434
checkout :doc:`Using Clad <user/UsingClad>` and
3535
:doc:`Tutorials <user/tutorials>`.
3636

@@ -61,12 +61,12 @@ Features
6161
- Features both reverse mode AD (backpropagation) and forward mode AD.
6262
- Computes derivatives of functions, member functions, functors and lambda expressions.
6363
- Supports large subset of C++ including if statements, for, while loops and so
64-
much more; it is actively being developed with the goal of supporting all of
64+
much more; it is actively being developed with the goal of supporting all of
6565
C++ syntax.
6666
- Provides direct functions for computation of Hessian matrix and Jacobian matrix.
67-
- Supports array differentiation, that is, it can differentiate either with
67+
- Supports array differentiation, that is, it can differentiate either with
6868
respect to whole arrays or particular indices of the array.
69-
- Features numerical differentiation support, to be used as a fallback where
69+
- Features numerical differentiation support, to be used as a fallback where
7070
automatic differentiation is not feasible.
7171

7272

@@ -87,6 +87,7 @@ The User Guide
8787
user/UsingClad
8888
user/CoreConcepts
8989
user/reference
90+
user/CustomDerivatives.rst
9091
user/tutorials
9192
user/UsingEnzymeWithinClad
9293
user/UsingVectorMode.rst
@@ -96,7 +97,7 @@ The User Guide
9697
user/DevelopersDocumentation
9798
user/IntroductionToClangForCladContributors
9899
user/FloatingPointErrorEstimation
99-
100+
100101
Citing Clad
101102
-------------
102103

docs/userDocs/source/user/CoreConcepts.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ Custom Derivatives
186186
Pushforward and Pullback functions
187187
===================================
188188

189+
.. _PushforwardFunctions:
190+
189191
Pushforward functions
190192
-------------------------
191193

@@ -268,6 +270,8 @@ Please note the following specification of the pushforward functions:
268270
All of these specifications must be exactly satisfied when creating a custom
269271
derivative pushforward function.
270272

273+
.. _PullbackFunctions:
274+
271275
Pullback functions
272276
--------------------
273277

0 commit comments

Comments
 (0)