Prev Next Index-> contents reference index search external Up-> CppAD AD ADValued atomic atomic_base atomic_afun ADValued-> Arithmetic unary_standard_math binary_math CondExp Discrete numeric_limits atomic atomic-> checkpoint atomic_base atomic_base-> atomic_ctor atomic_option atomic_afun atomic_forward atomic_reverse atomic_for_sparse_jac atomic_rev_sparse_jac atomic_for_sparse_hes atomic_rev_sparse_hes atomic_base_clear atomic_get_started.cpp atomic_norm_sq.cpp atomic_reciprocal.cpp atomic_set_sparsity.cpp atomic_tangent.cpp atomic_eigen_mat_mul.cpp atomic_eigen_mat_inv.cpp atomic_eigen_cholesky.cpp atomic_mat_mul.cpp atomic_afun Headings-> Syntax Purpose ADVector afun ax ay Examples

$\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }$
Using AD Version of Atomic Function

Syntax
afun(ax, ay)

Purpose
Given ax , this call computes the corresponding value of ay . If AD<Base> operations are being recorded, it enters the computation as an atomic operation in the recording; see start recording .

The type ADVector must be a simple vector class with elements of type AD<Base> ; see Base .

afun
is a atomic_user object and this afun function call is implemented by the atomic_base class.

ax
This argument has prototype       const ADVector& ax  and size must be equal to n . It specifies vector $x \in B^n$ at which an AD<Base> version of $y = f(x)$ is to be evaluated; see Base .

ay
This argument has prototype       ADVector& ay  and size must be equal to m . The input values of its elements are not specified (must not matter). Upon return, it is an AD<Base> version of $y = f(x)$.

Examples
The following files contain example uses of the AD version of atomic functions during recording: get_started.cpp , norm_sq.cpp , reciprocal.cpp , tangent.cpp , mat_mul.cpp .