Prev Next Define

Macros Used by CppAD Implementation

CPPAD_INLINE
Microsoft Visual C++ version 9.0 generates a warning if a template function is declared as a friend (this was not a problem for version 7.0). The warning identifier is warning C4396: and it contains the text the inline specifier cannot be used when a friend declaration refers to a specialization of a function template . This happens even if the function is not a specialization. The macro CPPAD_INLINE is defined as empty for Microsoft compilers.

CPPAD_NULL
The preprocessor symbol CPPAD_NULL is used for a null pointer. If it is not yet defined, it is defined when cppad/local/define.hpp/ is included.

CPPAD_MAX_NUM_THREADS
The preprocessor symbol CPPAD_MAX_NUM_THREADS is the maximum number of OpenMp threads that can be used with CppAD. If it is not yet defined, it is defined when cppad/local/define.hpp/ is included.

CPPAD_FOLD_ASSIGNMENT_OPERATOR
The syntax
     CPPAD_FOLD_ASSIGNMENT_OPERATOR(
Op)
assumes that the operator
     
left Op right
is defined for the case where left and right have type AD<Base>. It uses this case to define the cases where left has type AD<Base> and right has type VecAD_reference<Base>, AD<Base>, Base, or double. The argument right is const and call by reference. This macro converts the operands to AD<Base> and then uses the definition of the same operation for that case.

CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR
The syntax
     CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR(
Op)
assumes that the operator
     
left Op right
is defined for the case where left and right and the result of the operation all have type AD<Base>. It uses this case to define the cases either left or right has type VecAD_reference<Base> or AD<Base> and the type of the other operand is one of the following: VecAD_reference<Base>, AD<Base>, Base, double. All of the arguments are const and call by reference. This macro converts the operands to AD<Base> and then uses the definition of the same operation for that case.

CPPAD_FOLD_BOOL_VALUED_BINARY_OPERATOR
The syntax
     CPPAD_FOLD_BOOL_VALUED_BINARY_OPERATOR(
Op)
assumes that the operator
     
left Op right
is defined for the case where left and right have type AD<Base> and the result has type bool. It uses this case to define the cases either left or right has type VecAD_reference<Base> or AD<Base> and the type of the other operand is one of the following: VecAD_reference<Base>, AD<Base>, Base, double. All of the arguments are const and call by reference. This macro converts the operands to AD<Base> and then uses the definition of the same operation for that case.
Input File: cppad/local/define.hpp