Changeset 2981


Ignore:
Timestamp:
Oct 20, 2013 10:18:10 PM (6 years ago)
Author:
bradbell
Message:

Put a phantom argument, in addition to the phantom variable, in BeginOp? operator.

Location:
branches/opt_cond_exp
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/opt_cond_exp/cppad/local/independent.hpp

    r2506 r2981  
    44
    55/* --------------------------------------------------------------------------
    6 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     6CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    77
    88CppAD is distributed under multiple licenses. This distribution is under
     
    136136        // mark the beginning of the tape and skip the first variable index
    137137        // (zero) because parameters use taddr zero
    138         CPPAD_ASSERT_NARG_NRES(BeginOp, 0, 1);
     138        CPPAD_ASSERT_NARG_NRES(BeginOp, 1, 1);
    139139        Rec_.PutOp(BeginOp);
     140        Rec_.PutArg(0);
    140141
    141142        // place each of the independent variables in the tape
  • branches/opt_cond_exp/cppad/local/op_code.hpp

    r2979 r2981  
    153153        1, // AsinOp
    154154        1, // AtanOp
    155         0, // BeginOp
     155        1, // BeginOp  offset first real argument to have index 1
    156156        6, // CExpOp
    157157        4, // ComOp
  • branches/opt_cond_exp/cppad/local/optimize.hpp

    r2980 r2981  
    18071807        // the end.  Put BeginOp at beginning of recording
    18081808        CPPAD_ASSERT_UNKNOWN( op == BeginOp );
    1809         CPPAD_ASSERT_NARG_NRES(BeginOp, 0, 1);
     1809        CPPAD_ASSERT_NARG_NRES(BeginOp, 1, 1);
    18101810        tape[i_var].new_op  = rec->num_rec_op();
    18111811        tape[i_var].new_var = rec->PutOp(BeginOp);
     1812        rec->PutArg(0);
    18121813
    18131814        // temporary buffer for new argument values
  • branches/opt_cond_exp/cppad/local/player.hpp

    r2980 r2981  
    328328
    329329                CPPAD_ASSERT_UNKNOWN( op_  == BeginOp );
    330                 CPPAD_ASSERT_NARG_NRES(op_, 0, 1);
     330                CPPAD_ASSERT_NARG_NRES(op_, 1, 1);
    331331
    332332                return;
  • branches/opt_cond_exp/cppad/local/rev_hes_sweep.hpp

    r2979 r2981  
    274274
    275275                        case BeginOp:
    276                         CPPAD_ASSERT_NARG_NRES(op, 0, 1)
     276                        CPPAD_ASSERT_NARG_NRES(op, 1, 1)
    277277                        break;
    278278                        // -------------------------------------------------
  • branches/opt_cond_exp/cppad/local/rev_jac_sweep.hpp

    r2979 r2981  
    254254
    255255                        case BeginOp:
    256                         CPPAD_ASSERT_NARG_NRES(op, 0, 1);
     256                        CPPAD_ASSERT_NARG_NRES(op, 1, 1);
    257257                        break;
    258258                        // -------------------------------------------------
  • branches/opt_cond_exp/cppad/local/reverse_sweep.hpp

    r2979 r2981  
    295295
    296296                        case BeginOp:
    297                         CPPAD_ASSERT_NARG_NRES(op, 0, 1);
     297                        CPPAD_ASSERT_NARG_NRES(op, 1, 1);
    298298                        break;
    299299                        // --------------------------------------------------
  • branches/opt_cond_exp/example/seq_property.cpp

    r2506 r2981  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    7474        size_t nop  = 1;
    7575
    76         // Use narg to track the number of operator arguments
    77         size_t narg = 0;
     76        // Start with one for operator corresponding to phantom argument
     77        size_t narg = 1;
    7878
    7979        // Use ntext to track the number of characters used to label
  • branches/opt_cond_exp/omh/seq_property.omh

    r2683 r2981  
    11$Id$
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-13 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    186186Note that one integer index is stored in the operation sequence
    187187for each argument.
     188Also note that, as of 2013-10-20, there is an extra
     189phantom argument with index 0 that is not used.
    188190
    189191$head size_text$$
  • branches/opt_cond_exp/omh/whats_new/whats_new_13.omh

    r2977 r2981  
    1414$dollar @$$
    1515$spell
     16        op_arg
    1617        Adolc
    1718        aka
     
    5657assist you in learning about changes between various versions of CppAD.
    5758
     59$head 10-17$$
     60Add a phantom argument at the beginning of the operations sequence;
     61$cref/size_op_arg/seq_property/size_op_arg/$$ and $cref seq_property.cpp$$.
     62
    5863$head 10-16$$
    5964Fix bug in $cref/Tracing/WishList/Tracing/$$ $cref atomic$$ functions.
Note: See TracChangeset for help on using the changeset viewer.