|
CppAD: A C++ Algorithmic Differentiation Package
20130102
|
Class that actually implements the afun(id, ax, ay) calls.
More...
Public Member Functions | |
| user_atomic (const char *afun, F f, R r, FJS fjs, RJS rjs, RHS rhs) | |
| Constructor called for each invocation of CPPAD_USER_ATOMIC. | |
| template<class ADVector > | |
| void | ad (size_t id, const ADVector &ax, ADVector &ay) |
Implement the user call to afun(id, ax, ay). | |
Static Public Member Functions | |
| static const char * | name (size_t index) |
| Name corresponding to a user_atomic object. | |
| static void | forward (size_t index, size_t id, size_t k, size_t n, size_t m, const vector< Base > &tx, vector< Base > &ty) |
| Link from forward mode sweep to users routine. | |
| static void | reverse (size_t index, size_t id, size_t k, size_t n, size_t m, const vector< Base > &tx, const vector< Base > &ty, vector< Base > &px, const vector< Base > &py) |
| Link from reverse mode sweep to users routine. | |
| static void | for_jac_sparse (size_t index, size_t id, size_t n, size_t m, size_t q, const vector< std::set< size_t > > &r, vector< std::set< size_t > > &s) |
| Link from forward Jacobian sparsity sweep to users routine. | |
| static void | rev_jac_sparse (size_t index, size_t id, size_t n, size_t m, size_t q, vector< std::set< size_t > > &r, const vector< std::set< size_t > > &s) |
| Link from reverse Jacobian sparsity sweep to users routine. | |
| static void | rev_hes_sparse (size_t index, size_t id, size_t n, size_t m, size_t q, vector< std::set< size_t > > &r, const vector< bool > &s, vector< bool > &t, const vector< std::set< size_t > > &u, vector< std::set< size_t > > &v) |
| Link from reverse Hessian sparsity sweep to users routine. | |
| static void | clear (void) |
| Free static CppAD::vector memory used by this class (work space) | |
Private Types | |
| typedef bool(* | F )(size_t id, size_t k, size_t n, size_t m, const vector< bool > &vx, vector< bool > &vy, const vector< Base > &tx, vector< Base > &ty) |
| type for user routine that computes forward mode results | |
| typedef bool(* | R )(size_t id, size_t k, size_t n, size_t m, const vector< Base > &tx, const vector< Base > &ty, vector< Base > &px, const vector< Base > &py) |
| type for user routine that computes reverse mode results | |
| typedef bool(* | FJS )(size_t id, size_t n, size_t m, size_t q, const vector< std::set< size_t > > &r, vector< std::set< size_t > > &s) |
| type for user routine that computes forward mode Jacobian sparsity | |
| typedef bool(* | RJS )(size_t id, size_t n, size_t m, size_t q, vector< std::set< size_t > > &r, const vector< std::set< size_t > > &s) |
| type for user routine that computes reverse mode Jacobian sparsity | |
| typedef bool(* | RHS )(size_t id, size_t n, size_t m, size_t q, const vector< std::set< size_t > > &r, const vector< bool > &s, vector< bool > &t, const vector< std::set< size_t > > &u, vector< std::set< size_t > > &v) |
| type for user routine that computes reverse mode Hessian sparsity | |
Static Private Member Functions | |
| static std::vector < user_atomic * > & | List (void) |
| List of all objects in this class. | |
Private Attributes | |
| const std::string | name_ |
| users name for the AD version of this atomic operation | |
| const F | f_ |
| user's implementation of forward mode | |
| const R | r_ |
| user's implementation of reverse mode | |
| const FJS | fjs_ |
| user's implementation of forward jacobian sparsity calculations | |
| const RJS | rjs_ |
| user's implementation of reverse jacobian sparsity calculations | |
| const RHS | rhs_ |
| user's implementation of reverse Hessian sparsity calculations | |
| const size_t | index_ |
| index of this object in the vector of all objects in this class | |
| vector< bool > | vx_ [CPPAD_MAX_NUM_THREADS] |
| temporary work space used to avoid memory allocation/deallocation extra information to be passed to the functions | |
| vector< bool > | vy_ [CPPAD_MAX_NUM_THREADS] |
| vector< Base > | x_ [CPPAD_MAX_NUM_THREADS] |
| vector< Base > | y_ [CPPAD_MAX_NUM_THREADS] |
Class that actually implements the afun(id, ax, ay) calls.
A new user_atomic object is generated each time the user invokes the CPPAD_USER_ATOMIC macro; see static object in that macro.
Definition at line 802 of file user_atomic.hpp.