\(\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}} }\)
preprocessor
CppAD API Preprocessor Symbols
Rule
The CppAD include files defines preprocessor symbols all of which begin
with CPPAD_
.
Note that there are some old, deprecated preprocessor symbols that
begin with CppAD
.
In this section we list all of the CppAD preprocessor symbols that
are part of the CppAD Application Interface (API).
NOMINMAX, windows.h
There is one exception to the rule above,
when using the Microsoft Visual Studio compiler
and including windows.h
,
it is done as follows:
# ifndef NOMINMAX
# define NOMINMAX
# endif
# include <windows.h>
Documented Here
CPPAD_DEBUG_AND_RELEASE
This flag is an exception because it is defined (or not) by the user
during the inclusion of the CppAD header files; e.g., when using g++
one could put -D CPPAD_DEBUG_AND_RELEASE
on the complier command line.
If it is defined, less error checking is done and the
debug and release versions of CppAD can be mixed in the same program.
Of particular note is that thread_alloc does less error checking.
For programs that do a lot of memory allocation,
this can be a significant time savings when NDEBUG
is defined.
CPPAD_NULL
Deprecated 2020-12-03:
This preprocessor symbol was used for a null pointer before c++11.
Replace it by nullptr
.
CPPAD_PACKAGE_STRING
Is a const char*
representation of this version of CppAD.
CPPAD_USE_CPLUSPLUS_2011
Deprecated 2020-12-03: Is it OK for CppAD to use C++11 features. This is always 1 (for true).
CPPAD_USE_CPLUSPLUS_2017
Is it OK for CppAD to use C++17 features.