Ignore:
Timestamp:
Sep 20, 2014 5:45:43 AM (6 years ago)
Author:
bradbell
Message:

Implement and test first order forward mode.

cache.sh: Erase taylor coefficient when create cache.
forward1sweep.hpp: copy more information from forward0sweep.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cache/cppad/local/forward0sweep.hpp

    r3342 r3344  
    153153{       CPPAD_ASSERT_UNKNOWN( J >= 1 );
    154154        CPPAD_ASSERT_UNKNOWN( play->num_var_rec() == num_var );
    155         size_t num_cache = play->num_cache_rec();
    156 
    157         // initialize cache indices with invalid variable value
    158         CppAD::vector<addr_t> cache2var( num_cache );
    159         for(size_t i = 0; i < num_cache; i++)
    160                 cache2var[i] = addr_t(0);
    161155
    162156        // use p, q, r so other forward sweeps can use code defined here
     
    240234        if( num_text > 0 )
    241235                text = play->GetTxt(0);
     236
     237        // data structure for cache information
     238        size_t num_cache = play->num_cache_rec();
     239        CppAD::vector<addr_t> cache2var( num_cache );
     240
     241        // initialize cache indices with invalid variable value
     242        for(size_t i = 0; i < num_cache; i++)
     243                cache2var[i] = addr_t(0);
    242244        /*
    243245        <!-- end forward0sweep_code_define -->
Note: See TracChangeset for help on using the changeset viewer.