\(\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}} }\)
static_list¶
View page sourceThe Base Types with Static Variables in the CppAD Library¶
Purpose¶
Shared libraries in windows Visual C++ do not handle static variables the same as other compilers. If you are using Visual C++ and cppad_static_lib is false, you can only use AD< Base > for the base types listed below; e.g., you can use AD<double> and AD< AD<double> > .
TODO¶
Figure out a way to avoid this limitation on base types.
CPPAD_STATIC_LIST¶
# define CPPAD_STATIC_LIST \
CPPAD_STATIC_LIST_CASE(float) \
CPPAD_STATIC_LIST_CASE(double) \
CPPAD_STATIC_LIST_CASE(zdouble) \
CPPAD_STATIC_LIST_CASE( std::complex<double> ) \
CPPAD_STATIC_LIST_CASE( AD<float> ) \
CPPAD_STATIC_LIST_CASE( AD<double> ) \
CPPAD_STATIC_LIST_CASE( AD<zdouble> ) \
CPPAD_STATIC_LIST_CASE( AD< std::complex<double> > )