Changeset 3326


Ignore:
Timestamp:
Sep 13, 2014 8:24:13 AM (6 years ago)
Author:
bradbell
Message:

Implement step 4.1 of plan, computation of last_use.

cache.sh: test of computation of last_use.
optimize.hpp: fix comment.

Location:
branches/cache
Files:
2 added
3 edited

Legend:

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

    r3301 r3326  
    5252        cppad/local/fun_check.hpp%
    5353        cppad/local/optimize.hpp%
     54        cppad/local/cache.hpp%
    5455        omh/check_for_nan.omh
    5556%$$
     
    495496        // (see doxygen documentation in optimize.hpp)
    496497        void optimize(void);
     498
     499        // Create a cache for tape values
     500        void cache(void);
    497501        // ------------------- Deprecated -----------------------------
    498502
     
    563567# include <cppad/local/omp_max_thread.hpp>
    564568# include <cppad/local/optimize.hpp>
     569# include <cppad/local/cache.hpp>
    565570
    566571# endif
  • branches/cache/cppad/local/optimize.hpp

    r3232 r3326  
    12851285        OpCode        op;   // current operator
    12861286        const addr_t* arg;  // operator arguments
    1287         size_t        i_var;  // index of first result for current operator
     1287        size_t        i_var;  // index of last result for current operator
    12881288
    12891289        // range and domain dimensions for F
  • branches/cache/plan.txt

    r3325 r3326  
    2626
    2727        4.1 Determine last_use[i_var]:
    28     Use a reverse analysis to determine last_use[i_var], the last result index
    29         that uses variable i_var is used as an operand. Sort this vector so that
     28    Use a forward analysis to determine last_use[i_var], the last result index
     29        that uses variable i_var as an operand. Sort this vector so that
    3030        last_use[i] <= last_use[j] whenever i < j.
    3131
Note: See TracChangeset for help on using the changeset viewer.