Changeset 3922


Ignore:
Timestamp:
May 15, 2017 2:40:10 AM (2 years ago)
Author:
bradbell
Message:

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 7c6be616382d4f09bbb66749143820f9364b43f7
end hash code: 3f17dccb8fad7806e6519c2d9a3d62203fb0740c

commit 3f17dccb8fad7806e6519c2d9a3d62203fb0740c
Author: Brad Bell <bradbell@…>
Date: Sun May 14 23:25:01 2017 -0700

jenkins.sh: must copy autotools version of configure.hpp.

commit 27c213f75938a5fc3ced81ef24724793416f0f15
Author: Brad Bell <bradbell@…>
Date: Sun May 14 23:12:10 2017 -0700

autotools.omh: make some improvements to these instructions.

commit c7cc571e5ba9cd47cf6c580a6ae70fc0b293856f
Author: Brad Bell <bradbell@…>
Date: Sun May 14 20:38:20 2017 -0700

mul_level.cpp: include test of fabs.

commit ab06ab7963ae301a3f86198b5f7231af61ba340e
Author: Brad Bell <bradbell@…>
Date: Sun May 14 20:14:20 2017 -0700

  1. Move autotools settimg of CPPAD_HAS_* to comfigure.ac.
  2. Fix some 'ifdef CPPAD_HAS_*' -> 'if CPPAD_HAS_*'.
  3. Autotools automatic changes to */makefile.in, configure.


CMakeLists.txt: include setting of cppad_has_boost (not yet used).

commit 61d90e2891327fd4c3fba2e078f84699ffc38cc0
Author: Brad Bell <bradbell@…>
Date: Sun May 14 18:18:38 2017 -0700

  1. Define cppad_has_<package> in optional_package.cmake. Use it in cmake files (and CPPAD_HAS_<PACKAGE> is C++ files) to determine if package is available.


  1. Add accuracy specifications to CppAD::to_string and convert some more cases from using machine epsilon to using digits10.

commit c1370167ed9892b72879b7b6fd2a53659509129d
Author: Brad Bell <bradbell@…>
Date: Sun May 14 13:24:31 2017 -0700

Use package (not package_prefix variable) as argument to optional_package.

commit 5a43c975953d91b487a396695d5485b4bb786937
Author: Brad Bell <bradbell@…>
Date: Sun May 14 09:22:15 2017 -0700

base_to_string.hpp: use digits10 to simplify code.
numeric_limits.hpp: correct font in syntax.
base_alloc.cpp: test numeric_limits and to_string.

Location:
trunk
Files:
1 deleted
56 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r3921 r3922  
    5656INCLUDE(cmake/command_line_arg.cmake)
    5757#
    58 # optional_package(prefix_variable description)
     58# optional_package(package description)
    5959INCLUDE(cmake/optional_package.cmake)
    6060#
    6161# add_cppad_cxx_flags(target_name)
    6262INCLUDE(cmake/add_cppad_cxx_flags.cmake)
    63 #
    64 # sources_libs_define(prefix_name sources libs define)
    65 INCLUDE(cmake/sources_libs_define.cmake)
    6663#
    6764# check_source_runs(source variable)
     
    103100        CACHE PATH "value copied from cppad_prefix" FORCE
    104101)
    105 IF( cmake_install_prefix )
     102IF( cppad_has_cmake_install )
    106103        MESSAGE(FATAL_ERROR
    107104                "cmake_install_prefix has been changed to cppad_prefix"
    108105        )
    109 ENDIF( cmake_install_prefix )
     106ENDIF( cppad_has_cmake_install )
    110107# -----------------------------------------------------------------------------
    111108# cppad_postfix
     
    133130#
    134131# adolc_prefix
    135 optional_package(adolc_prefix ${system_include} "adolc install prefix")
     132optional_package(adolc ${system_include} "adolc install prefix")
    136133#
    137134# colpack_prefix
    138 optional_package(colpack_prefix ${system_include} "colpack install prefix")
     135optional_package(colpack ${system_include} "colpack install prefix")
    139136#
    140137# ipopt_prefix
    141 optional_package(ipopt_prefix ${system_include} "ipopt install prefix")
     138optional_package(ipopt ${system_include} "ipopt install prefix")
    142139#
    143140# sacado_prefix
    144 optional_package(sacado_prefix ${system_include} "sacado install prefix")
    145 # -----------------------------------------------------------------------------
    146 # External package prefixes without  warnings
     141optional_package(sacado ${system_include} "sacado install prefix")
     142# -----------------------------------------------------------------------------
     143# External package prefixes without warnings
    147144SET(system_include TRUE)
    148145#
    149146# eigen_prefix
    150 optional_package(eigen_prefix ${system_include} "eigen install prefix")
     147optional_package(eigen ${system_include} "eigen install prefix")
    151148#
    152149# fadbad_prefix
    153 optional_package(fadbad_prefix ${system_include} "fadbad install prefix")
     150optional_package(fadbad ${system_include} "fadbad install prefix")
    154151# -----------------------------------------------------------------------------
    155152# cppad_has_colpack, colpack_libs, cppad_lib
    156153#
    157 IF( colpack_prefix )
     154IF( cppad_has_colpack )
    158155        SET(cppad_has_colpack 1)
    159156        SET( colpack_libs "ColPack" )
    160157        SET( cppad_lib "cppad_lib" )
    161 ELSE( colpack_prefix )
     158ELSE( cppad_has_colpack )
    162159        SET(cppad_has_colpack 0)
    163160        SET( colpack_libs "" )
    164161        SET( cppad_lib "" )
    165 ENDIF( colpack_prefix )
     162ENDIF( cppad_has_colpack )
    166163# =============================================================================
    167164# automated system configuration
     
    195192# boost_prefix
    196193FIND_PACKAGE(Boost)
     194SET(cppad_has_boost 0)
    197195IF ( Boost_FOUND )
     196        SET(cppad_has_boost 1)
     197        #
    198198        # Extract the Boost prefix from Boost_INCLUDE_DIRS
    199199        #
     
    232232# -----------------------------------------------------------------------------
    233233# ipopt_LIBRARIES and ipopt_LIBRARY_DIRS
    234 IF( ipopt_prefix )
     234IF( cppad_has_ipopt )
    235235        FIND_PACKAGE(PkgConfig)
    236236        IF( NOT PKG_CONFIG_FOUND )
     
    259259                )
    260260        ENDIF( NOT ipopt_FOUND )
    261 ENDIF( ipopt_prefix )
     261ENDIF( cppad_has_ipopt )
    262262# =============================================================================
    263263# Currently building tests as normal executables
     
    273273ADD_SUBDIRECTORY(cppad)
    274274ADD_SUBDIRECTORY(pkgconfig)
    275 IF( colpack_prefix )
     275IF( cppad_has_colpack )
    276276        ADD_SUBDIRECTORY(cppad_lib)
    277 ENDIF( colpack_prefix)
     277ENDIF( cppad_has_colpack )
    278278#
    279279IF( NOT ( "${check_depends}" STREQUAL "" ) )
     
    289289ADD_SUBDIRECTORY(multi_thread)
    290290ADD_SUBDIRECTORY(speed)
    291 IF ( ipopt_prefix )
     291IF( cppad_has_ipopt )
    292292        ADD_SUBDIRECTORY(cppad_ipopt)
    293 ENDIF( ipopt_prefix )
     293ENDIF( cppad_has_ipopt )
    294294#
    295295ADD_CUSTOM_TARGET(check DEPENDS ${check_depends})
  • trunk/bin/batch_edit.sh

    r3921 r3922  
    1111# -----------------------------------------------------------------------------
    1212spell_list='
    13         autotools
    1413'
    1514revert_list='
    1615'
    1716move_list='
    18         omh/install/auto_tools.omh
    1917'
    2018move_sed='s|auto_tools|autotools|'
    2119#
    2220cat << EOF > junk.sed
    23 s|auto_tools|autotools|g
    24 s|auto-tools|autotools|g
    25 s|Auto Tools|Autotools|g
     21s|IF *( *\\([a-z][a-z_]*\\)_prefix *)|IF( cppad_has_\\1 )|g
     22s|ELSE *( *\\([a-z][a-z_]*\\)_prefix *)|ELSE( cppad_has_\\1 )|g
     23s|CPPAD_ADOLC_TEST|CPPAD_HAS_ADOLC|g
     24s|CPPAD_EIGEN_TEST|CPPAD_HAS_EIGEN|g
     25s|CPPAD_IPOPT_TEST|CPPAD_HAS_IPOPT|g
     26#
     27/^SET(sources /! b one
     28N
     29s|SET(sources \\(.*\))\\nsources_libs_define(\\([a-z]*\\).*|IF( cppad_has_\\2 )\\
     30        SET(\\2_sources \\1) \\
     31        SET(\\2_libs \\2) \\
     32ELSE( cppad_has_\\2 )\\
     33        SET(\\2_sources "") \\
     34        SET(\\2_libs "") \\
     35ENDIF( cppad_has_\\2 )|
     36: one
     37s|\\n\\tSET(eigen_libs [^)]*)||
    2638EOF
    2739# -----------------------------------------------------------------------------
  • trunk/bin/jenkins.sh

    r3921 r3922  
    169169fi
    170170#
     171# copy configure.hpp to source directory
     172log_eval cp cppad/configure.hpp $trunk_dir/cppad/configure.hpp
     173#
    171174# compile the tests
    172175log_eval make check
  • trunk/cmake/optional_package.cmake

    r3803 r3922  
    1 # $Id$
    21# -----------------------------------------------------------------------------
    3 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     2# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43#
    54# CppAD is distributed under multiple licenses. This distribution is under
     
    109# Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1110# -----------------------------------------------------------------------------
    12 # optional_package(prefix_variable system_include description)
     11# optional_package(package system_include description)
    1312#
    14 # prefix_variable: (out)
     13# ${package}_prefix: (out)
    1514# is a PATH variable that holds the install prefix for this optional package.
     15#
     16# cppad_has_${package}: (out)
     17# is 1 if ${package}_prefix is set by the cmake command line (or gui),
     18# and 0 otherwise.
    1619#
    1720# system_include: (in)
     
    2225# is a description for the install prefix for this optional package.
    2326#
    24 # If package_variable is not set by the cmake command line (or gui),
     27# If ${package}_prefix is not set by the cmake command line (or gui),
    2528# it is set to the default value NOTFOUND.
    2629#
    27 # If package_variable is set by the cmake command line, the following is done:
     30# If ${package}_prefix is set by the cmake command line, the following is done:
    2831# 1. All the valid include subdirectories are added using INCLUDE_DIRECTORIES.
    2932# 2. All the valid library subdirectories are added using LINK_DIRECTORIES.
     
    3336# description: (in)
    3437#
    35 MACRO(optional_package prefix_variable system_include description)
     38MACRO(optional_package package system_include description)
     39        SET(prefix_variable ${package}_prefix)
     40        SET(cppad_has_${package} 0)
    3641        SET(${prefix_variable} NOTFOUND CACHE PATH "${description}")
    3742        SET(prefix ${${prefix_variable}} )
    3843        MESSAGE(STATUS "${prefix_variable} = ${prefix}")
    3944        IF ( prefix )
     45                SET(cppad_has_${package} 1)
     46                #
    4047                # List of preprocessor include file search directories
    4148                FOREACH(dir ${cmake_install_includedirs})
  • trunk/compare_c/makefile.in

    r3920 r3922  
    281281cppad_description = @cppad_description@
    282282cppad_eigenvector = @cppad_eigenvector@
     283cppad_has_adolc = @cppad_has_adolc@
     284cppad_has_boost = @cppad_has_boost@
    283285cppad_has_colpack = @cppad_has_colpack@
    284286cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     287cppad_has_eigen = @cppad_has_eigen@
     288cppad_has_fadbad = @cppad_has_fadbad@
    285289cppad_has_gettimeofday = @cppad_has_gettimeofday@
     290cppad_has_ipopt = @cppad_has_ipopt@
    286291cppad_has_mkstemp = @cppad_has_mkstemp@
    287292cppad_has_nullptr = @cppad_has_nullptr@
    288293cppad_has_rvalue = @cppad_has_rvalue@
     294cppad_has_sacado = @cppad_has_sacado@
    289295cppad_has_steady_clock = @cppad_has_steady_clock@
    290296cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/configure

    r3921 r3922  
    704704CXX_FLAGS_FADBAD
    705705CXX_FLAGS
     706cppad_has_boost
    706707BOOST_INCLUDE
    707708CppAD_BOOST_DIR_FALSE
    708709CppAD_BOOST_DIR_TRUE
    709710BOOST_DIR
     711cppad_has_ipopt
    710712CppAD_IPOPT_FALSE
    711713CppAD_IPOPT_TRUE
    712714IPOPT_DIR
     715cppad_has_sacado
    713716CppAD_SACADO_FALSE
    714717CppAD_SACADO_TRUE
    715718SACADO_DIR
     719cppad_has_fadbad
    716720CppAD_FADBAD_FALSE
    717721CppAD_FADBAD_TRUE
    718722FADBAD_DIR
     723cppad_has_eigen
    719724EIGEN_INCLUDE
    720725CppAD_EIGEN_DIR_FALSE
    721726CppAD_EIGEN_DIR_TRUE
    722727EIGEN_DIR
     728cppad_has_adolc
    723729CppAD_ADOLC_FALSE
    724730CppAD_ADOLC_TRUE
     
    47344740                as_fn_error $? "ar is missing and ADOLC_DIR is present" "$LINENO" 5
    47354741        fi
     4742        cppad_has_adolc=1
     4743
    47364744else
    47374745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    47384746$as_echo "no" >&6; }
     4747        cppad_has_adolc=0
     4748
    47394749fi
    47404750
     
    47554765        EIGEN_INCLUDE=-I$EIGEN_DIR/include
    47564766
     4767        cppad_has_eigen=1
     4768
    47574769else
    47584770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    47594771$as_echo "no" >&6; }
     4772
     4773        cppad_has_eigen=0
    47604774
    47614775fi
     
    47784792                as_fn_error $? "ar is missing and FADBAD_DIR is present" "$LINENO" 5
    47794793        fi
     4794        cppad_has_fadbad=1
     4795
    47804796else
    47814797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    47824798$as_echo "no" >&6; }
     4799        cppad_has_fadbad=0
     4800
    47834801fi
    47844802
     
    48004818                as_fn_error $? "ar is missing and SACADO_DIR is present" "$LINENO" 5
    48014819        fi
     4820        cppad_has_sacado=1
     4821
    48024822else
    48034823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    48044824$as_echo "no" >&6; }
     4825        cppad_has_sacado=0
     4826
    48054827fi
    48064828
     
    48224844                as_fn_error $? "ar is missing and IPOPT_DIR is present" "$LINENO" 5
    48234845        fi
     4846        cppad_has_ipopt=1
     4847
    48244848else
    48254849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    48264850$as_echo "no" >&6; }
     4851        cppad_has_ipopt=0
     4852
    48274853fi
    48284854
     
    48434869        BOOST_INCLUDE=-I$BOOST_DIR/include
    48444870
     4871        cppad_has_boost=1
     4872
    48454873else
    48464874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
    48474875$as_echo "no" >&6; }
     4876
     4877        cppad_has_boost=0
    48484878
    48494879fi
  • trunk/configure.ac

    r3921 r3922  
    242242                AC_MSG_ERROR([ar is missing and ADOLC_DIR is present])
    243243        fi
    244 else
    245         AC_MSG_RESULT([no])
     244        AC_SUBST(cppad_has_adolc, 1)
     245else
     246        AC_MSG_RESULT([no])
     247        AC_SUBST(cppad_has_adolc, 0)
    246248fi
    247249
     
    255257        AC_MSG_RESULT([$EIGEN_DIR])
    256258        AC_SUBST(EIGEN_INCLUDE, [-I$EIGEN_DIR/include])
     259        AC_SUBST(cppad_has_eigen, 1)
    257260else
    258261        AC_MSG_RESULT([no])
    259262        AC_SUBST(EIGEN_INCLUDE, [])
     263        AC_SUBST(cppad_has_eigen, 0)
    260264fi
    261265
     
    271275                AC_MSG_ERROR([ar is missing and FADBAD_DIR is present])
    272276        fi
    273 else
    274         AC_MSG_RESULT([no])
     277        AC_SUBST(cppad_has_fadbad, 1)
     278else
     279        AC_MSG_RESULT([no])
     280        AC_SUBST(cppad_has_fadbad, 0)
    275281fi
    276282
     
    286292                AC_MSG_ERROR([ar is missing and SACADO_DIR is present])
    287293        fi
    288 else
    289         AC_MSG_RESULT([no])
     294        AC_SUBST(cppad_has_sacado, 1)
     295else
     296        AC_MSG_RESULT([no])
     297        AC_SUBST(cppad_has_sacado, 0)
    290298fi
    291299
     
    301309                AC_MSG_ERROR([ar is missing and IPOPT_DIR is present])
    302310        fi
    303 else
    304         AC_MSG_RESULT([no])
     311        AC_SUBST(cppad_has_ipopt, 1)
     312else
     313        AC_MSG_RESULT([no])
     314        AC_SUBST(cppad_has_ipopt, 0)
    305315fi
    306316
     
    314324        AC_MSG_RESULT([$BOOST_DIR])
    315325        AC_SUBST(BOOST_INCLUDE, [-I$BOOST_DIR/include])
     326        AC_SUBST(cppad_has_boost, 1)
    316327else
    317328        AC_MSG_RESULT([no])
    318329        AC_SUBST(BOOST_INCLUDE,[])
     330        AC_SUBST(cppad_has_boost, 0)
    319331fi
    320332
  • trunk/cppad/configure.hpp.in

    r3877 r3922  
    7474
    7575/*!
     76def CPPAD_HAS_ADOLC
     77Was a adolc_prefix specified on the cmake command line.
     78*/
     79# define CPPAD_HAS_ADOLC @cppad_has_adolc@
     80
     81/*!
    7682def CPPAD_HAS_COLPACK
    7783Was a colpack_prefix specified on the cmake command line.
    7884*/
    7985# define CPPAD_HAS_COLPACK @cppad_has_colpack@
     86
     87/*!
     88def CPPAD_HAS_EIGEN
     89Was a eigen_prefix specified on the cmake command line.
     90*/
     91# define CPPAD_HAS_EIGEN @cppad_has_eigen@
     92
     93/*!
     94def CPPAD_HAS_IPOPT
     95Was a ipopt_prefix specified on the cmake command line.
     96*/
     97# define CPPAD_HAS_IPOPT @cppad_has_ipopt@
    8098
    8199/*!
  • trunk/cppad/core/base_to_string.hpp

    r3845 r3922  
    1 // $Id$
    21# ifndef CPPAD_CORE_BASE_TO_STRING_HPP
    32# define CPPAD_CORE_BASE_TO_STRING_HPP
    43
    54/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     5CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    76
    87CppAD is distributed under multiple licenses. This distribution is under
     
    5150{       std::string operator()(const Base& value) \
    5251        {       std::stringstream os;\
    53                 Base epsilon    = CppAD::numeric_limits<Base>::epsilon();\
    54                 Base log10      = CppAD::log( epsilon ) / CppAD::log(Base(10.));\
    55                 size_t n_digits = 1 - Integer( log10 );\
     52                int n_digits = 1 + CppAD::numeric_limits<Base>::digits10; \
    5653                os << std::setprecision(n_digits);\
    5754                os << value;\
  • trunk/cppad/core/numeric_limits.hpp

    r3917 r3922  
    3434$icode%nan% = numeric_limits<%Float%>::quiet_NaN()
    3535%$$
    36 $codei numeric_limits<%Float%>::digits10$$
     36$codei%numeric_limits<%Float%>::digits10%$$
    3737
    3838$head CppAD::numeric_limits$$
  • trunk/cppad/example/base_adolc.hpp

    r3871 r3922  
    319319        {       std::string operator()(const adouble& x)
    320320                {       std::stringstream os;
    321                         double epsilon    = std::numeric_limits<double>::epsilon();
    322                         double log10      = std::log( epsilon ) / std::log(10.);
    323                         size_t n_digits   = 1 - Integer( log10 );
     321                        int n_digits = 1 + std::numeric_limits<double>::digits10;
    324322                        os << std::setprecision(n_digits);
    325323                        os << x.value();
  • trunk/cppad/utility/to_string.hpp

    r3873 r3922  
    4747it automatically extends to the
    4848$cref/AD types above Base/glossary/AD Type Above Base/$$.
     49$lnext
     50For integer types, conversion to a string is exact.
     51For floating point types, conversion to a string yields a value
     52that has relative error within machine epsilon.
    4953$lend
    5054
     
    115119{       std::string operator()(const Float& value) \
    116120        {       std::stringstream os;\
    117                 Float epsilon    = std::numeric_limits<Float>::epsilon();\
    118                 size_t n_digits = 1 - int( std::log10(epsilon) );\
     121                int n_digits = 1 + std::numeric_limits<Float>::digits10;\
    119122                os << std::setprecision(n_digits);\
    120123                os << value;\
  • trunk/cppad_ipopt/example/makefile.in

    r3920 r3922  
    297297cppad_description = @cppad_description@
    298298cppad_eigenvector = @cppad_eigenvector@
     299cppad_has_adolc = @cppad_has_adolc@
     300cppad_has_boost = @cppad_has_boost@
    299301cppad_has_colpack = @cppad_has_colpack@
    300302cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     303cppad_has_eigen = @cppad_has_eigen@
     304cppad_has_fadbad = @cppad_has_fadbad@
    301305cppad_has_gettimeofday = @cppad_has_gettimeofday@
     306cppad_has_ipopt = @cppad_has_ipopt@
    302307cppad_has_mkstemp = @cppad_has_mkstemp@
    303308cppad_has_nullptr = @cppad_has_nullptr@
    304309cppad_has_rvalue = @cppad_has_rvalue@
     310cppad_has_sacado = @cppad_has_sacado@
    305311cppad_has_steady_clock = @cppad_has_steady_clock@
    306312cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/cppad_ipopt/speed/makefile.in

    r3920 r3922  
    299299cppad_description = @cppad_description@
    300300cppad_eigenvector = @cppad_eigenvector@
     301cppad_has_adolc = @cppad_has_adolc@
     302cppad_has_boost = @cppad_has_boost@
    301303cppad_has_colpack = @cppad_has_colpack@
    302304cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     305cppad_has_eigen = @cppad_has_eigen@
     306cppad_has_fadbad = @cppad_has_fadbad@
    303307cppad_has_gettimeofday = @cppad_has_gettimeofday@
     308cppad_has_ipopt = @cppad_has_ipopt@
    304309cppad_has_mkstemp = @cppad_has_mkstemp@
    305310cppad_has_nullptr = @cppad_has_nullptr@
    306311cppad_has_rvalue = @cppad_has_rvalue@
     312cppad_has_sacado = @cppad_has_sacado@
    307313cppad_has_steady_clock = @cppad_has_steady_clock@
    308314cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/cppad_ipopt/src/makefile.in

    r3920 r3922  
    334334cppad_description = @cppad_description@
    335335cppad_eigenvector = @cppad_eigenvector@
     336cppad_has_adolc = @cppad_has_adolc@
     337cppad_has_boost = @cppad_has_boost@
    336338cppad_has_colpack = @cppad_has_colpack@
    337339cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     340cppad_has_eigen = @cppad_has_eigen@
     341cppad_has_fadbad = @cppad_has_fadbad@
    338342cppad_has_gettimeofday = @cppad_has_gettimeofday@
     343cppad_has_ipopt = @cppad_has_ipopt@
    339344cppad_has_mkstemp = @cppad_has_mkstemp@
    340345cppad_has_nullptr = @cppad_has_nullptr@
    341346cppad_has_rvalue = @cppad_has_rvalue@
     347cppad_has_sacado = @cppad_has_sacado@
    342348cppad_has_steady_clock = @cppad_has_steady_clock@
    343349cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/cppad_ipopt/test/makefile.in

    r3920 r3922  
    285285cppad_description = @cppad_description@
    286286cppad_eigenvector = @cppad_eigenvector@
     287cppad_has_adolc = @cppad_has_adolc@
     288cppad_has_boost = @cppad_has_boost@
    287289cppad_has_colpack = @cppad_has_colpack@
    288290cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     291cppad_has_eigen = @cppad_has_eigen@
     292cppad_has_fadbad = @cppad_has_fadbad@
    289293cppad_has_gettimeofday = @cppad_has_gettimeofday@
     294cppad_has_ipopt = @cppad_has_ipopt@
    290295cppad_has_mkstemp = @cppad_has_mkstemp@
    291296cppad_has_nullptr = @cppad_has_nullptr@
    292297cppad_has_rvalue = @cppad_has_rvalue@
     298cppad_has_sacado = @cppad_has_sacado@
    293299cppad_has_steady_clock = @cppad_has_steady_clock@
    294300cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/example/CMakeLists.txt

    r3876 r3922  
    3232
    3333# adolc_sources, adolc_libs, and CPPAD_HAS_ADOLC
    34 SET(sources mul_level_adolc.cpp mul_level_adolc_ode.cpp)
    35 sources_libs_define(adolc "${sources}" adolc HAS_ADOLC)
     34IF( cppad_has_adolc )
     35        SET(adolc_sources mul_level_adolc.cpp mul_level_adolc_ode.cpp)
     36        SET(adolc_libs adolc)
     37ELSE( cppad_has_adolc )
     38        SET(adolc_sources "")
     39        SET(adolc_libs "")
     40ENDIF( cppad_has_adolc )
    3641
    3742# eigen_sources and CPPAD_HAS_EIGEN
    38 SET(sources eigen_det.cpp eigen_array.cpp)
    39 sources_libs_define(eigen "${sources}" "" HAS_EIGEN)
     43IF( cppad_has_eigen )
     44        SET(eigen_sources eigen_det.cpp eigen_array.cpp)
     45ELSE( cppad_has_eigen )
     46        SET(eigen_sources "")
     47ENDIF( cppad_has_eigen )
    4048
    4149# ipopt_prefix
    42 IF( ipopt_prefix )
     50IF( cppad_has_ipopt )
    4351        ADD_SUBDIRECTORY(ipopt_solve)
    4452        add_to_list(check_depends check_example_ipopt_solve)
    45 ENDIF( ipopt_prefix )
     53ENDIF( cppad_has_ipopt )
    4654
    4755
  • trunk/example/atomic/CMakeLists.txt

    r3857 r3922  
    1 # $Id$
    21# -----------------------------------------------------------------------------
    3 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     2# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43#
    54# CppAD is distributed under multiple licenses. This distribution is under
     
    1514#
    1615# eigen_sources and CPPAD_HAS_EIGEN
    17 SET(sources eigen_mat_inv.cpp eigen_cholesky.cpp eigen_mat_mul.cpp)
    18 sources_libs_define(eigen "${sources}" "" HAS_EIGEN)
     16IF( cppad_has_eigen )
     17        SET(eigen_sources eigen_mat_inv.cpp eigen_cholesky.cpp eigen_mat_mul.cpp)
     18ELSE( cppad_has_eigen )
     19        SET(eigen_sources "")
     20ENDIF( cppad_has_eigen )
    1921#
    2022ADD_EXECUTABLE(example_atomic EXCLUDE_FROM_ALL
  • trunk/example/atomic/atomic.cpp

    r3830 r3922  
    11// $Id$
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    1919// for thread_alloc
    2020# include <cppad/utility/thread_alloc.hpp>
     21
     22// CPPAD_HAS_* defines
     23# include <cppad/configure.hpp>
    2124
    2225// external complied tests
     
    8386        ok &= Run( set_sparsity,        "set_sparsity"   );
    8487        ok &= Run( tangent,             "tangent"        );
    85 # ifdef CPPAD_HAS_EIGEN
     88# if CPPAD_HAS_EIGEN
    8689        ok &= Run( eigen_cholesky,      "eigen_cholesky" );
    8790        ok &= Run( eigen_mat_inv,       "eigen_mat_inv"  );
  • trunk/example/atomic/makefile.am

    r3829 r3922  
    11# $Id$
    22# -----------------------------------------------------------------------------
    3 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     3# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    44#
    55# CppAD is distributed under multiple licenses. This distribution is under
     
    1515DEFS          =
    1616#
     17if CppAD_EIGEN_DIR
     18EIGEN_SRC_FILES    =  eigen_cholesky.cpp eigen_mat_inv.cpp eigen_mat_mul.cpp
     19EIGEN_EXTRA_FILES  =
     20else
     21EIGEN_EXTEA_FILES  =  eigen_cholesky.cpp eigen_mat_inv.cpp eigen_mat_mul.cpp
     22EIGEN_SRC_FILES    =
     23endif
     24#
     25EXTRA_DIST        =  \
     26        $(EIGEN_EXTRA_FILES)
     27#
    1728check_PROGRAMS    = atomic
    1829#
     
    2536#
    2637atomic_SOURCES   = \
     38        $(EIGEN_SRC_FILES) \
    2739        atomic.cpp \
    2840        checkpoint.cpp \
    29         eigen_cholesky.cpp \
    30         eigen_mat_inv.cpp \
    31         eigen_mat_mul.cpp \
    3241        extended_ode.cpp \
    3342        for_sparse_hes.cpp \
  • trunk/example/atomic/makefile.in

    r3920 r3922  
    9898CONFIG_CLEAN_FILES =
    9999CONFIG_CLEAN_VPATH_FILES =
    100 am_atomic_OBJECTS = atomic.$(OBJEXT) checkpoint.$(OBJEXT) \
    101         eigen_cholesky.$(OBJEXT) eigen_mat_inv.$(OBJEXT) \
    102         eigen_mat_mul.$(OBJEXT) extended_ode.$(OBJEXT) \
     100am__atomic_SOURCES_DIST = eigen_cholesky.cpp eigen_mat_inv.cpp \
     101        eigen_mat_mul.cpp atomic.cpp checkpoint.cpp extended_ode.cpp \
     102        for_sparse_hes.cpp for_sparse_jac.cpp forward.cpp \
     103        get_started.cpp mat_mul.cpp mul_level.cpp norm_sq.cpp ode.cpp \
     104        reciprocal.cpp rev_sparse_hes.cpp rev_sparse_jac.cpp \
     105        reverse.cpp set_sparsity.cpp tangent.cpp
     106@CppAD_EIGEN_DIR_TRUE@am__objects_1 = eigen_cholesky.$(OBJEXT) \
     107@CppAD_EIGEN_DIR_TRUE@  eigen_mat_inv.$(OBJEXT) \
     108@CppAD_EIGEN_DIR_TRUE@  eigen_mat_mul.$(OBJEXT)
     109am_atomic_OBJECTS = $(am__objects_1) atomic.$(OBJEXT) \
     110        checkpoint.$(OBJEXT) extended_ode.$(OBJEXT) \
    103111        for_sparse_hes.$(OBJEXT) for_sparse_jac.$(OBJEXT) \
    104112        forward.$(OBJEXT) get_started.$(OBJEXT) mat_mul.$(OBJEXT) \
     
    139147am__v_CXXLD_1 =
    140148SOURCES = $(atomic_SOURCES)
    141 DIST_SOURCES = $(atomic_SOURCES)
     149DIST_SOURCES = $(am__atomic_SOURCES_DIST)
    142150am__can_run_installinfo = \
    143151  case $$AM_UPDATE_INFO_DIR in \
     
    287295cppad_description = @cppad_description@
    288296cppad_eigenvector = @cppad_eigenvector@
     297cppad_has_adolc = @cppad_has_adolc@
     298cppad_has_boost = @cppad_has_boost@
    289299cppad_has_colpack = @cppad_has_colpack@
    290300cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     301cppad_has_eigen = @cppad_has_eigen@
     302cppad_has_fadbad = @cppad_has_fadbad@
    291303cppad_has_gettimeofday = @cppad_has_gettimeofday@
     304cppad_has_ipopt = @cppad_has_ipopt@
    292305cppad_has_mkstemp = @cppad_has_mkstemp@
    293306cppad_has_nullptr = @cppad_has_nullptr@
    294307cppad_has_rvalue = @cppad_has_rvalue@
     308cppad_has_sacado = @cppad_has_sacado@
    295309cppad_has_steady_clock = @cppad_has_steady_clock@
    296310cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
     
    342356top_builddir = @top_builddir@
    343357top_srcdir = @top_srcdir@
     358@CppAD_EIGEN_DIR_FALSE@EIGEN_SRC_FILES =
     359#
     360@CppAD_EIGEN_DIR_TRUE@EIGEN_SRC_FILES = eigen_cholesky.cpp eigen_mat_inv.cpp eigen_mat_mul.cpp
     361@CppAD_EIGEN_DIR_TRUE@EIGEN_EXTRA_FILES =
     362@CppAD_EIGEN_DIR_FALSE@EIGEN_EXTEA_FILES = eigen_cholesky.cpp eigen_mat_inv.cpp eigen_mat_mul.cpp
     363#
     364EXTRA_DIST = \
     365        $(EIGEN_EXTRA_FILES)
     366
    344367#
    345368AM_CXXFLAGS = -g $(CXX_FLAGS)
     
    352375#
    353376atomic_SOURCES = \
     377        $(EIGEN_SRC_FILES) \
    354378        atomic.cpp \
    355379        checkpoint.cpp \
    356         eigen_cholesky.cpp \
    357         eigen_mat_inv.cpp \
    358         eigen_mat_mul.cpp \
    359380        extended_ode.cpp \
    360381        for_sparse_hes.cpp \
  • trunk/example/example.cpp

    r3892 r3922  
    2828*/
    2929// BEGIN C++
     30
     31// CPPAD_HAS_* defines
     32# include <cppad/configure.hpp>
    3033
    3134// system include files used for I/O
     
    279282        ok &= Run( Var2Par,           "Var2Par"          );
    280283        ok &= Run( vec_ad,            "vec_ad"           );
    281 # ifdef CPPAD_HAS_ADOLC
     284# if CPPAD_HAS_ADOLC
    282285        ok &= Run( mul_level_adolc,      "mul_level_adolc"     );
    283286        ok &= Run( mul_level_adolc_ode,  "mul_level_adolc_ode" );
    284287# endif
    285 # ifdef CPPAD_HAS_EIGEN
     288# if CPPAD_HAS_EIGEN
    286289        ok &= Run( eigen_array,       "eigen_array"      );
    287290        ok &= Run( eigen_det,         "eigen_det"        );
  • trunk/example/ipopt_solve/makefile.in

    r3920 r3922  
    284284cppad_description = @cppad_description@
    285285cppad_eigenvector = @cppad_eigenvector@
     286cppad_has_adolc = @cppad_has_adolc@
     287cppad_has_boost = @cppad_has_boost@
    286288cppad_has_colpack = @cppad_has_colpack@
    287289cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     290cppad_has_eigen = @cppad_has_eigen@
     291cppad_has_fadbad = @cppad_has_fadbad@
    288292cppad_has_gettimeofday = @cppad_has_gettimeofday@
     293cppad_has_ipopt = @cppad_has_ipopt@
    289294cppad_has_mkstemp = @cppad_has_mkstemp@
    290295cppad_has_nullptr = @cppad_has_nullptr@
    291296cppad_has_rvalue = @cppad_has_rvalue@
     297cppad_has_sacado = @cppad_has_sacado@
    292298cppad_has_steady_clock = @cppad_has_steady_clock@
    293299cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/example/makefile.am

    r3921 r3922  
    1818ADOLC_EXTRA_FILES  =
    1919ADOLC_LIB          = -ladolc -lColPack -L$(ADOLC_DIR)/lib -L$(ADOLC_DIR)/lib64
    20 ADOLC_FLAGS        = -DCPPAD_HAS_ADOLC -I$(ADOLC_DIR)/include
     20ADOLC_FLAGS        = -I$(ADOLC_DIR)/include
    2121else
    2222ADOLC_EXTRA_FILES =  mul_level_adolc.cpp mul_level_adolc_ode.cpp
     
    3333libeigen_a_SOURCES  =  eigen_det.cpp eigen_array.cpp
    3434EIGEN_LIB           = -L. -leigen
    35 EIGEN_FLAGS         = -DCPPAD_HAS_EIGEN
     35EIGEN_FLAGS         =
    3636libeigen_a_CXXFLAGS = \
    3737        -g $(CXX_FLAGS_EIGEN) \
    38         -DCPPAD_HAS_EIGEN \
    3938        -I$(EIGEN_DIR)/include
    4039else
  • trunk/example/makefile.in

    r3920 r3922  
    378378cppad_description = @cppad_description@
    379379cppad_eigenvector = @cppad_eigenvector@
     380cppad_has_adolc = @cppad_has_adolc@
     381cppad_has_boost = @cppad_has_boost@
    380382cppad_has_colpack = @cppad_has_colpack@
    381383cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     384cppad_has_eigen = @cppad_has_eigen@
     385cppad_has_fadbad = @cppad_has_fadbad@
    382386cppad_has_gettimeofday = @cppad_has_gettimeofday@
     387cppad_has_ipopt = @cppad_has_ipopt@
    383388cppad_has_mkstemp = @cppad_has_mkstemp@
    384389cppad_has_nullptr = @cppad_has_nullptr@
    385390cppad_has_rvalue = @cppad_has_rvalue@
     391cppad_has_sacado = @cppad_has_sacado@
    386392cppad_has_steady_clock = @cppad_has_steady_clock@
    387393cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
     
    441447@CppAD_ADOLC_TRUE@ADOLC_LIB = -ladolc -lColPack -L$(ADOLC_DIR)/lib -L$(ADOLC_DIR)/lib64
    442448@CppAD_ADOLC_FALSE@ADOLC_FLAGS =
    443 @CppAD_ADOLC_TRUE@ADOLC_FLAGS = -DCPPAD_HAS_ADOLC -I$(ADOLC_DIR)/include
     449@CppAD_ADOLC_TRUE@ADOLC_FLAGS = -I$(ADOLC_DIR)/include
    444450@CppAD_EIGEN_DIR_FALSE@@CppAD_HAVE_AR_TRUE@EIGEN_EXTRA_FILES = eigen_det.cpp eigen_array.cpp
    445451# -------------------------------------------------------------------------
     
    453459@CppAD_HAVE_AR_FALSE@EIGEN_LIB =
    454460@CppAD_EIGEN_DIR_FALSE@@CppAD_HAVE_AR_TRUE@EIGEN_FLAGS =
    455 @CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@EIGEN_FLAGS = -DCPPAD_HAS_EIGEN
     461@CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@EIGEN_FLAGS =
    456462@CppAD_HAVE_AR_FALSE@EIGEN_FLAGS =
    457463@CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@libeigen_a_CXXFLAGS = \
    458464@CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@      -g $(CXX_FLAGS_EIGEN) \
    459 @CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@      -DCPPAD_HAS_EIGEN \
    460465@CppAD_EIGEN_DIR_TRUE@@CppAD_HAVE_AR_TRUE@      -I$(EIGEN_DIR)/include
    461466
    462467# -------------------------------------------------------------------------
    463 # auto-tools does not support use of colpack
     468# autotools does not support use of colpack
    464469EXTRA_DIST = \
    465470        $(ADOLC_EXTRA_FILES) \
  • trunk/example/optimize/makefile.in

    r3920 r3922  
    282282cppad_description = @cppad_description@
    283283cppad_eigenvector = @cppad_eigenvector@
     284cppad_has_adolc = @cppad_has_adolc@
     285cppad_has_boost = @cppad_has_boost@
    284286cppad_has_colpack = @cppad_has_colpack@
    285287cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     288cppad_has_eigen = @cppad_has_eigen@
     289cppad_has_fadbad = @cppad_has_fadbad@
    286290cppad_has_gettimeofday = @cppad_has_gettimeofday@
     291cppad_has_ipopt = @cppad_has_ipopt@
    287292cppad_has_mkstemp = @cppad_has_mkstemp@
    288293cppad_has_nullptr = @cppad_has_nullptr@
    289294cppad_has_rvalue = @cppad_has_rvalue@
     295cppad_has_sacado = @cppad_has_sacado@
    290296cppad_has_steady_clock = @cppad_has_steady_clock@
    291297cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/example/sparse/makefile.in

    r3920 r3922  
    288288cppad_description = @cppad_description@
    289289cppad_eigenvector = @cppad_eigenvector@
     290cppad_has_adolc = @cppad_has_adolc@
     291cppad_has_boost = @cppad_has_boost@
    290292cppad_has_colpack = @cppad_has_colpack@
    291293cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     294cppad_has_eigen = @cppad_has_eigen@
     295cppad_has_fadbad = @cppad_has_fadbad@
    292296cppad_has_gettimeofday = @cppad_has_gettimeofday@
     297cppad_has_ipopt = @cppad_has_ipopt@
    293298cppad_has_mkstemp = @cppad_has_mkstemp@
    294299cppad_has_nullptr = @cppad_has_nullptr@
    295300cppad_has_rvalue = @cppad_has_rvalue@
     301cppad_has_sacado = @cppad_has_sacado@
    296302cppad_has_steady_clock = @cppad_has_steady_clock@
    297303cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/example/sparse/sparse.cpp

    r3892 r3922  
    99Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1010-------------------------------------------------------------------------- */
     11
     12// CPPAD_HAS_* defines
     13# include <cppad/configure.hpp>
    1114
    1215// system include files used for I/O
  • trunk/example/utility/makefile.in

    r3920 r3922  
    288288cppad_description = @cppad_description@
    289289cppad_eigenvector = @cppad_eigenvector@
     290cppad_has_adolc = @cppad_has_adolc@
     291cppad_has_boost = @cppad_has_boost@
    290292cppad_has_colpack = @cppad_has_colpack@
    291293cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     294cppad_has_eigen = @cppad_has_eigen@
     295cppad_has_fadbad = @cppad_has_fadbad@
    292296cppad_has_gettimeofday = @cppad_has_gettimeofday@
     297cppad_has_ipopt = @cppad_has_ipopt@
    293298cppad_has_mkstemp = @cppad_has_mkstemp@
    294299cppad_has_nullptr = @cppad_has_nullptr@
    295300cppad_has_rvalue = @cppad_has_rvalue@
     301cppad_has_sacado = @cppad_has_sacado@
    296302cppad_has_steady_clock = @cppad_has_steady_clock@
    297303cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/example/utility/to_string.cpp

    r3873 r3922  
    6262                std::string s = CppAD::to_string( pi );
    6363                Float check    = std::atof( s.c_str() );
    64                 ok           &= std::fabs( check - pi ) <= 2.0 * eps;
     64                ok           &= std::fabs( check / pi - 1.0 ) <= 2.0 * eps;
    6565                //
    6666                return ok;
     
    7979                std::string s = CppAD::to_string( CppAD::AD<Base>( pi ) );
    8080                Base check    = std::atof( s.c_str() );
    81                 ok           &= std::fabs( check - pi ) <= 2.0 * eps;
     81                ok           &= std::fabs( check / pi - 1.0 ) <= 2.0 * eps;
    8282                //
    8383                return ok;
  • trunk/introduction/exp_apx/makefile.in

    r3920 r3922  
    297297cppad_description = @cppad_description@
    298298cppad_eigenvector = @cppad_eigenvector@
     299cppad_has_adolc = @cppad_has_adolc@
     300cppad_has_boost = @cppad_has_boost@
    299301cppad_has_colpack = @cppad_has_colpack@
    300302cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     303cppad_has_eigen = @cppad_has_eigen@
     304cppad_has_fadbad = @cppad_has_fadbad@
    301305cppad_has_gettimeofday = @cppad_has_gettimeofday@
     306cppad_has_ipopt = @cppad_has_ipopt@
    302307cppad_has_mkstemp = @cppad_has_mkstemp@
    303308cppad_has_nullptr = @cppad_has_nullptr@
    304309cppad_has_rvalue = @cppad_has_rvalue@
     310cppad_has_sacado = @cppad_has_sacado@
    305311cppad_has_steady_clock = @cppad_has_steady_clock@
    306312cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/introduction/get_started/makefile.in

    r3920 r3922  
    280280cppad_description = @cppad_description@
    281281cppad_eigenvector = @cppad_eigenvector@
     282cppad_has_adolc = @cppad_has_adolc@
     283cppad_has_boost = @cppad_has_boost@
    282284cppad_has_colpack = @cppad_has_colpack@
    283285cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     286cppad_has_eigen = @cppad_has_eigen@
     287cppad_has_fadbad = @cppad_has_fadbad@
    284288cppad_has_gettimeofday = @cppad_has_gettimeofday@
     289cppad_has_ipopt = @cppad_has_ipopt@
    285290cppad_has_mkstemp = @cppad_has_mkstemp@
    286291cppad_has_nullptr = @cppad_has_nullptr@
    287292cppad_has_rvalue = @cppad_has_rvalue@
     293cppad_has_sacado = @cppad_has_sacado@
    288294cppad_has_steady_clock = @cppad_has_steady_clock@
    289295cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/makefile.in

    r3921 r3922  
    351351cppad_description = @cppad_description@
    352352cppad_eigenvector = @cppad_eigenvector@
     353cppad_has_adolc = @cppad_has_adolc@
     354cppad_has_boost = @cppad_has_boost@
    353355cppad_has_colpack = @cppad_has_colpack@
    354356cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     357cppad_has_eigen = @cppad_has_eigen@
     358cppad_has_fadbad = @cppad_has_fadbad@
    355359cppad_has_gettimeofday = @cppad_has_gettimeofday@
     360cppad_has_ipopt = @cppad_has_ipopt@
    356361cppad_has_mkstemp = @cppad_has_mkstemp@
    357362cppad_has_nullptr = @cppad_has_nullptr@
    358363cppad_has_rvalue = @cppad_has_rvalue@
     364cppad_has_sacado = @cppad_has_sacado@
    359365cppad_has_steady_clock = @cppad_has_steady_clock@
    360366cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/multi_thread/makefile.in

    r3920 r3922  
    322322cppad_description = @cppad_description@
    323323cppad_eigenvector = @cppad_eigenvector@
     324cppad_has_adolc = @cppad_has_adolc@
     325cppad_has_boost = @cppad_has_boost@
    324326cppad_has_colpack = @cppad_has_colpack@
    325327cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     328cppad_has_eigen = @cppad_has_eigen@
     329cppad_has_fadbad = @cppad_has_fadbad@
    326330cppad_has_gettimeofday = @cppad_has_gettimeofday@
     331cppad_has_ipopt = @cppad_has_ipopt@
    327332cppad_has_mkstemp = @cppad_has_mkstemp@
    328333cppad_has_nullptr = @cppad_has_nullptr@
    329334cppad_has_rvalue = @cppad_has_rvalue@
     335cppad_has_sacado = @cppad_has_sacado@
    330336cppad_has_steady_clock = @cppad_has_steady_clock@
    331337cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/multi_thread/test_multi/makefile.in

    r3920 r3922  
    279279cppad_description = @cppad_description@
    280280cppad_eigenvector = @cppad_eigenvector@
     281cppad_has_adolc = @cppad_has_adolc@
     282cppad_has_boost = @cppad_has_boost@
    281283cppad_has_colpack = @cppad_has_colpack@
    282284cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     285cppad_has_eigen = @cppad_has_eigen@
     286cppad_has_fadbad = @cppad_has_fadbad@
    283287cppad_has_gettimeofday = @cppad_has_gettimeofday@
     288cppad_has_ipopt = @cppad_has_ipopt@
    284289cppad_has_mkstemp = @cppad_has_mkstemp@
    285290cppad_has_nullptr = @cppad_has_nullptr@
    286291cppad_has_rvalue = @cppad_has_rvalue@
     292cppad_has_sacado = @cppad_has_sacado@
    287293cppad_has_steady_clock = @cppad_has_steady_clock@
    288294cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/omh/appendix/whats_new/whats_new_17.omh

    r3921 r3922  
    5353under some gcc compiler options.
    5454This has been fixed.
     55$lnext
     56Specifications were added so that $cref to_string$$ yields exact results
     57for integer types and machine precision for floating point types.
     58$lnext
     59Some corrections and updating were done to the $cref autotools$$
     60instructions. In particular, see
     61$cref/configure.hpp/autotools/configure.hpp/$$.
    5562$lend
    5663
  • trunk/omh/install/autotools.omh

    r3921 r3922  
    1414$dollar ^$$
    1515$spell
    16         autotools
    17         ctor
    18         testvector
    19         Eigen
    20         colpack
     16        Autotools
     17        CppAD
     18        dist_dir
    2119        num
    2220        cxx
    23         boostvector
    24         inv
    25         fopenmp
    2621        openmp
    27         cout
    28         Addr
    29         sizeof
    30         op_arg
    31         err_retu
    32         const
    33         printf
    34         avector.h
    35         Ipopt
    36         Ip
    37         gzip
    38         Linux
    39         fi
    40         exp_apx
    41         tgz
    42         gpl
    43         Dev
    44         sed
     22        fadbad
     23        ipopt
     24        addr
     25        hpp
     26        adolc
     27        eigen
     28        sacado
     29        cpp
    4530        cppad
    4631        gprof
    47         config
     32        sed
     33        user
     34        yyyymmdd
     35        testvector
    4836        stdvector
     37        boostvector
    4938        std
     39        fopenmp
     40        adouble
     41        colpack
     42        Linux
     43        Cygwin
     44        cygdrive
     45        badiff
     46        Ip
     47        sizeof
     48        op
     49        arg
     50        cpp
     51        usr
     52        htm
    5053        ublas
    51         hpp
    52         adouble
    53         badiff
    54         usr
    55         cygdrive
    56         htm
    57         xml
    58         Dir
    59         xvzf
    60         gz
    61         workspace
    62         Makefile
    63         exe
    64         Cygwin
    65         Microsoft
    66         dsw
    67         CppAD
    68         Adolc
    69         Fadbad
    70         Sacado
    71         ls
    72         aclocal
    73         yum
    74         devel
     54        cp
    7555$$
    7656
    7757
    7858$section Autotools Unix Test and Installation$$
    79 $mindex speed profile prefix std vector boost eigen sparse internal sets ctor implicit explicit compile flags OpenMP postfix Adolc Fadbad Ipopt Sacado memory usage tape$$
    8059
    8160$head Deprecated 2012-12-26$$
    82 These install instructions have been deprecated and no improvements
     61This install procedure has been deprecated and no improvements
    8362have been added since 2012.
    8463For example, this install procedure will not detect any of the
     
    9069using the $cref download$$ instructions.
    9170The install instructions below correspond to the
    92 $cref/current version/download/Current Version/$$
    93 which has distribution directory $code cppad-20121230$$.
    94 
    95 $head Work Directory$$
    96 Create the directory $code cppad-20121230/build$$,
     71$cref/current version/download/Current Version/$$.
     72We refer to the corresponding
     73$cref/distribution directory/download/Distribution Directory/$$ as
     74$icode dist_dir$$.
     75
     76$head Build Directory$$
     77Create the directory $icode%dist_dir%/build%$$,
    9778which will be referred to as the build directory below.
    9879
     
    119100where only the $code configure$$ line need appear; i.e.,
    120101the entries in all of the other lines are optional.
    121 The text in italic is replaced values that you choose;
    122 see discussion below.
     102The text in italic above is replaced values that you choose
     103(see discussion below).
     104
     105$head configure.hpp$$
     106The $code configure$$ command will create the $code configure.hpp$$
     107file in the wrong directory. You can move it using the following command
     108in the build directory:
     109$codei%
     110        cp cppad/configure.hpp cp  ../cppad/configure.hpp
     111%$$
    123112
    124113$head make$$
    125114CppAD has some object libraries that are used for its correctness tests.
    126115(Currently, none of these libraries get installed.)
    127 You can build these libraries by executing the command
     116You can build these libraries by executing the following command in the
     117build directory:
    128118$codei%
    129119        make
    130120%$$
    131 in the build directory.
    132121
    133122$subhead Examples and Tests$$
    134123Once you have executed the $code make$$ command,
    135124you can run the correctness and speed tests.
    136 $pre
    137 
    138 $$
    139 The following command will build all the correctness and speed tests.
    140 In addition, it will run all the correctness tests:
    141 $codep
    142         make test
    143 $$
    144 $pre
    145 
    146 $$
    147 The following links describe how to build and run subsets of these tests:
    148 $table
    149 $cref/get_started/get_started.cpp/Running/$$
    150         $cnext $title get_started.cpp$$
    151 $rnext
    152 $cref/exp_apx_main/exp_apx_main.cpp/Running Tests/$$
    153         $cnext $title exp_apx_main.cpp$$
    154 $rnext
    155 $cref/example/example.cpp/Running Tests/$$
    156         $cnext $title example.cpp$$
    157 $rnext
    158 $cref/print_for_cout/print_for_cout.cpp/Running/$$
    159         $cnext $title print_for_cout.cpp$$
    160 $rnext
    161 $cref/speed_example/speed_example.cpp/Running Tests/$$
    162         $cnext $title speed_example.cpp$$
    163 $rnext
    164 $cref/speed_double/speed_double/Running Tests/$$
    165         $cnext $title speed_double$$
    166 $rnext
    167 $cref/speed_adolc/speed_adolc/Running Tests/$$
    168         $cnext $title speed_adolc$$
    169 $rnext
    170 $cref/speed_cppad/speed_cppad/Running Tests/$$
    171         $cnext $title speed_cppad$$
    172 $rnext
    173 $cref/speed_fadbad/speed_fadbad/Running Tests/$$
    174         $cnext $title speed_fadbad$$
    175 $rnext
    176 $cref/speed_sacado/speed_sacado/Running Tests/$$
    177         $cnext $title speed_sacado$$
    178 $tend
    179 In addition,
    180 you can run a large subset of correctness tests
    181 (that are not intended to be examples)
    182 by executing the following commands starting in the build directory:
    183 $codei%
    184         cd test_more
    185         make test
    186 %$$
     125The following command will build and run all the correctness and speed tests.
     126$codep
     127        make test
     128$$
    187129
    188130$head Profiling CppAD$$
     
    195137%$$
    196138After executing $code make test$$, you can run a profile speed test
    197 by executing the command $code ./profile$$;
     139by executing the command
     140$codei%
     141        ./speed_profile %test% %seed% %option_list%
     142%$$
    198143see $cref speed_main$$ for the meaning of the command line
    199 options to this program.
    200 $pre
    201 
    202 $$
     144arguments to this program.
    203145After you have run a profiling speed test,
    204146you can then obtain the profiling results with
    205147$codei%
    206         gprof -b profile
    207 %$$
    208 If you are using a windows operating system with Cygwin or MinGW,
    209 you may have to replace $code profile$$ by $code profile.exe$$
    210 in the $code gprof$$ command above; i.e.,
    211 $codep
    212         gprof -b profile.exe
    213 $$
     148        gprof -b speed_profile
     149%$$
    214150In C++, template parameters and argument types become part of a
    215151routines's name.
     
    219155routine names by executing the following command
    220156$codep
    221         gprof -b profile | sed -f gprof.sed
    222 $$
    223 If you are using a windows operating system with Cygwin or MinGW,
    224 you would need to use
    225 $codep
    226         gprof -b profile.exe | sed -f gprof.sed
     157        gprof -b speed_profile | sed -f gprof.sed
    227158$$
    228159
     
    244175is specified, the CppAD documentation files will be installed in the directory
    245176$codei%
    246         /usr/local/share/doc/cppad-20121230
    247 %$$
     177        /usr/local/share/doc/cppad-%yyyymmdd%
     178%$$
     179where $icode yyyymmdd$$ is the year, month, and day corresponding
     180to the version of CppAD.
    248181
    249182$head --with-Documentation$$
     
    251184the CppAD documentation HTML and XML files are copied to the directory
    252185$codei%
    253         %prefix_dir%/share/doc/%postfix_dir%/cppad-20121230
     186        %prefix_dir%/share/doc/%postfix_dir%/cppad-%yyyymmdd%
    254187%$$
    255188(see $cref/postfix_dir/autotools/postfix_dir/$$).
     
    257190(with mathematics displayed as LaTex command) will be located at
    258191$codei%
    259         %prefix_dir%/share/doc/%postfix_dir%/cppad-20121230/cppad.htm
    260 %$$
    261 and the top of the XML documentation tree
    262 (with mathematics displayed as MathML) will be located at
    263 $codei%
    264         %prefix_dir%/share/doc/%postfix_dir%/cppad-20121230/cppad.xml
     192        %prefix_dir%/share/doc/%postfix_dir%/cppad-%yyyymmdd%/cppad.htm
    265193%$$
    266194
     
    337265is specified, the CppAD documentation files will be installed in the directory
    338266$codei%
    339         /usr/local/share/doc/coin/cppad-20121230
     267        /usr/local/share/doc/coin/cppad-%yyyymmdd%
    340268%$$
    341269
  • trunk/pkgconfig/CMakeLists.txt

    r3859 r3922  
    1 # $Id$
    21# -----------------------------------------------------------------------------
    3 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     2# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43#
    54# CppAD is distributed under multiple licenses. This distribution is under
     
    2019# Settings that are only included if cppad is configured with ipopt.
    2120# (Note that ipopt has a pkgconfig file.)
    22 IF( ipopt_prefix )
     21IF( cppad_has_ipopt )
    2322        SET(cppad_pkgconfig_requires "ipopt")
    2423        SET(cppad_pkgconfig_libs "-L${cppad_abs_libdir} -lcppad_ipopt")
    25 ENDIF( ipopt_prefix )
     24ENDIF( cppad_has_ipopt )
    2625#
    2726# Settings that are only included if cppad is configured with colpack
    2827# (Note that colpack does not have a pkgconfig file.)
    29 IF( colpack_prefix )
     28IF( cppad_has_colpack )
    3029        SET(cppad_pkgconfig_libs "${cppad_pkgconfig_libs} -lColPack")
    3130        FOREACH(dir ${cmake_install_libdirs})
     
    4342                ENDIF(IS_DIRECTORY ${colpack_prefix}/${dir} )
    4443        ENDFOREACH(dir)
    45 ENDIF( colpack_prefix )
     44ENDIF( cppad_has_colpack )
    4645#
    4746print_variable(cppad_pkgconfig_cflags)
  • trunk/print_for/makefile.in

    r3920 r3922  
    279279cppad_description = @cppad_description@
    280280cppad_eigenvector = @cppad_eigenvector@
     281cppad_has_adolc = @cppad_has_adolc@
     282cppad_has_boost = @cppad_has_boost@
    281283cppad_has_colpack = @cppad_has_colpack@
    282284cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     285cppad_has_eigen = @cppad_has_eigen@
     286cppad_has_fadbad = @cppad_has_fadbad@
    283287cppad_has_gettimeofday = @cppad_has_gettimeofday@
     288cppad_has_ipopt = @cppad_has_ipopt@
    284289cppad_has_mkstemp = @cppad_has_mkstemp@
    285290cppad_has_nullptr = @cppad_has_nullptr@
    286291cppad_has_rvalue = @cppad_has_rvalue@
     292cppad_has_sacado = @cppad_has_sacado@
    287293cppad_has_steady_clock = @cppad_has_steady_clock@
    288294cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/CMakeLists.txt

    r3857 r3922  
    1 # $Id$
    21# -----------------------------------------------------------------------------
    3 # CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell
     2# CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43#
    54# CppAD is distributed under multiple licenses. This distribution is under
     
    3130ENDIF ( cppad_profile_flag )
    3231#
    33 IF ( adolc_prefix )
     32IF( cppad_has_adolc )
    3433        ADD_SUBDIRECTORY(adolc)
    35 ENDIF( adolc_prefix )
    36 IF ( fadbad_prefix )
     34ENDIF( cppad_has_adolc )
     35IF( cppad_has_fadbad )
    3736        ADD_SUBDIRECTORY(fadbad)
    38 ENDIF( fadbad_prefix )
    39 IF ( sacado_prefix )
     37ENDIF( cppad_has_fadbad )
     38IF( cppad_has_sacado )
    4039        ADD_SUBDIRECTORY(sacado)
    41 ENDIF( sacado_prefix )
     40ENDIF( cppad_has_sacado )
    4241
    4342# check_speed
  • trunk/speed/adolc/makefile.in

    r3920 r3922  
    283283cppad_description = @cppad_description@
    284284cppad_eigenvector = @cppad_eigenvector@
     285cppad_has_adolc = @cppad_has_adolc@
     286cppad_has_boost = @cppad_has_boost@
    285287cppad_has_colpack = @cppad_has_colpack@
    286288cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     289cppad_has_eigen = @cppad_has_eigen@
     290cppad_has_fadbad = @cppad_has_fadbad@
    287291cppad_has_gettimeofday = @cppad_has_gettimeofday@
     292cppad_has_ipopt = @cppad_has_ipopt@
    288293cppad_has_mkstemp = @cppad_has_mkstemp@
    289294cppad_has_nullptr = @cppad_has_nullptr@
    290295cppad_has_rvalue = @cppad_has_rvalue@
     296cppad_has_sacado = @cppad_has_sacado@
    291297cppad_has_steady_clock = @cppad_has_steady_clock@
    292298cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/cppad/makefile.in

    r3920 r3922  
    270270cppad_description = @cppad_description@
    271271cppad_eigenvector = @cppad_eigenvector@
     272cppad_has_adolc = @cppad_has_adolc@
     273cppad_has_boost = @cppad_has_boost@
    272274cppad_has_colpack = @cppad_has_colpack@
    273275cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     276cppad_has_eigen = @cppad_has_eigen@
     277cppad_has_fadbad = @cppad_has_fadbad@
    274278cppad_has_gettimeofday = @cppad_has_gettimeofday@
     279cppad_has_ipopt = @cppad_has_ipopt@
    275280cppad_has_mkstemp = @cppad_has_mkstemp@
    276281cppad_has_nullptr = @cppad_has_nullptr@
    277282cppad_has_rvalue = @cppad_has_rvalue@
     283cppad_has_sacado = @cppad_has_sacado@
    278284cppad_has_steady_clock = @cppad_has_steady_clock@
    279285cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/double/makefile.in

    r3920 r3922  
    270270cppad_description = @cppad_description@
    271271cppad_eigenvector = @cppad_eigenvector@
     272cppad_has_adolc = @cppad_has_adolc@
     273cppad_has_boost = @cppad_has_boost@
    272274cppad_has_colpack = @cppad_has_colpack@
    273275cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     276cppad_has_eigen = @cppad_has_eigen@
     277cppad_has_fadbad = @cppad_has_fadbad@
    274278cppad_has_gettimeofday = @cppad_has_gettimeofday@
     279cppad_has_ipopt = @cppad_has_ipopt@
    275280cppad_has_mkstemp = @cppad_has_mkstemp@
    276281cppad_has_nullptr = @cppad_has_nullptr@
    277282cppad_has_rvalue = @cppad_has_rvalue@
     283cppad_has_sacado = @cppad_has_sacado@
    278284cppad_has_steady_clock = @cppad_has_steady_clock@
    279285cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/example/makefile.in

    r3920 r3922  
    286286cppad_description = @cppad_description@
    287287cppad_eigenvector = @cppad_eigenvector@
     288cppad_has_adolc = @cppad_has_adolc@
     289cppad_has_boost = @cppad_has_boost@
    288290cppad_has_colpack = @cppad_has_colpack@
    289291cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     292cppad_has_eigen = @cppad_has_eigen@
     293cppad_has_fadbad = @cppad_has_fadbad@
    290294cppad_has_gettimeofday = @cppad_has_gettimeofday@
     295cppad_has_ipopt = @cppad_has_ipopt@
    291296cppad_has_mkstemp = @cppad_has_mkstemp@
    292297cppad_has_nullptr = @cppad_has_nullptr@
    293298cppad_has_rvalue = @cppad_has_rvalue@
     299cppad_has_sacado = @cppad_has_sacado@
    294300cppad_has_steady_clock = @cppad_has_steady_clock@
    295301cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/fadbad/makefile.in

    r3920 r3922  
    271271cppad_description = @cppad_description@
    272272cppad_eigenvector = @cppad_eigenvector@
     273cppad_has_adolc = @cppad_has_adolc@
     274cppad_has_boost = @cppad_has_boost@
    273275cppad_has_colpack = @cppad_has_colpack@
    274276cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     277cppad_has_eigen = @cppad_has_eigen@
     278cppad_has_fadbad = @cppad_has_fadbad@
    275279cppad_has_gettimeofday = @cppad_has_gettimeofday@
     280cppad_has_ipopt = @cppad_has_ipopt@
    276281cppad_has_mkstemp = @cppad_has_mkstemp@
    277282cppad_has_nullptr = @cppad_has_nullptr@
    278283cppad_has_rvalue = @cppad_has_rvalue@
     284cppad_has_sacado = @cppad_has_sacado@
    279285cppad_has_steady_clock = @cppad_has_steady_clock@
    280286cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/profile/makefile.in

    r3920 r3922  
    274274cppad_description = @cppad_description@
    275275cppad_eigenvector = @cppad_eigenvector@
     276cppad_has_adolc = @cppad_has_adolc@
     277cppad_has_boost = @cppad_has_boost@
    276278cppad_has_colpack = @cppad_has_colpack@
    277279cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     280cppad_has_eigen = @cppad_has_eigen@
     281cppad_has_fadbad = @cppad_has_fadbad@
    278282cppad_has_gettimeofday = @cppad_has_gettimeofday@
     283cppad_has_ipopt = @cppad_has_ipopt@
    279284cppad_has_mkstemp = @cppad_has_mkstemp@
    280285cppad_has_nullptr = @cppad_has_nullptr@
    281286cppad_has_rvalue = @cppad_has_rvalue@
     287cppad_has_sacado = @cppad_has_sacado@
    282288cppad_has_steady_clock = @cppad_has_steady_clock@
    283289cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/sacado/makefile.in

    r3920 r3922  
    271271cppad_description = @cppad_description@
    272272cppad_eigenvector = @cppad_eigenvector@
     273cppad_has_adolc = @cppad_has_adolc@
     274cppad_has_boost = @cppad_has_boost@
    273275cppad_has_colpack = @cppad_has_colpack@
    274276cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     277cppad_has_eigen = @cppad_has_eigen@
     278cppad_has_fadbad = @cppad_has_fadbad@
    275279cppad_has_gettimeofday = @cppad_has_gettimeofday@
     280cppad_has_ipopt = @cppad_has_ipopt@
    276281cppad_has_mkstemp = @cppad_has_mkstemp@
    277282cppad_has_nullptr = @cppad_has_nullptr@
    278283cppad_has_rvalue = @cppad_has_rvalue@
     284cppad_has_sacado = @cppad_has_sacado@
    279285cppad_has_steady_clock = @cppad_has_steady_clock@
    280286cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/speed/src/makefile.in

    r3920 r3922  
    289289cppad_description = @cppad_description@
    290290cppad_eigenvector = @cppad_eigenvector@
     291cppad_has_adolc = @cppad_has_adolc@
     292cppad_has_boost = @cppad_has_boost@
    291293cppad_has_colpack = @cppad_has_colpack@
    292294cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     295cppad_has_eigen = @cppad_has_eigen@
     296cppad_has_fadbad = @cppad_has_fadbad@
    293297cppad_has_gettimeofday = @cppad_has_gettimeofday@
     298cppad_has_ipopt = @cppad_has_ipopt@
    294299cppad_has_mkstemp = @cppad_has_mkstemp@
    295300cppad_has_nullptr = @cppad_has_nullptr@
    296301cppad_has_rvalue = @cppad_has_rvalue@
     302cppad_has_sacado = @cppad_has_sacado@
    297303cppad_has_steady_clock = @cppad_has_steady_clock@
    298304cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
  • trunk/test_more/CMakeLists.txt

    r3904 r3922  
    2020# ADD_DEFINITIONS("-DCPPAD_MAX_NUM_THREADS=1")
    2121
    22 # adolc_sources, adolc_libs and CPPAD_ADOLC_TEST
    23 SET(sources base_adolc.cpp)
    24 sources_libs_define(adolc "${sources}" adolc ADOLC_TEST)
     22# adolc_sources, adolc_libs and CPPAD_HAS_ADOLC
     23IF( cppad_has_adolc )
     24        SET(adolc_sources base_adolc.cpp)
     25        SET(adolc_libs adolc)
     26ELSE( cppad_has_adolc )
     27        SET(adolc_sources "")
     28        SET(adolc_libs "")
     29ENDIF( cppad_has_adolc )
    2530
    26 # eigen_sources and CPPAD_EIGEN_TEST
    27 SET(sources cppad_eigen.cpp eigen_mat_inv.cpp)
    28 sources_libs_define(eigen "${sources}" "" EIGEN_TEST)
     31# eigen_sources and CPPAD_HAS_EIGEN
     32IF( cppad_has_eigen )
     33        SET(eigen_sources cppad_eigen.cpp eigen_mat_inv.cpp)
     34ELSE( cppad_has_eigen )
     35        SET(eigen_sources "")
     36ENDIF( cppad_has_eigen )
    2937
    3038# ipopt_prefix
    31 SET(sources ipopt_solve.cpp)
    32 sources_libs_define(ipopt "${sources}" "${ipopt_LIBRARIES}" IPOPT_TEST)
     39IF( cppad_has_ipopt )
     40        SET(ipopt_sources ipopt_solve.cpp)
     41        SET(ipopt_libs "${ipopt_LIBRARIES}")
     42ELSE( cppad_has_ipopt )
     43        SET(ipopt_sources "")
     44        SET(ipopt_libs "")
     45ENDIF( cppad_has_ipopt )
    3346
    3447# )
  • trunk/test_more/base_alloc.cpp

    r3779 r3922  
    1 // $Id$
    21/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     2CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43
    54CppAD is distributed under multiple licenses. This distribution is under
     
    1312# include <cppad/cppad.hpp>
    1413
    15 bool base_alloc_test(void)
     14namespace { // BEGIN empty namespace
     15
     16bool test_parameter(void)
    1617{       bool ok = true;
    17         using CppAD::thread_alloc;
    1818        typedef CppAD::AD<base_alloc> my_ad;
    1919
    20         // y = x^2
     20        // y = x + 0 + 1 + 2 + ... + N-1
    2121        CppAD::vector<my_ad>   a_x, a_y;
    2222        a_x.resize(1);
     
    3535        return ok;
    3636}
     37
     38bool test_numeric_limits(void)
     39{       bool ok = true;
     40        typedef CppAD::AD<base_alloc> my_ad;
     41        //
     42        base_alloc eps = Value( CppAD::numeric_limits<my_ad>::epsilon() );
     43        ok            &= *eps.ptrdbl_ == std::numeric_limits<double>::epsilon();
     44        //
     45        base_alloc min = Value( CppAD::numeric_limits<my_ad>::min() );
     46        ok            &= *min.ptrdbl_ == std::numeric_limits<double>::min();
     47        //
     48        base_alloc max = Value( CppAD::numeric_limits<my_ad>::max() );
     49        ok            &= *max.ptrdbl_ == std::numeric_limits<double>::max();
     50        //
     51        base_alloc nan = Value( CppAD::numeric_limits<my_ad>::quiet_NaN() );
     52        ok            &= *nan.ptrdbl_ != *nan.ptrdbl_;
     53        //
     54        int   digits10 = CppAD::numeric_limits<my_ad>::digits10;
     55        ok            &= digits10 == std::numeric_limits<double>::digits10;
     56        //
     57        return ok;
     58}
     59
     60bool test_to_string(void)
     61{       bool ok = true;
     62        typedef CppAD::AD<base_alloc> my_ad;
     63        //
     64        double      dbl_pi = 4.0 * std::atan(1.0);
     65        my_ad       ad_pi  = my_ad(dbl_pi);
     66        std::string str_pi = to_string( ad_pi );
     67        //
     68        // Check the length of the string "3.1415...". One extra character
     69        // for machine epsilon precision and another for the decimal point.
     70        ok &= str_pi.size() == size_t( 2 + std::numeric_limits<double>::digits10 );
     71        //
     72        // check value
     73        double eps   = std::numeric_limits<double>::epsilon();
     74        double check = std::atof( str_pi.c_str() );
     75        ok          &= (check / dbl_pi - 1.0) <= eps;
     76        //
     77        return ok;
     78}
     79
     80
     81} // END empty namespace
     82
     83bool base_alloc_test(void)
     84{       bool ok = true;
     85        //
     86        ok     &= test_parameter();
     87        ok     &= test_numeric_limits();
     88        ok     &= test_to_string();
     89        //
     90        return ok;
     91}
  • trunk/test_more/ipopt_solve.cpp

    r3757 r3922  
    1 // $Id$
    21/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     2CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43
    54CppAD is distributed under multiple licenses. This distribution is under
     
    1312Testing ipopt::solve
    1413*/
    15 # ifdef CPPAD_IPOPT_TEST
     14
     15// CPPAD_HAS_* defines
     16# include <cppad/configure.hpp>
     17
     18# if CPPAD_HAS_IPOPT
    1619
    1720# include <cppad/ipopt/solve.hpp>
  • trunk/test_more/makefile.am

    r3905 r3922  
    2525ADOLC_EXTRA_FILES =
    2626ADOLC_LIB         = -ladolc -lColPack -L$(ADOLC_DIR)/lib -L$(ADOLC_DIR)/lib64
    27 ADOLC_FLAGS       = -DCPPAD_ADOLC_TEST -I$(ADOLC_DIR)/include
     27ADOLC_FLAGS       = -I$(ADOLC_DIR)/include
    2828else
    2929ADOLC_EXTRA_FILES = base_adolc.cpp
     
    3838IPOPT_LIB         = -lipopt \
    3939        $(CPPAD_IPOPT_LIBS) $(FCLIBS) $(PTHREAD_LIB) $(DL_LIB)
    40 IPOPT_FLAGS       = -DCPPAD_IPOPT_TEST -I$(IPOPT_DIR)/include
     40IPOPT_FLAGS       = -I$(IPOPT_DIR)/include
    4141else
    4242IPOPT_EXTRA_FILES = ipopt_solve.cpp
     
    5555        -g \
    5656        $(CXX_FLAGS_EIGEN) \
    57         -DCPPAD_EIGEN_TEST \
    5857         -I$(EIGEN_DIR)/include
    5958else
  • trunk/test_more/makefile.in

    r3920 r3922  
    381381cppad_description = @cppad_description@
    382382cppad_eigenvector = @cppad_eigenvector@
     383cppad_has_adolc = @cppad_has_adolc@
     384cppad_has_boost = @cppad_has_boost@
    383385cppad_has_colpack = @cppad_has_colpack@
    384386cppad_has_cstdint_8_to_64 = @cppad_has_cstdint_8_to_64@
     387cppad_has_eigen = @cppad_has_eigen@
     388cppad_has_fadbad = @cppad_has_fadbad@
    385389cppad_has_gettimeofday = @cppad_has_gettimeofday@
     390cppad_has_ipopt = @cppad_has_ipopt@
    386391cppad_has_mkstemp = @cppad_has_mkstemp@
    387392cppad_has_nullptr = @cppad_has_nullptr@
    388393cppad_has_rvalue = @cppad_has_rvalue@
     394cppad_has_sacado = @cppad_has_sacado@
    389395cppad_has_steady_clock = @cppad_has_steady_clock@
    390396cppad_has_tmpnam_s = @cppad_has_tmpnam_s@
     
    448454@CppAD_ADOLC_TRUE@ADOLC_LIB = -ladolc -lColPack -L$(ADOLC_DIR)/lib -L$(ADOLC_DIR)/lib64
    449455@CppAD_ADOLC_FALSE@ADOLC_FLAGS =
    450 @CppAD_ADOLC_TRUE@ADOLC_FLAGS = -DCPPAD_ADOLC_TEST -I$(ADOLC_DIR)/include
     456@CppAD_ADOLC_TRUE@ADOLC_FLAGS = -I$(ADOLC_DIR)/include
    451457@CppAD_IPOPT_FALSE@IPOPT_SRC_FILES =
    452458# -------------------------------------------------------------------------
     
    459465
    460466@CppAD_IPOPT_FALSE@IPOPT_FLAGS =
    461 @CppAD_IPOPT_TRUE@IPOPT_FLAGS = -DCPPAD_IPOPT_TEST -I$(IPOPT_DIR)/include
     467@CppAD_IPOPT_TRUE@IPOPT_FLAGS = -I$(IPOPT_DIR)/include
    462468@CppAD_EIGEN_DIR_FALSE@EIGEN_EXTRA_FILES = cppad_eigen.cpp eigen_mat_inv.cpp
    463469# -------------------------------------------------------------------------
     
    471477@CppAD_EIGEN_DIR_TRUE@  -g \
    472478@CppAD_EIGEN_DIR_TRUE@  $(CXX_FLAGS_EIGEN) \
    473 @CppAD_EIGEN_DIR_TRUE@  -DCPPAD_EIGEN_TEST \
    474479@CppAD_EIGEN_DIR_TRUE@   -I$(EIGEN_DIR)/include
    475480
  • trunk/test_more/mul_level.cpp

    r3871 r3922  
    1111
    1212
    13 # ifdef CPPAD_ADOLC_TEST
     13// CPPAD_HAS_* defines
     14# include <cppad/configure.hpp>
     15
     16# if CPPAD_HAS_ADOLC
    1417# include <adolc/adouble.h>
    1518# include <adolc/taping.h>
     
    154157}
    155158
    156 # ifdef CPPAD_ADOLC_TEST
     159# if CPPAD_HAS_ADOLC
    157160
    158161bool adolc(void)
     
    222225}
    223226
    224 # endif // CPPAD_ADOLC_TEST
     227# endif // CPPAD_HAS_ADOLC
    225228
    226229bool std_math(void)
     
    264267}
    265268
    266 // supress this test until ../bug/abs.sh is fixed
    267 # ifdef CPPAD_NOT_DEFINED
    268269bool fabs(void)
    269270{       bool ok = true;
     
    314315        return ok;
    315316}
    316 # endif
    317317
    318318} // END empty namespace
     
    322322        ok     &= One();
    323323        ok     &= Two();
    324 # ifdef CPPAD_ADOLC_TEST
     324# if CPPAD_HAS_ADOLC
    325325        ok     &= adolc();
    326326# endif
    327327        ok     &= std_math();
    328 # ifdef CPPAD_NOT_DEFINED
    329328        ok     &= fabs();
    330 # endif
    331 
    332         return ok;
    333 }
     329
     330        return ok;
     331}
  • trunk/test_more/test_more.cpp

    r3904 r3922  
    99Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
    1010-------------------------------------------------------------------------- */
     11
     12// CPPAD_HAS_* defines
     13# include <cppad/configure.hpp>
    1114
    1215// system include files used for I/O
     
    255258        ok &= Run( VecUnary,        "VecUnary"       );
    256259        ok &= Run( zdouble,         "zdouble"        );
    257 # ifdef CPPAD_ADOLC_TEST
     260#if CPPAD_HAS_ADOLC
    258261        ok &= Run( base_adolc,      "base_adolc"     );
    259262# endif
    260 # ifdef CPPAD_IPOPT_TEST
     263#if CPPAD_HAS_IPOPT
    261264        ok &= Run( ipopt_solve,     "ipopt_solve"    );
    262265# endif
     
    264267        ok &= Run( alloc_openmp,    "alloc_openmp"   );
    265268# endif
    266 # ifdef CPPAD_EIGEN_TEST
     269# if CPPAD_HAS_EIGEN
    267270        ok &= Run( cppad_eigen,     "cppad_eigen"    );
    268271        ok &= Run( eigen_mat_inv,   "eigen_mat_inv"  );
  • trunk/test_more/to_string.cpp

    r3768 r3922  
    1 // $Id$
    21/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
     2CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell
    43
    54CppAD is distributed under multiple licenses. This distribution is under
     
    3635                //
    3736                Float check   = std::atof( real.c_str() );
    38                 ok           &= std::fabs( check - pi ) <= 2.0 * eps;
     37                ok           &= std::fabs( check / pi - 1.0 ) <= 2.0 * eps;
    3938                //
    4039                check         = std::atof( imag.c_str() );
    41                 ok           &= std::fabs( check - e ) <= 2.0 * eps;
     40                ok           &= std::fabs( check / e - 1.0 ) <= 2.0 * eps;
    4241                //
    4342                return ok;
Note: See TracChangeset for help on using the changeset viewer.