Using AD Version of Atomic Function
Keywords: using ad version atomic function syntax purpose advector afun ax ay examples

| Prev | Next |  |  |  |  |  | atomic_afun |

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 .
ADVector
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 ∈ 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 , matrix_mul.cpp .

Input File: cppad/local/atomic_base.hpp