Changeset 2212


Ignore:
Timestamp:
Nov 25, 2011 1:22:10 AM (9 years ago)
Author:
bradbell
Message:

Undefine all the defines that are not used outside the CppAD include files.

lu_vec_ad.cpp: change CPPAD_ASSERT to assert.
check_simple_vector.cpp: Use CPPAD_TEST_VECTOR, not CPPAD_BOOSTVECTOR.

Location:
trunk
Files:
4 edited

Legend:

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

    r2211 r2212  
    1414-------------------------------------------------------------------------- */
    1515
    16 // Undo definitions in define.hpp that are not in API
     16//      CPPAD_ASSERT_FIRST_CALL_NOT_PARALLEL used by CPPAD_USER_ATOMIC
     17//      CPPAD_ASSERT_KNOWN needed by cppad_ipopt
     18# undef CPPAD_ASSERT_NARG_NRES
     19# undef CPPAD_ASSERT_NOT_PARALLEL
     20//      CPPAD_ASSERT_UNKNOWN needed by cppad_ipopt
     21//      CPPAD_BEGIN_NAMESPACE needed by cppad_ipopt
     22//      CPPAD_BOOL_BINARY in user api
     23//      CPPAD_BOOL_UNARY in user api
     24# undef CPPAD_BOOSTVECTOR
     25# undef CPPAD_COND_EXP
     26# undef CPPAD_COND_EXP_BASE_REL
     27# undef CPPAD_COND_EXP_REL
     28# undef CPPAD_CPPADVECTOR
     29//      CPPAD_DISCRETE_FUNCTION
     30//      CPPAD_END_NAMESPACE needed by cppad_ipopt
     31# undef CPPAD_FOLD_AD_VALUED_BINARY_OPERATION
     32# undef CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR
     33# undef CPPAD_FOLD_ASSIGNMENT_OPERATOR
     34# undef CPPAD_FOLD_BOOL_VALUED_BINARY_OPERATOR
     35# undef CPPAD_FOR_JAC_SWEEP_TRACE
     36# undef CPPAD_FORWARD0SWEEP
     37# undef CPPAD_FORWARD0SWEEP_TRACE
     38# undef CPPAD_FORWARD_SWEEP_TRACE
     39# undef CPPAD_GETTIMEOFDAY
     40//      CPPAD_HASH_TABLE_SIZE used by test_more/optimize.cpp
     41# undef CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
     42# undef CPPAD_MAX_NUM_CAPACITIES
     43# undef CPPAD_MAX_NUM_CAPACITY
     44//      CPPAD_MAX_NUM_THREADS in user api
     45# undef CPPAD_MIN_DOUBLE_CAPACITY
     46# undef CPPAD_NUL
     47//      CPPAD_NULL is in user api
    1748# undef CPPAD_OP_CODE_TYPE
    18 // CPPAD_TAPE_ID_TYPE            is in API
     49//      CPPAD_PACKAGE_STRING in user api
     50# undef CPPAD_REVERSE_SWEEP_TRACE
     51# undef CPPAD_REV_HES_SWEEP_TRACE
     52# undef CPPAD_REV_JAC_SWEEP_TRACE
     53# undef CPPAD_SIZE_T_SAME_UNSIGNED_INT
     54# undef CPPAD_STANDARD_MATH_UNARY
     55# undef CPPAD_STANDARD_MATH_UNARY_AD
     56# undef CPPAD_STDVECTOR
     57//      CPPAD_TAPE_ADDR_TYPE in user api
     58# undef CPPAD_TAPE_ID_TYPE
     59//      CPPAD_TEST_VECTOR in user api
     60# undef CPPAD_TRACE_CAPACITY
     61# undef CPPAD_TRACE_THEAD
     62# undef CPPAD_TRACE_THREAD
     63//      CPPAD_TRACK_COUNT in deprecated api
     64# undef CPPAD_TRACK_DEBUG
     65//      CPPAD_TRACK_DEL_VEC in deprecated api
     66//      CPPAD_TRACK_EXTEND in deprecated api
     67//      CPPAD_TRACK_NEW_VEC in deprecated api
     68# undef CPPAD_TYPE_ADDR_TYPE
    1969# undef CPPAD_USE_FORWARD0SWEEP
    20 // # CPPAD_BEGIN_NAMESPACE       needed by cppad_ipopt
    21 // # CPPAD_END_NAMESPACE         needed by cppad_ipopt
    22 # undef CPPAD_INLINE_FRIEND_TEMPLATE_FUNCTION
    23 // # CPPAD_NUL                   is in the API
    24 // # CPPAD_MAX_NUM_THREADS       is in API
    25 # undef CPPAD_FOLD_ASSIGNMENT_OPERATOR
    26 # undef CPPAD_FOLD_AD_VALUED_BINARY_OPERATOR
    27 # undef CPPAD_FOLD_BOOL_VALUED_BINARY_OPERATOR
     70//      CPPAD_USER_ATOMIC
     71# undef CPPAD_USER_MACRO
     72# undef CPPAD_USER_MACRO_ONE
     73# undef CPPAD_USER_MACRO_TWO
     74# undef CPPAD_VEC_AD_COMPUTED_ASSIGNMENT
    2875
    2976# endif
  • trunk/example/lu_vec_ad.cpp

    r1370 r2212  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-11 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    2121        logdet
    2222        Cpp
    23         CPPAD_TEST_VECTOR
    2423$$
    2524
     
    230229                {       itmp = ip[i] * N;
    231230                        for(j = p; j < N; j += 1.)
    232                         {       CPPAD_ASSERT_UNKNOWN(
     231                        {       assert(
    233232                                        (ip[i] < N) & (jp[j] < N)
    234233                                );
  • trunk/omh/preprocessor.omh

    r2211 r2212  
    1212$begin preprocessor$$
    1313$spell
     14        const
    1415        nullptr
    1516        CppADvector
     
    3940which has been replaced by the value $code nullptr$$ in C++11.
    4041
     42$head CPPAD_PACKAGE_STRING$$
     43Is a $code const char*$$ representation of this version of CppAD.
     44
    4145
    4246$head Documented Elsewhere$$
     
    5054$cref/CPPAD_MAX_NUM_THREADS/multi_thread/CPPAD_MAX_NUM_THREADS/$$
    5155$rnext
    52 $cref/CPPAD_USER_ATOMIC/user_atomic/$$
    53 $rnext
    5456$cref/CPPAD_TAPE_ADDR_TYPE/InstallUnix/TapeAddrType/$$
    5557$rnext
    5658$cref/CPPAD_TEST_VECTOR/test_vector/$$
     59$rnext
     60$cref/CPPAD_USER_ATOMIC/user_atomic/$$
    5761$tend
    5862
  • trunk/test_more/check_simple_vector.cpp

    r1612 r2212  
    11/* $Id$ */
    22/* --------------------------------------------------------------------------
    3 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
     3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-11 Bradley M. Bell
    44
    55CppAD is distributed under multiple licenses. This distribution is under
     
    2424                CheckSimpleVector<Scalar, std::vector<Scalar>   > (x, y);
    2525                CheckSimpleVector<Scalar, std::valarray<Scalar> > (x, y);
    26 # if CPPAD_BOOSTVECTOR
    27                 typedef boost::numeric::ublas::vector<Scalar> boost_vector;
    28                 CheckSimpleVector<Scalar, boost_vector > (x, y);
    29 # endif
     26                typedef CPPAD_TEST_VECTOR<Scalar> test_vector;
     27                CheckSimpleVector<Scalar, test_vector > (x, y);
    3028        }
    3129}
Note: See TracChangeset for help on using the changeset viewer.