Changeset 2894


Ignore:
Timestamp:
Sep 7, 2013 11:13:12 PM (7 years ago)
Author:
bradbell
Message:
  1. Fix bug in cumulative sum operator (for forward orders greater than zero).
  2. Optimize the ADFun fuction used by checkpoint.

checkpoint.hpp: fix minor errors in comments.

Location:
trunk
Files:
4 edited

Legend:

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

    r2892 r2894  
    199199                // now optimize (we expect to use this function many times).
    200200                // This is not yet working on all tests, need to fix
    201                 // f_.optimize();
     201                f_.optimize();
    202202        }
    203203        /*!
  • trunk/cppad/local/csum_op.hpp

    r2859 r2894  
    116116        Base* z = taylor + i_z    * nc_taylor;
    117117        for(k = q; k <= p; k++)
    118                 z[q] = zero;
     118                z[k] = zero;
    119119        if( q == 0 )
    120120                z[q] = parameter[ arg[2] ];
  • trunk/cppad/local/op_code.hpp

    r2891 r2894  
    489489                ind[1] = number of subtraction variables in summation
    490490                ind[2] = index of parameter that initializes summation
    491                 ind[3], ... , ind[2+ind[0]] = index for positive variables
    492                 ind[3+ind[0]], ..., ind[2+ind[0]+ind[1]] = negative variables
    493                 ind[3+ind[0]+ind[1]] = ind[0] + ind[1]
     491                ind[3], ... , ind[2+ind[0]-1] = index for positive variables
     492                ind[3+ind[0]], ..., ind[2+ind[0]+ind[1]-1] = negative variables
     493                ind[3+ind[0]+ind[1]] == ind[0] + ind[1]
    494494                */
    495495                CPPAD_ASSERT_UNKNOWN( ind[3+ind[0]+ind[1]] == ind[0]+ind[1] );
  • trunk/omh/whats_new/whats_new_13.omh

    r2892 r2894  
    5050assist you in learning about changes between various versions of CppAD.
    5151
     52$head 09-07$$
     53There was a bug in the cumulative sum operator
     54(which is used by $cref optimize$$ )
     55for $cref Forward$$ orders greater than zero.
     56This was detected by the $cref checkpoint$$ tests
     57when $code optimize$$ was used to make the
     58checkpoint functions faster.
     59The bug has been fixed and the checkpoint functions now use
     60optimize (and hence should be faster).
     61
    5262$head 08-12$$
    5363$list number$$
Note: See TracChangeset for help on using the changeset viewer.