Skip to content

Commit 44d4794

Browse files
arima-04vgvassilev
authored andcommitted
Add primitive docs for custom derivatives in Clad sphinx docs
Signed-off-by: Maki Arima <makiarima30@gmail.com>
1 parent 9b65a2d commit 44d4794

3 files changed

Lines changed: 458 additions & 15 deletions

File tree

docs/userDocs/source/index.rst

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,27 @@ 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 such as precision loss and symbolic differentiation such as
33+
limitations to closed form expressions and expression swell.
34+
If you are just getting started with clad, then please
3435
checkout :doc:`Using Clad <user/UsingClad>` and
3536
:doc:`Tutorials <user/tutorials>`.
3637

@@ -61,12 +62,12 @@ Features
6162
- Features both reverse mode AD (backpropagation) and forward mode AD.
6263
- Computes derivatives of functions, member functions, functors and lambda expressions.
6364
- 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
65+
much more; it is actively being developed with the goal of supporting all of
6566
C++ syntax.
6667
- Provides direct functions for computation of Hessian matrix and Jacobian matrix.
67-
- Supports array differentiation, that is, it can differentiate either with
68+
- Supports array differentiation, that is, it can differentiate either with
6869
respect to whole arrays or particular indices of the array.
69-
- Features numerical differentiation support, to be used as a fallback where
70+
- Features numerical differentiation support, to be used as a fallback where
7071
automatic differentiation is not feasible.
7172

7273

@@ -87,6 +88,7 @@ The User Guide
8788
user/UsingClad
8889
user/CoreConcepts
8990
user/reference
91+
user/CustomDerivatives.rst
9092
user/tutorials
9193
user/UsingEnzymeWithinClad
9294
user/UsingVectorMode.rst
@@ -96,7 +98,7 @@ The User Guide
9698
user/DevelopersDocumentation
9799
user/IntroductionToClangForCladContributors
98100
user/FloatingPointErrorEstimation
99-
101+
100102
Citing Clad
101103
-------------
102104

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)