Changeset 3319


Ignore:
Timestamp:
Sep 11, 2014 6:50:01 AM (6 years ago)
Author:
bradbell
Message:
  1. Make no changes when no optimization is done.
  2. Add next step to beginning of plan.
  3. Compute cache indice and map operations during optimization.

plan.txt: Make no changes when no optimization is done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/cache/plan.txt

    r3318 r3319  
    11Plan for implementing caching
     2
     30. Next Step:
     4        if NDEBUG is not defined:
     5                for k = 0 , ... , NumArg(op)
     6                        ArgIsVarTable[op][k]: true if k-th argument is a variable
     7        move the check that result has higher index than operands from
     8        operations into a general assert macro for all operations:
     9                CPPAD_ASSERT_VARIABLE_ORDER(op)
    210
    3111. In cppad/local/ad_fun.hpp add following to ADFun private data.
     
    97105
    981069. Changes to data sructure:
    99         ADFun::num_var_tape_:             no longer also the size of ADFun::taylor_
    100         ADFun::num_cache_tape_:           number of chace entires in taylor_:
    101         ADFun::cache_[num_var_tape_]:     is the cache index for each variable
     107        ADFun::num_var_tape_:         no longer also the size of ADFun::taylor_
     108        ADFun::num_cache_tape_:       number of chace entires in taylor_:
     109        ADFun::cache_[num_var_tape_]: is the cache index for each variable
    102110
    103 10. ifndef NDEBUG:
    104         During forward and reverse tracing, the variable
     111
     11210. Forward and Reverse:
     113        10.1: If num_chace_tape_ is zero, cache will not be used.
     114        otherwise, the special cache operatios will be done.
     115
     116        10.2: if NDEBUG is not defined, the varialbe
    105117        cache2variable[ADFun::num_cache_tape_] will map the cache index
    106         to the corresonding current variable index.
    107         Also this will be used to check that the variables have the proper
    108         order for each operation; i.e., the operations have lower variable
    109         index than the results.
     118        to the corresonding current variable index. This will be used for tracing
     119        and to check that the variables have the proper order for each operation;
     120        i.e., the operations have lower variable index than the results.
    110121
    11112211. Operations:
     
    113124        individual operation into forward and reverse sweeps.
    114125
     12612. Optmization:
     127        compute the last_use and cache indices and change the
     128        arguments to use cache indices instead of variable indices.
Note: See TracChangeset for help on using the changeset viewer.