Changeset 3735 for trunk/test_more


Ignore:
Timestamp:
Oct 1, 2015 9:43:46 AM (4 years ago)
Author:
bradbell
Message:

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

commit 69b683827ee48d567284f38e6789503d74f2b2cd
Author: Brad Bell <bradbell@…>
Date: Wed Sep 30 19:35:39 2015 -0700

Fix NUMERIC_LIMIT_VAL.

commit 7ddf32b6651a3a9e2b55d4ff1819823222fc6b21
Author: Brad Bell <bradbell@…>
Date: Tue Sep 29 06:19:05 2015 -0700

numeric_limit.sh: implementation and test of numeric_limit specialization.

commit de19d19d2b5588032491f35bd05baaad89db4211
Author: Brad Bell <bradbell@…>
Date: Mon Sep 28 08:35:20 2015 -0700

sqrt_op.hpp: remove last abort on domain error.
whats_new_15.omh: more updates.
wish_list.omh: more updates.

commit 91628f1ba37c1700b5abfa159cf8f3f8bc28040f
Author: Brad Bell <bradbell@…>
Date: Mon Sep 28 07:39:34 2015 -0700

checkpoint.hpp: change default sparsity pattern to pack.
optimize.cpp: add test of pack sparsity patterns.

commit a4b711d12e82bbca6765093ed642ca9b82cd4e2e
Author: Brad Bell <bradbell@…>
Date: Mon Sep 28 06:38:05 2015 -0700

Documentation of change to optimize in previous commit.sh.

commit 3f0f994e73d68483c14b761f6744ba1e78435dbd
Author: Brad Bell <bradbell@…>
Date: Mon Sep 28 05:54:01 2015 -0700

Use pack, bool, or set depending on users atomic function option.

commit fc7f85ac010c483297beea04c8f388e41a220d43
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 15:53:10 2015 -0700

Document replacement of zdouble by azmul (now complete).

commit 48a4f8be30fc737add6ca86e0d575d47c44e4069
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 15:17:24 2015 -0700

Test multi-level reverse conditionals for atanh and azmul, fix atanh.
mul_cond_rev.cpp: test C++11 functions when compiling for C++98.

commit 7b17a9a470114d3e2b3fc78f2809147ae4b57a95
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 14:35:58 2015 -0700

Test and fix multi-level reverse conditionals with sqrt, tan. In addition,
allow for derivative of sqrt(0) because it may be ignored by a conditional.

commit f744786ef54be2f190efa9b53b661fde0db22264
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 14:04:52 2015 -0700

Test and fix multi-level reverse conditionals for sin and sinh.

commit 3b6712fd7e18529e4c5179b368198b353eb5ebb1
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 13:45:13 2015 -0700

Test and fix mult-level conditional reverse for log1p and mutiplication.

commit ce2fc1914c3b139d788fe923db14fbd07e27743f
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 11:11:10 2015 -0700

Test and fix multi-level condional reverse for expm1, exp, log.

commit a7996f99649f5d99d421ad5d42a904f7fdd685d8
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 08:46:30 2015 -0700

Test and fix multi-level conditional reverse for cos, cosh, and erf.

commit 9a380f4325247b22d6ca5adc3911efb86b36d64a
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 07:26:02 2015 -0700

Test and fix atanh mult-level conditional reverse.

commit 8c31b2b7fa30c8c459cd359611e41894c81a3ef7
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 06:46:53 2015 -0700

Test and fix asinh and atan operators with reverse multiple level conditionals.

commit 530cb4716a5fa7661956e471ecbe04c065bfdf22
Author: Brad Bell <bradbell@…>
Date: Sun Sep 27 05:57:52 2015 -0700

Fix asin_op for reverse with multi-level conditionals.
mul_cond_rev.cpp: check asinh (no need to do anything).

commit daf22b7ec9d726870af9dd98a51a075142d16cc1
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 15:36:57 2015 -0700

Test and fix acos with multi-level reverse mode conditionals.

commit 7d4ef23cc530168b4f8e953fcabe603e1f71dc2d
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 15:13:25 2015 -0700

Test and fix multi-level reverse mode with conditionals.

commit 2e232c21fa7221ba55e33e518e2dbd04a6793d03
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 14:05:12 2015 -0700

Move mul_cond to mul_cond_rev and include it in automated tests.

commit 5101952dde64bf0fbf8154b6baca2ef12dd70027
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 14:00:38 2015 -0700

  1. Extend Zmul operators to optimize and hash_code.


div_op.hpp: use azmul to fix multiple level conditional reverse.
mul_cond.cpp: test abs and add.
optimize.hpp: must handle azmul operators.

commit abff718daea05af6c66621dba4a7c8e6e335afdd
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 09:39:45 2015 -0700

Implement sparsity calculations for azmul operations.

commit 69ae407a034eb4cc5491708620f221df41f25cb3
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 08:46:58 2015 -0700

Complete and test multiple direction forward mode azmul operations.

commit c5e8b2e43559fc4b466d5bb270ff7441099d716e
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 08:13:42 2015 -0700

Complete and test reverse mode azmul operations.

commit bb483fb3c61d99c71f6548b80c2abbd71aa1e43f
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 07:21:27 2015 -0700

Test and fix first order forward mode for azmul.

commit 38fad03be59ba9b62ea6ad629cf5051ead8636d6
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 06:39:54 2015 -0700

Add multi-level testing of azmul.

commit 589cc54f64beba310e9f22b34e28cad09a681496
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 05:52:25 2015 -0700

Remove invisible white space.

commit 5793d9e70b91144a12690e9d7d03595610bfed6f
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 05:51:50 2015 -0700

Test and fix zero order forward mode azmul operations.


forward0sweep.hpp: alphabetize multiplication operators.
op_code.hpp: fix bug in tracing (introduced yesterday).
pow.cpp: improve variable names in example, use machine epsilon.

commit 031a05b1b00ff17478a86d1cc9b45223582f981d
Author: Brad Bell <bradbell@…>
Date: Sat Sep 26 04:05:34 2015 -0700

Add the operators for azmul.

commit e28ffe0e01219f1641460119ef7ca2d5b175f114
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 20:28:29 2015 -0700

zdouble.hpp: add azmul to this base type.

commit d92554e85b87f31354fd3fc09158d763f9c56742
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 19:34:22 2015 -0700

Define azmul for each of the base type.

commit 4f9e4e63919c6e134534aa4749544f78f21d5d02
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 10:13:29 2015 -0700

Document base requirement for support of azmul.


standard_math.hpp: include user API to azmul for AD types..

commit 250dd6251376986c20713f1e1fe1fcd2c642a723
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 08:35:11 2015 -0700

Remove invisible white space.

commit aa5e7988ccadb2fdff3b693110422efc903d8e8a
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 08:34:44 2015 -0700

ad_valued.hpp: include azmul.hpp.
azmul.hpp: design for azmul (not yet implemented).
op_code.hpp: include variable * parameter operator.
pow.hpp: minor correction to a comment.
standard_math.hpp: separate Purpose from Possible Types.
wish_list.omh: Mention deprecating nan.

commit 5674349e7b97b511f2d2c430761cb14b8d4c1a17
Author: Brad Bell <bradbell@…>
Date: Fri Sep 25 05:46:48 2015 -0700

Add Zmulpv and Zmulvv operators.


check_op_code.sh: adapt to comment added after NumberOp?.

Location:
trunk/test_more
Files:
2 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/test_more/CMakeLists.txt

    r3733 r3735  
    7878        atanh.cpp
    7979        atan2.cpp
     80        azmul.cpp
    8081        base_alloc.cpp
    8182        check_simple_vector.cpp
     
    113114        mul_eq.cpp
    114115        mul_level.cpp
     116        mul_cond_rev.cpp
    115117        mul_zdouble.cpp
    116118        mul_zero_one.cpp
  • trunk/test_more/makefile.am

    r3733 r3735  
    103103        atanh.cpp \
    104104        atan2.cpp \
     105        azmul.cpp \
    105106        base_alloc.cpp \
    106107        check_simple_vector.cpp \
     
    139140        mul_eq.cpp \
    140141        mul_level.cpp \
     142        mul_cond_rev.cpp \
    141143        mul_zdouble.cpp \
    142144        mul_zero_one.cpp \
  • trunk/test_more/makefile.in

    r3733 r3735  
    114114        alloc_openmp.cpp test_more.cpp abs.cpp acos.cpp acosh.cpp \
    115115        adfun_copy.cpp asin.cpp asinh.cpp assign.cpp add.cpp \
    116         add_eq.cpp add_zero.cpp atan.cpp atanh.cpp atan2.cpp \
     116        add_eq.cpp add_zero.cpp atan.cpp atanh.cpp atan2.cpp azmul.cpp \
    117117        base_alloc.cpp check_simple_vector.cpp checkpoint.cpp \
    118118        compare.cpp compare_change.cpp cond_exp.cpp cond_exp_ad.cpp \
     
    123123        forward_order.cpp from_base.cpp fun_check.cpp jacobian.cpp \
    124124        limits.cpp log.cpp log1p.cpp log10.cpp mul.cpp mul_cskip.cpp \
    125         mul_eq.cpp mul_level.cpp mul_zdouble.cpp mul_zero_one.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 \
    130         simple_vector.cpp sin.cpp sin_cos.cpp sinh.cpp \
    131         sparse_hessian.cpp sparse_jacobian.cpp sparse_vec_ad.cpp \
    132         sqrt.cpp std_math.cpp sub.cpp sub_eq.cpp sub_zero.cpp tan.cpp \
    133         test_vector.cpp track_new_del.cpp value.cpp vec_ad.cpp \
    134         vec_ad_par.cpp vec_unary.cpp
     125        mul_eq.cpp mul_level.cpp mul_cond_rev.cpp mul_zdouble.cpp \
     126        mul_zero_one.cpp near_equal_ext.cpp neg.cpp \
     127        ode_err_control.cpp omp_alloc.cpp optimize.cpp parameter.cpp \
     128        poly.cpp pow.cpp pow_int.cpp print_for.cpp romberg_one.cpp \
     129        rosen_34.cpp runge_45.cpp reverse.cpp rev_sparse_hes.cpp \
     130        rev_sparse_jac.cpp rev_two.cpp simple_vector.cpp sin.cpp \
     131        sin_cos.cpp sinh.cpp sparse_hessian.cpp sparse_jacobian.cpp \
     132        sparse_vec_ad.cpp sqrt.cpp std_math.cpp sub.cpp sub_eq.cpp \
     133        sub_zero.cpp tan.cpp test_vector.cpp track_new_del.cpp \
     134        value.cpp vec_ad.cpp vec_ad_par.cpp vec_unary.cpp
    135135@CppAD_ADOLC_TRUE@am__objects_1 = base_adolc.$(OBJEXT)
    136136@CppAD_IPOPT_TRUE@am__objects_2 = ipopt_solve.$(OBJEXT)
     
    141141        asin.$(OBJEXT) asinh.$(OBJEXT) assign.$(OBJEXT) add.$(OBJEXT) \
    142142        add_eq.$(OBJEXT) add_zero.$(OBJEXT) atan.$(OBJEXT) \
    143         atanh.$(OBJEXT) atan2.$(OBJEXT) base_alloc.$(OBJEXT) \
    144         check_simple_vector.$(OBJEXT) checkpoint.$(OBJEXT) \
    145         compare.$(OBJEXT) compare_change.$(OBJEXT) cond_exp.$(OBJEXT) \
     143        atanh.$(OBJEXT) atan2.$(OBJEXT) azmul.$(OBJEXT) \
     144        base_alloc.$(OBJEXT) check_simple_vector.$(OBJEXT) \
     145        checkpoint.$(OBJEXT) compare.$(OBJEXT) \
     146        compare_change.$(OBJEXT) cond_exp.$(OBJEXT) \
    146147        cond_exp_ad.$(OBJEXT) cond_exp_rev.$(OBJEXT) copy.$(OBJEXT) \
    147148        cos.$(OBJEXT) cosh.$(OBJEXT) dbl_epsilon.$(OBJEXT) \
     
    154155        limits.$(OBJEXT) log.$(OBJEXT) log1p.$(OBJEXT) log10.$(OBJEXT) \
    155156        mul.$(OBJEXT) mul_cskip.$(OBJEXT) mul_eq.$(OBJEXT) \
    156         mul_level.$(OBJEXT) mul_zdouble.$(OBJEXT) \
    157         mul_zero_one.$(OBJEXT) near_equal_ext.$(OBJEXT) neg.$(OBJEXT) \
     157        mul_level.$(OBJEXT) mul_cond_rev.$(OBJEXT) \
     158        mul_zdouble.$(OBJEXT) mul_zero_one.$(OBJEXT) \
     159        near_equal_ext.$(OBJEXT) neg.$(OBJEXT) \
    158160        ode_err_control.$(OBJEXT) omp_alloc.$(OBJEXT) \
    159161        optimize.$(OBJEXT) parameter.$(OBJEXT) poly.$(OBJEXT) \
     
    505507        atanh.cpp \
    506508        atan2.cpp \
     509        azmul.cpp \
    507510        base_alloc.cpp \
    508511        check_simple_vector.cpp \
     
    541544        mul_eq.cpp \
    542545        mul_level.cpp \
     546        mul_cond_rev.cpp \
    543547        mul_zdouble.cpp \
    544548        mul_zero_one.cpp \
     
    651655@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atan2.Po@am__quote@
    652656@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atanh.Po@am__quote@
     657@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/azmul.Po@am__quote@
    653658@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_adolc.Po@am__quote@
    654659@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_alloc.Po@am__quote@
     
    686691@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log1p.Po@am__quote@
    687692@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul.Po@am__quote@
     693@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_cond_rev.Po@am__quote@
    688694@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_cskip.Po@am__quote@
    689695@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mul_eq.Po@am__quote@
  • trunk/test_more/optimize.cpp

    r3732 r3735  
    2525
    2626        // note this enum type is not part of the API (but its values are)
    27         CppAD::atomic_base<double>::option_enum atomic_sparsity_option;
     27        CppAD::atomic_base<double>::option_enum atomic_sparsity_option_;
    2828        //
    2929        // ----------------------------------------------------------------
     
    124124
    125125                // now optimize the operation sequence
    126                 j_check.option( atomic_sparsity_option );
     126                j_check.option( atomic_sparsity_option_ );
    127127                if( conditional_skip_ )
    128128                        f.optimize();
     
    192192
    193193                // before optimize
    194                 k_check.option( atomic_sparsity_option );
    195                 h_check.option( atomic_sparsity_option );
     194                k_check.option( atomic_sparsity_option_ );
     195                h_check.option( atomic_sparsity_option_ );
    196196                ok  &= f.number_skip() == 0;
    197197
     
    260260
    261261                // now optimize the operation sequence
    262                 g_check.option( atomic_sparsity_option );
     262                g_check.option( atomic_sparsity_option_ );
    263263                if( conditional_skip_ )
    264264                        f.optimize();
     
    307307
    308308                // now optimize f so that the calculation of au[1] is removed
    309                 g_check.option( atomic_sparsity_option );
     309                g_check.option( atomic_sparsity_option_ );
    310310                if( conditional_skip_ )
    311311                        f.optimize();
     
    17751775bool optimize(void)
    17761776{       bool ok = true;
    1777         atomic_sparsity_option = CppAD::atomic_base<double>::bool_sparsity_enum;
    1778         conditional_skip_      = true;
     1777        conditional_skip_       = true;
     1778        atomic_sparsity_option_ = CppAD::atomic_base<double>::bool_sparsity_enum;
    17791779
    17801780        // atomic sparsity loop
    1781         for(size_t i = 0; i < 2; i++)
    1782         {       // check conditional expression sparsity pattern
     1781        for(size_t i = 0; i < 3; i++)
     1782        {       if( i == 0 ) atomic_sparsity_option_ =
     1783                        CppAD::atomic_base<double>::pack_sparsity_enum;
     1784                else if( i == 1 ) atomic_sparsity_option_ =
     1785                        CppAD::atomic_base<double>::bool_sparsity_enum;
     1786                else if( i == 2 ) atomic_sparsity_option_ =
     1787                        CppAD::atomic_base<double>::set_sparsity_enum;
     1788                else
     1789                        ok &= false;
     1790                //
     1791                // check conditional expression sparsity pattern
    17831792                // (used to optimize calls to atomic functions).
    17841793                ok     &= atomic_cond_exp_sparsity();
     
    17881797                ok     &= atomic_no_used();
    17891798                ok     &= atomic_arguments();
    1790                 atomic_sparsity_option =
    1791                         CppAD::atomic_base<double>::set_sparsity_enum;
    17921799        }
    17931800
    17941801        // conditional skip loop
    17951802        for(size_t i = 0; i < 2; i++)
    1796         {       // check nested conditional expressions
     1803        {       conditional_skip_ = i == 0;
     1804                //
     1805                // check nested conditional expressions
    17971806                ok     &= nested_cond_exp();
    17981807                // check reverse dependency analysis optimization
     
    18321841                // check case where an expresion needed by both true and false case
    18331842                ok     &=  cond_exp_both_true_and_false();
    1834                 //
    1835                 conditional_skip_ = false;
    18361843        }
    18371844        //
  • trunk/test_more/test_more.cpp

    r3733 r3735  
    3232extern bool atanh(void);
    3333extern bool atan2(void);
     34extern bool azmul(void);
    3435extern bool base_adolc(void);
    3536extern bool base_alloc_test(void);
     
    6768extern bool Mul(void);
    6869extern bool mul_level(void);
    69 extern bool mul_cond(void);
     70extern bool mul_cond_rev(void);
    7071extern bool mul_cskip(void);
    7172extern bool MulEq(void);
     
    155156        ok &= Run( atanh,           "atanh"          );
    156157        ok &= Run( atan2,           "atan2"          );
     158        ok &= Run( azmul,           "azmul"          );
    157159        ok &= Run( check_simple_vector, "check_simple_vector" );
    158160        ok &= Run( checkpoint,      "checkpoint"     );
     
    186188        ok &= Run( Mul,             "Mul"            );
    187189        ok &= Run( mul_level,       "mul_level"      );
     190        ok &= Run( mul_cond_rev,    "mul_cond_rev"   );
    188191        ok &= Run( mul_cskip,       "Mul_cskip"      );
    189192        ok &= Run( MulEq,           "MulEq"          );
Note: See TracChangeset for help on using the changeset viewer.