Changeset 3733 for trunk/test_more


Ignore:
Timestamp:
Sep 24, 2015 11:07:15 PM (4 years ago)
Author:
bradbell
Message:

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 37afaa0d224e420a8cd052c18ceadf1c684ffd34
end hash code: 168c5fb40a332151168cbc8e928e28910d43665f

commit 168c5fb40a332151168cbc8e928e28910d43665f
Author: Brad Bell <bradbell@…>
Date: Thu Sep 24 20:02:25 2015 -0700

Transfer changes automatically generated by auto-tools.

commit b002c4cab3e02a2492c1eb41a47f8462f3b9442c
Author: Brad Bell <bradbell@…>
Date: Thu Sep 24 16:20:13 2015 -0700

Remove invisible white space.

commit d25c00bc6485d72e9ac50857e758e7c72196d317
Author: Brad Bell <bradbell@…>
Date: Thu Sep 24 16:19:55 2015 -0700

  1. Move omp_alloc.cpp from example to test_more (because it is deprecated).
  2. Fix warnings about cap_bytes possibly used before set.


near_equal.hpp: fix warning about divide by zero.
det_grad_33.hpp: use numeric limits epsilon.
thread_alloc.cpp: declare temporary indices in for statement.
limits.cpp: remove begin, no longer included in documentation.
romberg_one.cpp: remove begin, no longer included in documentation.
optimize.hpp: fix divide by zero warning (need to deprecate nan.hpp)
link_sparse_hessian.cpp: fix warning about unreachable code.

Location:
trunk/test_more
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/CMakeLists.txt

    r3689 r3733  
    1717SET(CMAKE_BUILD_TYPE DEBUG)
    1818
    19 # This directory does not contain any multi-threading tests, so
    20 # test using CPPAD_MAX_NUM_THREADS equal to one (its smallest value)
    21 ADD_DEFINITIONS("-DCPPAD_MAX_NUM_THREADS=1")
     19# This directory now contains omp_alloc.cpp which uses multi-threading, so
     20# so no longer can set CPPAD_MAX_NUM_THREADS equal to one (its smallest value)
     21# ADD_DEFINITIONS("-DCPPAD_MAX_NUM_THREADS=1")
    2222
    2323# adolc_prefix
     
    118118        neg.cpp
    119119        ode_err_control.cpp
     120        omp_alloc.cpp
    120121        optimize.cpp
    121122        parameter.cpp
  • trunk/test_more/limits.cpp

    r2884 r3733  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
    6 the terms of the 
     6the terms of the
    77                    Eclipse Public License Version 1.0.
    88
     
    1212
    1313/*
    14 $begin limits.cpp$$
     14old limits.cpp example / test
    1515$spell
    1616$$
     
    2424This code assumes that the decimal point is infront of the mantissa.
    2525Hence dividing the minimum normalized value looses precision,
    26 while multiplying the maximum normalized value results in infinity. 
     26while multiplying the maximum normalized value results in infinity.
    2727
    2828$head Externals$$
     
    6969                value tmp( Type(0) );
    7070                //
    71                 tmp.set( add_one( eps.get() / two.get() ) ); 
     71                tmp.set( add_one( eps.get() / two.get() ) );
    7272                ok        &= one.get() == tmp.get();
    7373                //
    74                 tmp.set( add_one( eps.get() ) ); 
     74                tmp.set( add_one( eps.get() ) );
    7575                ok        &= one.get() != tmp.get();
    7676                return ok;
     
    137137        ok &= check_epsilon< std::complex<double> >();
    138138
    139         // epsilon for some AD types. 
     139        // epsilon for some AD types.
    140140        ok &= check_epsilon< AD<float> >();
    141141        ok &= check_epsilon< AD<double> >();
     
    150150        ok &= check_min< std::complex<double> >();
    151151
    152         // min for some AD types. 
     152        // min for some AD types.
    153153        ok &= check_min< AD<float> >();
    154154        ok &= check_min< AD<double> >();
     
    163163        ok &= check_max< std::complex<double> >();
    164164
    165         // max for some AD types. 
     165        // max for some AD types.
    166166        ok &= check_max< AD<float> >();
    167167        ok &= check_max< AD<double> >();
  • trunk/test_more/makefile.am

    r3689 r3733  
    144144        neg.cpp \
    145145        ode_err_control.cpp \
     146        omp_alloc.cpp \
    146147        optimize.cpp \
    147148        parameter.cpp \
  • trunk/test_more/makefile.in

    r3705 r3733  
    124124        limits.cpp log.cpp log1p.cpp log10.cpp mul.cpp mul_cskip.cpp \
    125125        mul_eq.cpp mul_level.cpp mul_zdouble.cpp mul_zero_one.cpp \
    126         near_equal_ext.cpp neg.cpp ode_err_control.cpp optimize.cpp \
    127         parameter.cpp poly.cpp pow.cpp pow_int.cpp print_for.cpp \
    128         romberg_one.cpp rosen_34.cpp runge_45.cpp reverse.cpp \
    129         rev_sparse_hes.cpp rev_sparse_jac.cpp rev_two.cpp \
     126        near_equal_ext.cpp neg.cpp ode_err_control.cpp omp_alloc.cpp \
     127        optimize.cpp parameter.cpp poly.cpp pow.cpp pow_int.cpp \
     128        print_for.cpp romberg_one.cpp rosen_34.cpp runge_45.cpp \
     129        reverse.cpp rev_sparse_hes.cpp rev_sparse_jac.cpp rev_two.cpp \
    130130        simple_vector.cpp sin.cpp sin_cos.cpp sinh.cpp \
    131131        sparse_hessian.cpp sparse_jacobian.cpp sparse_vec_ad.cpp \
     
    156156        mul_level.$(OBJEXT) mul_zdouble.$(OBJEXT) \
    157157        mul_zero_one.$(OBJEXT) near_equal_ext.$(OBJEXT) neg.$(OBJEXT) \
    158         ode_err_control.$(OBJEXT) optimize.$(OBJEXT) \
    159         parameter.$(OBJEXT) poly.$(OBJEXT) pow.$(OBJEXT) \
    160         pow_int.$(OBJEXT) print_for.$(OBJEXT) romberg_one.$(OBJEXT) \
    161         rosen_34.$(OBJEXT) runge_45.$(OBJEXT) reverse.$(OBJEXT) \
    162         rev_sparse_hes.$(OBJEXT) rev_sparse_jac.$(OBJEXT) \
    163         rev_two.$(OBJEXT) simple_vector.$(OBJEXT) sin.$(OBJEXT) \
    164         sin_cos.$(OBJEXT) sinh.$(OBJEXT) sparse_hessian.$(OBJEXT) \
     158        ode_err_control.$(OBJEXT) omp_alloc.$(OBJEXT) \
     159        optimize.$(OBJEXT) parameter.$(OBJEXT) poly.$(OBJEXT) \
     160        pow.$(OBJEXT) pow_int.$(OBJEXT) print_for.$(OBJEXT) \
     161        romberg_one.$(OBJEXT) rosen_34.$(OBJEXT) runge_45.$(OBJEXT) \
     162        reverse.$(OBJEXT) rev_sparse_hes.$(OBJEXT) \
     163        rev_sparse_jac.$(OBJEXT) rev_two.$(OBJEXT) \
     164        simple_vector.$(OBJEXT) sin.$(OBJEXT) sin_cos.$(OBJEXT) \
     165        sinh.$(OBJEXT) sparse_hessian.$(OBJEXT) \
    165166        sparse_jacobian.$(OBJEXT) sparse_vec_ad.$(OBJEXT) \
    166167        sqrt.$(OBJEXT) std_math.$(OBJEXT) sub.$(OBJEXT) \
     
    545546        neg.cpp \
    546547        ode_err_control.cpp \
     548        omp_alloc.cpp \
    547549        optimize.cpp \
    548550        parameter.cpp \
     
    692694@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/neg.Po@am__quote@
    693695@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ode_err_control.Po@am__quote@
     696@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/omp_alloc.Po@am__quote@
    694697@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optimize.Po@am__quote@
    695698@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parameter.Po@am__quote@
  • trunk/test_more/romberg_one.cpp

    r3060 r3733  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
    6 the terms of the 
     6the terms of the
    77                    Eclipse Public License Version 1.0.
    88
     
    1212
    1313/*
    14 $begin romberg_one.cpp$$
     14old romberg_one.cpp example / test
    1515$spell
    1616        Romberg
     
    3939        public:
    4040                // constructor
    41                 Fun(size_t degree_) : degree(degree_) 
     41                Fun(size_t degree_) : degree(degree_)
    4242                { }
    4343
     
    6969                size_t p;
    7070
    71                 // int_a^b F(x) dx = 
    72                 //      [ b^(degree+1) - a^(degree+1) ] / (degree+1) 
     71                // int_a^b F(x) dx =
     72                //      [ b^(degree+1) - a^(degree+1) ] / (degree+1)
    7373                Float bpow(1);
    7474                Float apow(1);
     
    7676                {       bpow *= b;
    7777                        apow *= a;
    78                 } 
     78                }
    7979                Float check = (bpow - apow) / Float(degree+1);
    8080
     
    9292
    9393                        ok  &= e < (degree+1) * spow;
    94                         ok  &= CppAD::NearEqual(check, r, Float(0.), e);       
     94                        ok  &= CppAD::NearEqual(check, r, Float(0.), e);
    9595                }
    9696
  • trunk/test_more/test_more.cpp

    r3724 r3733  
    7575extern bool Neg(void);
    7676extern bool ode_err_control(void);
     77extern bool omp_alloc(void);
    7778extern bool optimize(void);
    7879extern bool parameter(void);
     
    192193        ok &= Run( Neg,             "Neg"            );
    193194        ok &= Run( ode_err_control, "ode_err_control");
     195        ok &= Run( omp_alloc,       "omp_alloc"      );
    194196        ok &= Run( optimize,        "optimize"       );
    195197        ok &= Run( parameter,       "parameter"      );
  • trunk/test_more/test_one.sh.in

    r3683 r3733  
    5050        $cxxflags
    5151        -g
     52        -fopenmp
    5253        -DCPPAD_ADOLC_TEST
    5354        -DCPPAD_OPENMP_TEST
    54         -DCPPAD_MAX_NUM_THREADS=1
    55         @OPENMP_FLAGS@
    5655        -I..
    5756"
Note: See TracChangeset for help on using the changeset viewer.