Changeset 3710


Ignore:
Timestamp:
Aug 19, 2015 3:41:38 PM (5 years ago)
Author:
bradbell
Message:

merge to branch: trunk
from repository: https://github.com/coin-or/CppAD
start hash code: 85ef072f288db37cb6516d5688c8d11f8ec6774c
end hash code: 4fde6db8b832b520a565248126c35d079b2343e0

commit 4fde6db8b832b520a565248126c35d079b2343e0
Author: Brad Bell <bradbell@…>
Date: Wed Aug 19 12:38:42 2015 -0700

for_sparse_jac.hpp: improve doc for dependency argument.
rev_sparse_jac.hpp: improve doc for dependency argument.
whats_new_13.omh: remvove dead link.
wish_list.omh: edit wishlist for checkpoint functions.

commit 46cd7087bfc9a3419c7b2a3a4bab87a1727eb18a
Author: Brad Bell <bradbell@…>
Date: Wed Aug 19 06:16:08 2015 -0700

checkpoint.hpp: fix warning when compiling with NDEBUG defined.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/cppad/local/checkpoint.hpp

    r3709 r3710  
    301301                CPPAD_ASSERT_UNKNOWN( tx.size() % (q+1) == 0 );
    302302                CPPAD_ASSERT_UNKNOWN( ty.size() % (q+1) == 0 );
     303# ifndef NDEBUG
    303304                size_t n = tx.size() / (q+1);
     305# endif
    304306                size_t m = ty.size() / (q+1);
    305307                bool ok  = true;
  • trunk/cppad/local/for_sparse_jac.hpp

    r3709 r3710  
    3939$icode%s% = %f%.ForSparseJac(%q%, %r%)
    4040%$$
    41 $icode%s% = %f%.ForSparseJac(%q%, %r%, %transpose%)%$$
     41$icode%s% = %f%.ForSparseJac(%q%, %r%, %transpose%, %dependency%)%$$
    4242
    4343$head Purpose$$
     
    139139        %CondExp%Rel%(%left%, %right%, %if_true%, %if_false%)
    140140%$$
    141 This is used by the
    142 $cref/optimizer/optimize/$$ with $cref checkpoint$$ functions
    143 to obtain the correct dependency relations.
     141This is useful for determining the dependency relations
     142between the independent and dependent variables. It is used with this purpose
     143by the $cref/optimizer/optimize/$$ when dealing with
     144$cref checkpoint$$ and user defined $cref/atomic/atomic_base/$$ functions.
    144145The default value $icode%dependency% = false%$$ is used when
    145146$icode dependency$$ is not present.
    146 
    147147
    148148$head r$$
  • trunk/cppad/local/rev_sparse_jac.hpp

    r3708 r3710  
    4141$icode%s% = %f%.RevSparseJac(%q%, %r%)
    4242%$$
    43 $icode%s% = %f%.RevSparseJac(%q%, %r%, %transpose%)%$$
     43$icode%s% = %f%.RevSparseJac(%q%, %r%, %transpose%, %dependency%)%$$
    4444
    4545$head Purpose$$
     
    9595        %CondExp%Rel%(%left%, %right%, %if_true%, %if_false%)
    9696%$$
    97 This is used by the
    98 $cref/optimizer/optimize/$$ with $cref checkpoint$$ functions
    99 to obtain the correct dependency relations.
     97This is useful for determining the dependency relations
     98between the independent and dependent variables. It is used with this purpose
     99by the $cref/optimizer/optimize/$$ when dealing with
     100$cref checkpoint$$ and user defined $cref/atomic/atomic_base/$$ functions.
    100101The default value $icode%dependency% = false%$$ is used when
    101102$icode dependency$$ is not present.
  • trunk/omh/whats_new/whats_new_13.omh

    r3708 r3710  
    166166$cref/dependency/RevSparseJac/dependency/$$ argument to the
    167167reverse Jacobian sparsity pattern calculation.
    168 For further details; see sparsity heading under conditional expressions in the
    169 $cref/whish list/WishList/Conditional Expressions/Sparsity/$$.
    170168$lnext
    171169Fix the deprecated autotools install (see $cref auto_tools$$)
  • trunk/omh/wish_list.omh

    r3708 r3710  
    3939        instantiate
    4040        instantiation
     41        Bool
    4142$$
    4243
     
    4445
    4546$head checkpoint$$
    46 It would be more flexible to also have a
    47 $cref/checkpoint constructor/checkpoint/constructor/$$
    48 that passed in an $cref ADFun$$ object instead of a algorithm.
    49 Perhaps the syntax would be
    50 $codei%
    51         checkpoint %afun%(%name%, %ad_fun%)
    52 %$$
    5347$list number$$
    54 An extra flag could determine if a separate copy of $icode ad_fun$$
    55 was made or if a pointer was used.
    56 Note that if a pointer is used, it becomes invalid when the destructor
    57 for $icode ad_fun$$ is called.
    58 $lnext
    59 There should be an option to hold onto sparsity patterns so they
    60 do not need to be recalculated for every use of the checkpoint function.
    61 $lnext
    6248There should be some examples and tests for both speed and memory use
    6349that demonstrate that checkpointing is useful.
    6450$lnext
    65 See the $cref/sparsity/WishList/Conditional Expressions/Sparsity/$$
    66 wish list item under conditional expressions.
     51There should be an option to use a
     52$cref/vectorBool/CppAD_vector/vectorBool/$$ interface
     53for the atomic sparsity calculations.
    6754$lend
    6855
     
    134121The optimizer could be improved to skip two more expressions
    135122(depending on the result of $code left_z == right_z$$).
    136 
    137 $subhead Sparsity$$
    138 The $cref/optimizer/optimize/$$ uses
    139 $cref/atomic reverse jacobian sparsity/atomic_rev_sparse_jac/$$
    140 to determine which arguments affect the value of the results
    141 for the atomic functions (which include $cref checkpoint$$ functions).
    142 While the partials of
    143 $codei%
    144         %z% = CondExp%Rel%( %left%, %right%, %if_true%, %if_false% )
    145 %$$
    146 with respect to $icode left$$ and $icode right$$ always evaluates to zero,
    147 the value of $icode z$$ does depend on the value of $icode left$$ and
    148 $icode right$$.
    149 The $cref checkpoint$$ functions use the value true for
    150 $cref/dependency/RevSparseJac/dependency/$$ when computing
    151 reverse jacobian sparsity patterns.
    152 This enables the optimizer to properly track the dependencies.
    153 An $cref atomic_option$$ should be added so this is only
    154 done when the optimizer is using the sparsity pattern for this purpose.
    155123
    156124$head Forward Mode Recomputation$$
Note: See TracChangeset for help on using the changeset viewer.