|
#define CPPAD_USER_ATOMIC |
( |
|
afun, |
|
|
|
Tvector, |
|
|
|
Base, |
|
|
|
forward, |
|
|
|
reverse, |
|
|
|
for_jac_sparse, |
|
|
|
rev_jac_sparse, |
|
|
|
rev_hes_sparse |
|
) |
| |
Value:inline void afun ( \
size_t id , \
const Tvector< CppAD::AD<Base> >& ax , \
Tvector< CppAD::AD<Base> >& ay \
) \
{ static CppAD::user_atomic<Base> fun( \
#afun , \
forward , \
reverse , \
for_jac_sparse , \
rev_jac_sparse , \
rev_hes_sparse \
); \
fun.ad(id, ax, ay); \
}
Defines the function afun(id, ax, ay) where id is ax and ay are vectors with AD<Base> elements.
- Tvector
- the Simple Vector template class for this function.
- Base
- the base type for the atomic operation.
- afun
- name of the CppAD defined function that corresponding to this operation. Note that
afun , preceeded by a pound sign, is a version of afun with quotes arround it.
- forward
- name of the user defined function that computes corresponding results during forward mode.
- reverse
- name of the user defined function that computes corresponding results during reverse mode.
- for_jac_sparse
- name of the user defined routine that computes corresponding results during forward mode jacobian sparsity sweeps.
- rev_jac_sparse
- name of the user defined routine that computes corresponding results during reverse mode jacobian sparsity sweeps.
- rev_hes_sparse
- name of the user defined routine that computes corresponding results during reverse mode Hessian sparsity sweeps.
- memory allocation
- Note that user_atomic is used as a static object, so its objects do note get deallocated until the program terminates.
Definition at line 709 of file user_atomic.hpp.
|