Ignore:
Timestamp:
Sep 11, 2014 7:06:21 PM (6 years ago)
Author:
bradbell
Message:
  1. g++ 4.8.2 has shadow warnings by default, but eigen and fadbad do not

these warnings, so supress then in these cases.

  1. Move check that arguments come before result into on place,

CPPAD_ASSERT_ARG_BEFORE_RESULT (only one argument case so far).

main.cpp: fix shadowing of index variable.
CMakeLists.txt: adapt to change in teuchos library name.
sparse_jacobian.cpp: fix a shadowed variable.
check_svn_id.sh: ignore svn_commit.sh.
gpl_license.sh: ignore svn_commit.sh.

File:
1 edited

Legend:

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

    r3301 r3320  
    779779}
    780780
     781/*!
     782If NDEBUG is not defined, assert that arguments come before result.
     783
     784\param op
     785Operator for which we are checking order.
     786
     787\param result
     788is the variable index for the result.
     789
     790\param arg
     791is a vector of lenght NumArg(op) pointing to the arguments
     792for this operation.
     793*/
     794inline void assert_arg_before_result(
     795        OpCode op, const addr_t* arg, size_t result
     796)
     797{
     798        switch( op )
     799        {
     800                case AbsOp:
     801                case ExpOp:
     802                case LogOp:
     803                case ParOp:
     804                case SignOp:
     805                case SqrtOp:
     806                CPPAD_ASSERT_UNKNOWN( size_t(arg[0]) < result );
     807                break;
     808
     809                case AcosOp:
     810                case AsinOp:
     811                case AtanOp:
     812                case CosOp:
     813                case CoshOp:
     814                case SinOp:
     815                case SinhOp:
     816                case TanOp:
     817                case TanhOp:
     818                CPPAD_ASSERT_UNKNOWN( size_t(arg[0]) + 1 < result );
     819                break;
     820
     821                default:
     822                break;
     823
     824        }
     825        return;
     826}
     827
    781828} // END_CPPAD_NAMESPACE
    782829# endif
Note: See TracChangeset for help on using the changeset viewer.