New upstream version 2017.00.00.4
Barak A. Pearlmutter
7 years ago
15 | 15 | CMAKE_MINIMUM_REQUIRED(VERSION 2.8) |
16 | 16 | |
17 | 17 | # cppad_version is used by set_version.sh to get the version number. |
18 | SET(cppad_version "20170000.3" ) | |
18 | SET(cppad_version "20170000.4" ) | |
19 | 19 | SET(cppad_url "http://www.coin-or.org/CppAD" ) |
20 | 20 | SET(cppad_description "Differentiation of C++ Algorithms" ) |
21 | 21 |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.69 for cppad 20170000.3. | |
2 | # Generated by GNU Autoconf 2.69 for cppad 20170000.4. | |
3 | 3 | # |
4 | 4 | # Report bugs to <cppad@list.coin-or.org>. |
5 | 5 | # |
579 | 579 | # Identity of this package. |
580 | 580 | PACKAGE_NAME='cppad' |
581 | 581 | PACKAGE_TARNAME='cppad' |
582 | PACKAGE_VERSION='20170000.3' | |
583 | PACKAGE_STRING='cppad 20170000.3' | |
582 | PACKAGE_VERSION='20170000.4' | |
583 | PACKAGE_STRING='cppad 20170000.4' | |
584 | 584 | PACKAGE_BUGREPORT='cppad@list.coin-or.org' |
585 | 585 | PACKAGE_URL='' |
586 | 586 | |
1408 | 1408 | # Omit some internal or obsolete options to make the list less imposing. |
1409 | 1409 | # This message is too long to be a string in the A/UX 3.1 sh. |
1410 | 1410 | cat <<_ACEOF |
1411 | \`configure' configures cppad 20170000.3 to adapt to many kinds of systems. | |
1411 | \`configure' configures cppad 20170000.4 to adapt to many kinds of systems. | |
1412 | 1412 | |
1413 | 1413 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1414 | 1414 | |
1478 | 1478 | |
1479 | 1479 | if test -n "$ac_init_help"; then |
1480 | 1480 | case $ac_init_help in |
1481 | short | recursive ) echo "Configuration of cppad 20170000.3:";; | |
1481 | short | recursive ) echo "Configuration of cppad 20170000.4:";; | |
1482 | 1482 | esac |
1483 | 1483 | cat <<\_ACEOF |
1484 | 1484 | |
1612 | 1612 | test -n "$ac_init_help" && exit $ac_status |
1613 | 1613 | if $ac_init_version; then |
1614 | 1614 | cat <<\_ACEOF |
1615 | cppad configure 20170000.3 | |
1615 | cppad configure 20170000.4 | |
1616 | 1616 | generated by GNU Autoconf 2.69 |
1617 | 1617 | |
1618 | 1618 | Copyright (C) 2012 Free Software Foundation, Inc. |
2241 | 2241 | This file contains any messages produced by compilers while |
2242 | 2242 | running configure, to aid debugging if configure makes a mistake. |
2243 | 2243 | |
2244 | It was created by cppad $as_me 20170000.3, which was | |
2244 | It was created by cppad $as_me 20170000.4, which was | |
2245 | 2245 | generated by GNU Autoconf 2.69. Invocation command line was |
2246 | 2246 | |
2247 | 2247 | $ $0 $@ |
3131 | 3131 | |
3132 | 3132 | # Define the identity of the package. |
3133 | 3133 | PACKAGE='cppad' |
3134 | VERSION='20170000.3' | |
3134 | VERSION='20170000.4' | |
3135 | 3135 | |
3136 | 3136 | |
3137 | 3137 | cat >>confdefs.h <<_ACEOF |
8571 | 8571 | # report actual input values of CONFIG_FILES etc. instead of their |
8572 | 8572 | # values after options handling. |
8573 | 8573 | ac_log=" |
8574 | This file was extended by cppad $as_me 20170000.3, which was | |
8574 | This file was extended by cppad $as_me 20170000.4, which was | |
8575 | 8575 | generated by GNU Autoconf 2.69. Invocation command line was |
8576 | 8576 | |
8577 | 8577 | CONFIG_FILES = $CONFIG_FILES |
8628 | 8628 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
8629 | 8629 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
8630 | 8630 | ac_cs_version="\\ |
8631 | cppad config.status 20170000.3 | |
8631 | cppad config.status 20170000.4 | |
8632 | 8632 | configured by $0, generated by GNU Autoconf 2.69, |
8633 | 8633 | with options \\"\$ac_cs_config\\" |
8634 | 8634 |
10 | 10 | dnl |
11 | 11 | dnl Process this file with autoconf to produce a configure script. |
12 | 12 | dnl package version bug-report |
13 | AC_INIT([cppad], [20170000.3], [cppad@list.coin-or.org]) | |
13 | AC_INIT([cppad], [20170000.4], [cppad@list.coin-or.org]) | |
14 | 14 | AM_SILENT_RULES([yes]) |
15 | 15 | |
16 | 16 | dnl By defalut disable maintainer mode when running configure; |
0 | // $Id$ | |
1 | 0 | # ifndef CPPAD_CORE_FORWARD_HPP |
2 | 1 | # define CPPAD_CORE_FORWARD_HPP |
3 | 2 | |
4 | 3 | /* -------------------------------------------------------------------------- |
5 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell | |
4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell | |
6 | 5 | |
7 | 6 | CppAD is distributed under multiple licenses. This distribution is under |
8 | 7 | the terms of the |
128 | 127 | // short hand notation for order capacity |
129 | 128 | size_t C = cap_order_taylor_; |
130 | 129 | |
130 | // The optimizer may skip a step that does not affect dependent variables. | |
131 | // Initilaizing zero order coefficients avoids following valgrind warning: | |
132 | // "Conditional jump or move depends on uninitialised value(s)". | |
133 | for(j = 0; j < num_var_tape_; j++) | |
134 | { for(k = p; k <= q; k++) | |
135 | taylor_[C * j + k] = CppAD::numeric_limits<Base>::quiet_NaN(); | |
136 | } | |
137 | ||
131 | 138 | // set Taylor coefficients for independent variables |
132 | 139 | for(j = 0; j < n; j++) |
133 | 140 | { CPPAD_ASSERT_UNKNOWN( ind_taddr_[j] < num_var_tape_ ); |
135 | 142 | // ind_taddr_[j] is operator taddr for j-th independent variable |
136 | 143 | CPPAD_ASSERT_UNKNOWN( play_.GetOp( ind_taddr_[j] ) == local::InvOp ); |
137 | 144 | |
138 | if( p == q ) | |
145 | if( p == q ) | |
139 | 146 | taylor_[ C * ind_taddr_[j] + q] = xq[j]; |
140 | 147 | else |
141 | 148 | { for(k = 0; k <= q; k++) |
1 | 1 | # ifndef CPPAD_CORE_ZDOUBLE_HPP |
2 | 2 | # define CPPAD_CORE_ZDOUBLE_HPP |
3 | 3 | /* -------------------------------------------------------------------------- |
4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell | |
4 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell | |
5 | 5 | |
6 | 6 | CppAD is distributed under multiple licenses. This distribution is under |
7 | 7 | the terms of the |
532 | 532 | // maximum finite value |
533 | 533 | static zdouble max(void) |
534 | 534 | { return std::numeric_limits<double>::max(); } |
535 | // quiet_NaN | |
536 | static zdouble quiet_NaN(void) | |
537 | { | |
538 | return zdouble( std::numeric_limits<double>::quiet_NaN() ); | |
539 | } | |
535 | 540 | }; |
536 | 541 | |
537 | 542 | } // CPPAD_END_NAMESPACE |
88 | 88 | size_t i_parent , |
89 | 89 | size_t i_arg , |
90 | 90 | vector<struct_op_info>& op_info , |
91 | sparse_pack& cexp_set ) | |
91 | sparse_list& cexp_set ) | |
92 | 92 | { |
93 | 93 | // cexp_set |
94 | 94 | if( cexp_set.n_set() > 0 ) |
344 | 344 | // comparisons results in the set holds. A set for operator i_op is |
345 | 345 | // not defined and left empty when op_info[i_op].usage = no_usage. |
346 | 346 | /// It is also left empty for the result of any VecAD operations. |
347 | sparse_pack cexp_set; | |
347 | sparse_list cexp_set; | |
348 | 348 | // |
349 | 349 | // number of sets |
350 | 350 | size_t num_set = 0; |
469 | 469 | CPPAD_ASSERT_UNKNOWN( NumRes(op) > 0 ); |
470 | 470 | if( use_result != no_usage ) |
471 | 471 | { CPPAD_ASSERT_UNKNOWN( NumArg(CExpOp) == 6 ); |
472 | addr_t mask[] = {1, 2, 4, 8}; | |
473 | for(size_t i = 0; i < 4; i++) | |
474 | { if( arg[1] & mask[i] ) | |
475 | { size_t j_op = var2op[ arg[2 + i] ]; | |
476 | usage_cexp_parent2arg( | |
472 | // propgate from parent to left argument | |
473 | if( arg[1] & 1 ) | |
474 | { size_t j_op = var2op[ arg[2] ]; | |
475 | usage_cexp_parent2arg( | |
476 | sum_op, i_op, j_op, op_info, cexp_set | |
477 | ); | |
478 | } | |
479 | // propgate from parent to right argument | |
480 | if( arg[1] & 2 ) | |
481 | { size_t j_op = var2op[ arg[3] ]; | |
482 | usage_cexp_parent2arg( | |
477 | 483 | sum_op, i_op, j_op, op_info, cexp_set |
478 | ); | |
479 | } | |
480 | } | |
481 | // here is where we add elements to cexp_set | |
482 | if( conditional_skip ) | |
483 | { bool same_variable = bool(arg[1] & 4) && bool(arg[1] & 8); | |
484 | same_variable &= arg[4] == arg[5]; | |
485 | if( ( arg[1] & 4 ) && (! same_variable) ) | |
486 | { // arg[4] is a variable | |
487 | size_t j_op = var2op[ arg[4] ]; | |
488 | CPPAD_ASSERT_UNKNOWN(op_info[j_op].usage != no_usage); | |
489 | // j_op corresponds to the value used when the | |
484 | ); | |
485 | } | |
486 | // are if_true and if_false cases the same variable | |
487 | bool same_variable = bool(arg[1] & 4) && bool(arg[1] & 8); | |
488 | same_variable &= arg[4] == arg[5]; | |
489 | // | |
490 | // if_true | |
491 | if( arg[1] & 4 ) | |
492 | { size_t j_op = var2op[ arg[4] ]; | |
493 | bool can_skip = conditional_skip & (! same_variable); | |
494 | can_skip &= op_info[j_op].usage == no_usage; | |
495 | usage_cexp_parent2arg( | |
496 | sum_op, i_op, j_op, op_info, cexp_set | |
497 | ); | |
498 | if( can_skip ) | |
499 | { // j_op corresponds to the value used when the | |
490 | 500 | // comparison result is true. It can be skipped when |
491 | 501 | // the comparison is false (0). |
492 | 502 | size_t element = 2 * cexp_index + 0; |
493 | 503 | cexp_set.add_element(j_op, element); |
504 | // | |
505 | op_info[j_op].usage = yes_usage; | |
494 | 506 | } |
495 | if( ( arg[1] & 8 ) && (! same_variable) ) | |
496 | { // arg[5] is a variable | |
497 | size_t j_op = var2op[ arg[5] ]; | |
498 | CPPAD_ASSERT_UNKNOWN(op_info[j_op].usage != no_usage); | |
499 | // j_op corresponds to the value used when the | |
507 | } | |
508 | // | |
509 | // if_false | |
510 | if( arg[1] & 8 ) | |
511 | { size_t j_op = var2op[ arg[5] ]; | |
512 | bool can_skip = conditional_skip & (! same_variable); | |
513 | can_skip &= op_info[j_op].usage == no_usage; | |
514 | usage_cexp_parent2arg( | |
515 | sum_op, i_op, j_op, op_info, cexp_set | |
516 | ); | |
517 | if( can_skip ) | |
518 | { // j_op corresponds to the value used when the | |
500 | 519 | // comparison result is false. It can be skipped when |
501 | // the comparison is true (1). | |
520 | // the comparison is true (0). | |
502 | 521 | size_t element = 2 * cexp_index + 1; |
503 | 522 | cexp_set.add_element(j_op, element); |
523 | // | |
524 | op_info[j_op].usage = yes_usage; | |
504 | 525 | } |
505 | 526 | } |
506 | 527 | } |
640 | 661 | break; // ----------------------------------------------------- |
641 | 662 | |
642 | 663 | // ============================================================= |
643 | // cumuilative summation operator | |
664 | // cumulative summation operator | |
644 | 665 | // ============================================================ |
645 | 666 | case CSumOp: |
646 | 667 | CPPAD_ASSERT_UNKNOWN( NumRes(op) == 1 ); |
676 | 697 | CPPAD_ASSERT_UNKNOWN(op_info[last_user_i_op].usage==no_usage); |
677 | 698 | # ifndef NDEBUG |
678 | 699 | if( cexp_set.n_set() > 0 ) |
679 | { sparse_pack_const_iterator itr(cexp_set, last_user_i_op); | |
700 | { sparse_list_const_iterator itr(cexp_set, last_user_i_op); | |
680 | 701 | CPPAD_ASSERT_UNKNOWN( *itr == cexp_set.end() ); |
681 | 702 | } |
682 | 703 | # endif |
1023 | 1044 | keep &= op_info[i_op].usage != csum_usage; |
1024 | 1045 | keep &= op_info[i_op].previous == 0; |
1025 | 1046 | if( keep ) |
1026 | { sparse_pack_const_iterator itr(cexp_set, i_op); | |
1047 | { sparse_list_const_iterator itr(cexp_set, i_op); | |
1027 | 1048 | if( *itr != cexp_set.end() ) |
1028 | 1049 | { if( op_info[i_op].op == UserOp ) |
1029 | 1050 | { // i_op is the first operations in this user atomic call. |
174 | 174 | |
175 | 175 | \return |
176 | 176 | If zero, niether set is a subset of the other. |
177 | If one, then set one is a subset of set two. | |
178 | If two, then set two is a subset of set one. | |
179 | If the two sets are equal, the value two is returned; i.e., the set | |
180 | in the other object is identified as a subset of the set in this object. | |
177 | If one, then the two sets are equal. | |
178 | If two, then set one is a subset of set two and not equal set two. | |
179 | If three, then set two is a subset of set one and not equal set one.. | |
181 | 180 | */ |
182 | 181 | size_t is_subset( |
183 | 182 | size_t one_this , |
191 | 190 | // start |
192 | 191 | size_t start_one = start_[one_this]; |
193 | 192 | size_t start_two = other.start_[two_other]; |
193 | // | |
194 | if( start_one == 0 ) | |
195 | { // set one is empty | |
196 | if( start_two == 0 ) | |
197 | { // set two is empty | |
198 | return 1; | |
199 | } | |
200 | return 2; | |
201 | } | |
194 | 202 | if( start_two == 0 ) |
195 | return 2; | |
196 | if( start_one == 0 ) | |
197 | return 1; | |
203 | { // set two is empty and one is not empty | |
204 | return 3; | |
205 | } | |
198 | 206 | // |
199 | 207 | // next |
200 | 208 | size_t next_one = data_[start_one].next; |
206 | 214 | // |
207 | 215 | bool one_subset = true; |
208 | 216 | bool two_subset = true; |
209 | ||
217 | // | |
210 | 218 | size_t value_union = std::min(value_one, value_two); |
211 | 219 | while( (one_subset | two_subset) & (value_union < end_) ) |
212 | 220 | { if( value_one > value_union ) |
229 | 237 | } |
230 | 238 | value_union = std::min(value_one, value_two); |
231 | 239 | } |
240 | if( one_subset ) | |
241 | { if( two_subset ) | |
242 | { // sets are equal | |
243 | return 1; | |
244 | } | |
245 | // one is a subset of two | |
246 | return 2; | |
247 | } | |
232 | 248 | if( two_subset ) |
233 | return 2; | |
234 | if( one_subset ) | |
235 | return 1; | |
249 | { // two is a subset of one | |
250 | return 3; | |
251 | } | |
252 | // | |
253 | // neither is a subset | |
236 | 254 | return 0; |
237 | 255 | } |
238 | 256 | // ----------------------------------------------------------------- |
662 | 680 | size_t subset = is_subset(this_left, other_right, other); |
663 | 681 | |
664 | 682 | // case where right is a subset of left or right and left are equal |
665 | if( subset == 2 ) | |
683 | if( subset == 1 || subset == 3 ) | |
666 | 684 | { assignment(this_target, this_left, *this); |
667 | 685 | return; |
668 | 686 | } |
669 | 687 | // case where the left is a subset of right and they are not equal |
670 | if( subset == 1 ) | |
688 | if( subset == 2 ) | |
671 | 689 | { assignment(this_target, other_right, other); |
672 | 690 | return; |
673 | 691 | } |
751 | 769 | if( data_not_used_ > data_.size() / 2 ) |
752 | 770 | collect_garbage(); |
753 | 771 | // |
772 | } | |
773 | // ----------------------------------------------------------------- | |
774 | /*! Assign a set equal to the intersection of two other sets. | |
775 | ||
776 | \param this_target | |
777 | is the index in this sparse_list object of the set being assinged. | |
778 | ||
779 | \param this_left | |
780 | is the index in this sparse_list object of the | |
781 | left operand for the intersection operation. | |
782 | It is OK for this_target and this_left to be the same value. | |
783 | ||
784 | \param other_right | |
785 | is the index in the other sparse_list object of the | |
786 | right operand for the intersection operation. | |
787 | It is OK for this_target and other_right to be the same value. | |
788 | ||
789 | \param other | |
790 | is the other sparse_list object (which may be the same as this | |
791 | sparse_list object). | |
792 | */ | |
793 | void binary_intersection( | |
794 | size_t this_target , | |
795 | size_t this_left , | |
796 | size_t other_right , | |
797 | const sparse_list& other ) | |
798 | { | |
799 | CPPAD_ASSERT_UNKNOWN( this_target < start_.size() ); | |
800 | CPPAD_ASSERT_UNKNOWN( this_left < start_.size() ); | |
801 | CPPAD_ASSERT_UNKNOWN( other_right < other.start_.size() ); | |
802 | CPPAD_ASSERT_UNKNOWN( end_ == other.end_ ); | |
803 | // | |
804 | // check if one of the two operands is a subset of the the other | |
805 | size_t subset = is_subset(this_left, other_right, other); | |
806 | ||
807 | // case where left is a subset of right or left and right are equal | |
808 | if( subset == 1 || subset == 2 ) | |
809 | { assignment(this_target, this_left, *this); | |
810 | return; | |
811 | } | |
812 | // case where the right is a subset of left and they are not equal | |
813 | if( subset == 3 ) | |
814 | { assignment(this_target, other_right, other); | |
815 | return; | |
816 | } | |
817 | // if niether case holds, then both left and right are non-empty | |
818 | CPPAD_ASSERT_UNKNOWN( reference_count(this_left) > 0 ); | |
819 | CPPAD_ASSERT_UNKNOWN( other.reference_count(other_right) > 0 ); | |
820 | ||
821 | // must get all the start indices before modify start_this | |
822 | // (incase start_this is the same as start_left or start_right) | |
823 | size_t start_target = start_[this_target]; | |
824 | size_t start_left = start_[this_left]; | |
825 | size_t start_right = other.start_[other_right]; | |
826 | ||
827 | ||
828 | // number of list elements that will be deleted by this operation | |
829 | size_t number_delete = 0; | |
830 | size_t ref_count = reference_count(this_target); | |
831 | if( ref_count == 1 ) | |
832 | number_delete = number_elements(this_target) + 1; | |
833 | else if (ref_count > 1 ) | |
834 | { // decrement reference counter | |
835 | CPPAD_ASSERT_UNKNOWN( data_[start_target].value > 1 ) | |
836 | data_[start_target].value--; | |
837 | } | |
838 | ||
839 | // start the new list as emptyh | |
840 | size_t start = 0; | |
841 | size_t next = start; | |
842 | start_[this_target] = start; | |
843 | ||
844 | // next for left and right lists | |
845 | size_t next_left = data_[start_left].next; | |
846 | size_t next_right = other.data_[start_right].next; | |
847 | ||
848 | // value for left and right sets | |
849 | size_t value_left = data_[next_left].value; | |
850 | size_t value_right = other.data_[next_right].value; | |
851 | ||
852 | CPPAD_ASSERT_UNKNOWN( value_left < end_ && value_right < end_ ); | |
853 | while( (value_left < end_) & (value_right < end_) ) | |
854 | { if( value_left == value_right ) | |
855 | { if( start == 0 ) | |
856 | { // this is the first element in the intersection | |
857 | start = data_.extend(1); | |
858 | next = start; | |
859 | start_[this_target] = start; | |
860 | data_[start].value = 1; // reference count | |
861 | CPPAD_ASSERT_UNKNOWN( start > 0 ); | |
862 | } | |
863 | size_t tmp = data_.extend(1); | |
864 | data_[next].next = tmp; | |
865 | next = tmp; | |
866 | data_[next].value = value_left; | |
867 | // | |
868 | // advance left to its next element | |
869 | next_left = data_[next_left].next; | |
870 | if( next_left == 0 ) | |
871 | value_left = end_; | |
872 | else | |
873 | value_left = data_[next_left].value; | |
874 | // | |
875 | } | |
876 | if( value_left > value_right ) | |
877 | { // advance right | |
878 | next_right = other.data_[next_right].next; | |
879 | if( next_right == 0 ) | |
880 | value_right = end_; | |
881 | else | |
882 | value_right = other.data_[next_right].value; | |
883 | } | |
884 | if( value_right > value_left ) | |
885 | { // advance left | |
886 | next_left = data_[next_left].next; | |
887 | if( next_left == 0 ) | |
888 | value_left = end_; | |
889 | else | |
890 | value_left = data_[next_left].value; | |
891 | } | |
892 | } | |
893 | if( start != 0 ) | |
894 | { CPPAD_ASSERT_UNKNOWN( next != 0 ); | |
895 | data_[next].next = 0; | |
896 | } | |
897 | ||
898 | // adjust data_not_used_ | |
899 | data_not_used_ += number_delete; | |
900 | // | |
901 | if( data_not_used_ > data_.size() / 2 ) | |
902 | collect_garbage(); | |
754 | 903 | } |
755 | 904 | // ----------------------------------------------------------------- |
756 | 905 | /*! Fetch n_set for vector of sets object. |
63 | 63 | onmouseover='MouseOver(1)' |
64 | 64 | onmouseout='MouseOut(1)' |
65 | 65 | ><img src='_close.gif' name='folder1' align='middle' /> |
66 | <u>cppad-20170000.3: A Package for Differentiation of C++ Algorithms</u></a> | |
66 | <u>cppad-20170000.4: A Package for Differentiation of C++ Algorithms</u></a> | |
67 | 67 | |
68 | 68 | <span id='children1'> |
69 | <br/><a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a> | |
69 | <br/><a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a> | |
70 | 70 | |
71 | 71 | <br/>    <a href="_contents_xml.htm" target="_top">Table of Contents</a> |
72 | 72 |
171 | 171 | |
172 | 172 | <tr valign="top"><td><a href="http://www.coin-or.org/download/source/CppAD/" target="_top">http://www.coin-or.org/download/source/CppAD/</a></td><td><a href="whats_new_09.xml#06-25" target="_top">whats_new_09#06-25</a></td></tr> |
173 | 173 | |
174 | <tr valign="top"><td><a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.epl.tgz" target="_top">http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.epl.tgz</a></td><td><a href="download.xml#Current Version.Compressed Archives" target="_top">download#Current Version.Compressed Archives</a></td></tr> | |
175 | ||
176 | <tr valign="top"><td><a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.gpl.tgz" target="_top">http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.gpl.tgz</a></td><td><a href="download.xml#Current Version.Compressed Archives" target="_top">download#Current Version.Compressed Archives</a></td></tr> | |
174 | <tr valign="top"><td><a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.epl.tgz" target="_top">http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.epl.tgz</a></td><td><a href="download.xml#Current Version.Compressed Archives" target="_top">download#Current Version.Compressed Archives</a></td></tr> | |
175 | ||
176 | <tr valign="top"><td><a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.gpl.tgz" target="_top">http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.gpl.tgz</a></td><td><a href="download.xml#Current Version.Compressed Archives" target="_top">download#Current Version.Compressed Archives</a></td></tr> | |
177 | 177 | |
178 | 178 | <tr valign="top"><td><a href="http://www.coin-or.org/foundation.html" target="_top">http://www.coin-or.org/foundation.html</a></td><td><a href="cppad.xml#Introduction" target="_top">CppAD#Introduction</a></td></tr> |
179 | 179 |
1182 | 1182 |    <a href="simple_ad_bthread.cpp.xml" target="_top">A Simple Boost Threading AD: Example and Test</a><br/> |
1183 | 1183 |    <a href="simple_ad_openmp.cpp.xml" target="_top">A Simple OpenMP AD: Example and Test</a><br/> |
1184 | 1184 |    <a href="introduction.xml" target="_top">An Introduction by Example to Algorithmic Differentiation</a><br/> |
1185 |    <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1185 |    <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1186 | 1186 | ADFun <a href="comparechange.xml" target="_top">Comparison Changes During Zero Order Forward Mode</a><br/> |
1187 | 1187 |       <a href="compare_change.xml" target="_top">Comparison Changes Between Taping and Zero Order Forward</a><br/> |
1188 | 1188 |       <a href="dependent.xml" target="_top">Stop Recording and Store Operation Sequence</a><br/> |
1436 | 1436 |           <a href="forsparsehes.xml#Algorithm" target="_top">Hessian Sparsity Pattern: Forward Mode: Algorithm</a><br/> |
1437 | 1437 |           <a href="exp_eps.xml" target="_top">An Epsilon Accurate Exponential Approximation</a><br/> |
1438 | 1438 |           <a href="exp_2.xml" target="_top">Second Order Exponential Approximation</a><br/> |
1439 |           <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1439 |           <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1440 | 1440 | algorithm<b>:</b> <a href="conj_grad.cpp.xml" target="_top">Differentiate Conjugate Gradient Algorithm: Example and Test</a><br/> |
1441 | 1441 | algorithmic <a href="ad_in_c.cpp.xml" target="_top">Example and Test Linking CppAD to Languages Other than C++</a><br/> |
1442 | 1442 |             <a href="introduction.xml#Preface.Algorithmic Differentiation" target="_top">An Introduction by Example to Algorithmic Differentiation: Preface.Algorithmic Differentiation</a><br/> |
1443 | 1443 |             <a href="introduction.xml" target="_top">An Introduction by Example to Algorithmic Differentiation</a><br/> |
1444 |             <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1445 | algorithms <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1444 |             <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1445 | algorithms <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1446 | 1446 | alignment <a href="ta_create_array.xml#Alignment" target="_top">Allocate An Array and Call Default Constructor for its Elements: Alignment</a><br/> |
1447 | 1447 |           <a href="ta_get_memory.xml#Alignment" target="_top">Get At Least A Specified Amount of Memory: Alignment</a><br/> |
1448 | 1448 | all <a href="listallexamples.xml" target="_top">List of All the CppAD Examples</a><br/> |
1693 | 1693 | atomic<b>_</b>user <a href="atomic_ctor.xml#atomic_user" target="_top">Atomic Function Constructor: atomic_user</a><br/> |
1694 | 1694 | auto <a href="auto_tools.xml" target="_top">Auto Tools Unix Test and Installation</a><br/> |
1695 | 1695 | automatic <a href="ad_in_c.cpp.xml" target="_top">Example and Test Linking CppAD to Languages Other than C++</a><br/> |
1696 |           <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1696 |           <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1697 | 1697 | available <a href="memory_leak.xml#available" target="_top">Memory Leak Detection: available</a><br/> |
1698 | 1698 |           <a href="omp_delete_array.xml" target="_top">Return A Raw Array to The Available Memory for a Thread</a><br/> |
1699 | 1699 |           <a href="omp_available.xml" target="_top">Amount of Memory Available for Quick Use by a Thread</a><br/> |
1840 | 1840 | C <a href="interface2c.cpp.xml" target="_top">Interfacing to C: Example and Test</a><br/> |
1841 | 1841 |   <a href="ad_in_c.cpp.xml" target="_top">Example and Test Linking CppAD to Languages Other than C++</a><br/> |
1842 | 1842 |      compare<b> </b>speed<b> </b>with<b> </b>C<b>++</b> <a href="compare_c.xml" target="_top">Compare Speed of C and C++</a><br/> |
1843 | C<b>++</b> <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1843 | C<b>++</b> <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1844 | 1844 |      compare<b> </b>speed<b> </b>with<b> </b>C <a href="compare_c.xml" target="_top">Compare Speed of C and C++</a><br/> |
1845 | 1845 | CheckNumericType <a href="checknumerictype.xml" target="_top">Check NumericType Class Concept</a><br/> |
1846 | 1846 | CheckSimpleVector <a href="checksimplevector.xml" target="_top">Check Simple Vector Concept</a><br/> |
1863 | 1863 | CppAD <a href="vector_bool.cpp.xml" target="_top">CppAD::vectorBool Class: Example and Test</a><br/> |
1864 | 1864 |       <a href="cppad_vector.cpp.xml" target="_top">CppAD::vector Template Class: Example and Test</a><br/> |
1865 | 1865 |       <a href="cppad_vector.xml" target="_top">The CppAD::vector Template Class</a><br/> |
1866 |       <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1866 |       <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1867 | 1867 | CppADTrackDelVec <a href="tracknewdel.xml" target="_top">Routines That Track Use of New and Delete</a><br/> |
1868 | 1868 | CppADTrackExtend <a href="tracknewdel.xml" target="_top">Routines That Track Use of New and Delete</a><br/> |
1869 | 1869 | CppADTrackNewVec <a href="tracknewdel.xml" target="_top">Routines That Track Use of New and Delete</a><br/> |
1878 | 1878 |     <a href="bib.xml#The C++ Programming Language" target="_top">Bibliography: The C++ Programming Language</a><br/> |
1879 | 1879 |     <a href="ad_in_c.cpp.xml" target="_top">Example and Test Linking CppAD to Languages Other than C++</a><br/> |
1880 | 1880 |     <a href="utility.xml#C++ Concepts" target="_top">Some General Purpose Utilities: C++ Concepts</a><br/> |
1881 |     <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
1881 |     <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
1882 | 1882 | c<b>++</b>11 <a href="cmake.xml#cppad_cxx_flags.C++11" target="_top">Using CMake to Configure CppAD: cppad_cxx_flags.C++11</a><br/> |
1883 | 1883 | c<b>:</b> <a href="interface2c.cpp.xml" target="_top">Interfacing to C: Example and Test</a><br/> |
1884 | 1884 | calculating <a href="sparse.xml" target="_top">Calculating Sparsity Patterns</a><br/> |
2363 | 2363 |       <a href="cmake.xml" target="_top">Using CMake to Configure CppAD</a><br/> |
2364 | 2364 |       <a href="download.xml" target="_top">Download The CppAD Source Code</a><br/> |
2365 | 2365 |       <a href="install.xml" target="_top">CppAD Download, Test, and Install Instructions</a><br/> |
2366 | cppad<b>-</b>20170000<b>.</b>3<b>:</b> <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
2367 | cppad<b>.</b>hpp <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
2366 | cppad<b>-</b>20170000<b>.</b>4<b>:</b> <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
2367 | cppad<b>.</b>hpp <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
2368 | 2368 | cppad<b>::</b>numeric<b>_</b>limits <a href="base_limits.xml#CppAD::numeric_limits" target="_top">Base Type Requirements for Numeric Limits: CppAD::numeric_limits</a><br/> |
2369 | 2369 |                       <a href="numeric_limits.xml#CppAD::numeric_limits" target="_top">Numeric Limits For an AD and Base Types: CppAD::numeric_limits</a><br/> |
2370 | 2370 | cppad<b>::</b>vector <a href="test_vector.xml#CppAD::vector" target="_top">Choosing The Vector Testing Template Class: CppAD::vector</a><br/> |
2620 | 2620 |            <a href="exp_2_for2.xml#Operation Sequence.Derivative" target="_top">exp_2: Second Order Forward Mode: Operation Sequence.Derivative</a><br/> |
2621 | 2621 |            <a href="exp_2_for1.xml#Operation Sequence.Derivative" target="_top">exp_2: First Order Forward Mode: Operation Sequence.Derivative</a><br/> |
2622 | 2622 |            <a href="get_started.cpp.xml#Derivative" target="_top">Getting Started Using CppAD to Compute Derivatives: Derivative</a><br/> |
2623 |            <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
2623 |            <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
2624 | 2624 | derivative<b>:</b> <a href="revone.xml" target="_top">First Order Derivative: Driver Routine</a><br/> |
2625 | 2625 |             <a href="forone.xml" target="_top">First Order Partial Derivative: Driver Routine</a><br/> |
2626 | 2626 | derivatives <a href="old_usead_2.cpp.xml" target="_top">Using AD to Compute Atomic Function Derivatives</a><br/> |
2736 | 2736 | differentiation <a href="ad_in_c.cpp.xml" target="_top">Example and Test Linking CppAD to Languages Other than C++</a><br/> |
2737 | 2737 |                 <a href="introduction.xml#Preface.Algorithmic Differentiation" target="_top">An Introduction by Example to Algorithmic Differentiation: Preface.Algorithmic Differentiation</a><br/> |
2738 | 2738 |                 <a href="introduction.xml" target="_top">An Introduction by Example to Algorithmic Differentiation</a><br/> |
2739 |                 <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
2740 |                 <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
2739 |                 <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
2740 |                 <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
2741 | 2741 | dimension <a href="rombergmul.xml" target="_top">Multi-dimensional Romberg Integration</a><br/> |
2742 | 2742 | dimensional <a href="rombergmul.cpp.xml" target="_top">One Dimensional Romberg Integration: Example and Test</a><br/> |
2743 | 2743 |             <a href="rombergmul.xml" target="_top">Multi-dimensional Romberg Integration</a><br/> |
3408 | 3408 |         <a href="colpack_hes.cpp.xml" target="_top">Using ColPack: Example and Test</a><br/> |
3409 | 3409 |         <a href="colpack_jac.cpp.xml" target="_top">Using ColPack: Example and Test</a><br/> |
3410 | 3410 |         <a href="colpack_prefix.xml#Example" target="_top">Including the ColPack Sparsity Calculations: Example</a><br/> |
3411 |         <a href="cppad.xml#Example" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Example</a><br/> | |
3411 |         <a href="cppad.xml#Example" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Example</a><br/> | |
3412 | 3412 | examples <a href="speed_example.cpp.xml" target="_top">Run the Speed Examples</a><br/> |
3413 | 3413 |          <a href="example.cpp.xml" target="_top">CppAD Examples and Tests</a><br/> |
3414 | 3414 |          <a href="listallexamples.xml" target="_top">List of All the CppAD Examples</a><br/> |
3693 | 3693 |      <a href="check_for_nan.xml#get_check_for_nan.file" target="_top">Check an ADFun Object For Nan Results: get_check_for_nan.file</a><br/> |
3694 | 3694 |      <a href="base_alloc.hpp.xml#Include File" target="_top">Example AD<Base> Where Base Constructor Allocates Memory: Include File</a><br/> |
3695 | 3695 |      <a href="download.xml#Windows File Extraction and Testing" target="_top">Download The CppAD Source Code: Windows File Extraction and Testing</a><br/> |
3696 |      <a href="cppad.xml#Include File" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Include File</a><br/> | |
3696 |      <a href="cppad.xml#Include File" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Include File</a><br/> | |
3697 | 3697 | file<b>_</b>name <a href="check_for_nan.xml#Error Message.file_name" target="_top">Check an ADFun Object For Nan Results: Error Message.file_name</a><br/> |
3698 | 3698 | files <a href="addon.xml#Library Files" target="_top">CppAD Addons: Library Files</a><br/> |
3699 | 3699 |       <a href="addon.xml#Include Files" target="_top">CppAD Addons: Include Files</a><br/> |
4348 | 4348 |         <a href="exp_eps.xml#include" target="_top">An Epsilon Accurate Exponential Approximation: include</a><br/> |
4349 | 4349 |         <a href="exp_2.xml#include" target="_top">Second Order Exponential Approximation: include</a><br/> |
4350 | 4350 |         <a href="cmake.xml" target="_top">Using CMake to Configure CppAD</a><br/> |
4351 |         <a href="cppad.xml#Include File" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Include File</a><br/> | |
4351 |         <a href="cppad.xml#Include File" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Include File</a><br/> | |
4352 | 4352 | including <a href="sacado_prefix.xml" target="_top">Including the Sacado Speed Tests</a><br/> |
4353 | 4353 |           <a href="ipopt_prefix.xml" target="_top">Including the cppad_ipopt Library and Tests</a><br/> |
4354 | 4354 |           <a href="fadbad_prefix.xml" target="_top">Including the FADBAD Speed Tests</a><br/> |
4507 | 4507 |              <a href="example.xml#Introduction" target="_top">Examples: Introduction</a><br/> |
4508 | 4508 |              <a href="exp_apx_main.cpp.xml" target="_top">Correctness Tests For Exponential Approximation in Introduction</a><br/> |
4509 | 4509 |              <a href="introduction.xml" target="_top">An Introduction by Example to Algorithmic Differentiation</a><br/> |
4510 |              <a href="cppad.xml#Introduction" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Introduction</a><br/> | |
4510 |              <a href="cppad.xml#Introduction" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Introduction</a><br/> | |
4511 | 4511 | inuse <a href="memory_leak.xml#inuse" target="_top">Memory Leak Detection: inuse</a><br/> |
4512 | 4512 |       <a href="omp_inuse.xml" target="_top">Amount of Memory a Thread is Currently Using</a><br/> |
4513 | 4513 |       <a href="ta_inuse.xml" target="_top">Amount of Memory a Thread is Currently Using</a><br/> |
5225 | 5225 |           <a href="cppad_ipopt_nlp.xml#cppad_ipopt namespace" target="_top">Nonlinear Programming Using the CppAD Interface to Ipopt: cppad_ipopt namespace</a><br/> |
5226 | 5226 |           <a href="faq.xml#Namespace" target="_top">Frequently Asked Questions and Answers: Namespace</a><br/> |
5227 | 5227 |           <a href="cppad_eigen.hpp.xml#CppAD Namespace" target="_top">Enable Use of Eigen Linear Algebra Package with CppAD: CppAD Namespace</a><br/> |
5228 |           <a href="cppad.xml#Namespace" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Namespace</a><br/> | |
5228 |           <a href="cppad.xml#Namespace" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Namespace</a><br/> | |
5229 | 5229 | nan <a href="zdouble.xml#Syntax.Nan" target="_top">zdouble: An AD Base Type With Absolute Zero: Syntax.Nan</a><br/> |
5230 | 5230 |     <a href="ode_err_control.cpp.xml#Nan" target="_top">OdeErrControl: Example and Test: Nan</a><br/> |
5231 | 5231 |     <a href="odeerrcontrol.xml#Method.Nan" target="_top">An Error Controller for ODE Solvers: Method.Nan</a><br/> |
5751 | 5751 |         <a href="speed.xml" target="_top">Speed Test an Operator Overloading AD Package</a><br/> |
5752 | 5752 |         <a href="cppad_eigen.hpp.xml" target="_top">Enable Use of Eigen Linear Algebra Package with CppAD</a><br/> |
5753 | 5753 |         <a href="cmake.xml" target="_top">Using CMake to Configure CppAD</a><br/> |
5754 |         <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
5754 |         <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
5755 | 5755 | package<b>_</b>prefix <a href="cmake.xml#package_prefix" target="_top">Using CMake to Configure CppAD: package_prefix</a><br/> |
5756 | 5756 | parallel <a href="old_atomic.xml#afun.Parallel Mode" target="_top">User Defined Atomic AD Functions: afun.Parallel Mode</a><br/> |
5757 | 5757 |          <a href="omp_in_parallel.xml" target="_top">Is The Current Execution in OpenMP Parallel Mode</a><br/> |
5889 | 5889 | preprocessor <a href="addon.xml#Preprocessor Symbols" target="_top">CppAD Addons: Preprocessor Symbols</a><br/> |
5890 | 5890 |              <a href="faq.xml#Namespace.Test Vector Preprocessor Symbol" target="_top">Frequently Asked Questions and Answers: Namespace.Test Vector Preprocessor Symbol</a><br/> |
5891 | 5891 |              <a href="preprocessor.xml" target="_top">CppAD API Preprocessor Symbols</a><br/> |
5892 |              <a href="cppad.xml#Preprocessor Symbols" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Preprocessor Symbols</a><br/> | |
5892 |              <a href="cppad.xml#Preprocessor Symbols" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Preprocessor Symbols</a><br/> | |
5893 | 5893 | previous <a href="whats_new.xml#Previous Years" target="_top">Changes and Additions to CppAD: Previous Years</a><br/> |
5894 | 5894 | previously <a href="tracknewdel.xml#TrackCount.Previously Deprecated" target="_top">Routines That Track Use of New and Delete: TrackCount.Previously Deprecated</a><br/> |
5895 | 5895 |            <a href="tracknewdel.xml#TrackExtend.Previously Deprecated" target="_top">Routines That Track Use of New and Delete: TrackExtend.Previously Deprecated</a><br/> |
7365 | 7365 | symbol <a href="faq.xml#Namespace.Test Vector Preprocessor Symbol" target="_top">Frequently Asked Questions and Answers: Namespace.Test Vector Preprocessor Symbol</a><br/> |
7366 | 7366 | symbols <a href="addon.xml#Preprocessor Symbols" target="_top">CppAD Addons: Preprocessor Symbols</a><br/> |
7367 | 7367 |         <a href="preprocessor.xml" target="_top">CppAD API Preprocessor Symbols</a><br/> |
7368 |         <a href="cppad.xml#Preprocessor Symbols" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Preprocessor Symbols</a><br/> | |
7368 |         <a href="cppad.xml#Preprocessor Symbols" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Preprocessor Symbols</a><br/> | |
7369 | 7369 | syntax <a href="luratio.xml#Syntax" target="_top">LU Factorization of A Square Matrix and Stability Calculation: Syntax</a><br/> |
7370 | 7370 |        <a href="opt_val_hes.xml#Syntax" target="_top">Jacobian and Hessian of Optimal Values: Syntax</a><br/> |
7371 | 7371 |        <a href="benderquad.xml#Syntax" target="_top">Computing Jacobian and Hessian of Bender's Reduced Objective: Syntax</a><br/> |
7570 | 7570 |        <a href="get_eigen.sh.xml#Syntax" target="_top">Download and Install Eigen in Build Directory: Syntax</a><br/> |
7571 | 7571 |        <a href="get_colpack.sh.xml#Syntax" target="_top">Download and Install ColPack in Build Directory: Syntax</a><br/> |
7572 | 7572 |        <a href="get_adolc.sh.xml#Syntax" target="_top">Download and Install Adolc in Build Directory: Syntax</a><br/> |
7573 |        <a href="cppad.xml#Syntax" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms: Syntax</a><br/> | |
7573 |        <a href="cppad.xml#Syntax" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms: Syntax</a><br/> | |
7574 | 7574 | systems <a href="elapsed_seconds.xml#Microsoft Systems" target="_top">Returns Elapsed Number of Seconds: Microsoft Systems</a><br/> |
7575 | 7575 | |
7576 | 7576 | <b><big><a name="T">T</a></big></b> |
8634 | 8634 |         <a href="atomic_afun.xml" target="_top">Using AD Version of Atomic Function</a><br/> |
8635 | 8635 |         <a href="discrete.xml#Create AD Version" target="_top">Discrete AD Functions: Create AD Version</a><br/> |
8636 | 8636 |         <a href="download.xml#Current Version" target="_top">Download The CppAD Source Code: Current Version</a><br/> |
8637 |         <a href="cppad.xml" target="_top">cppad-20170000.3: A Package for Differentiation of C++ Algorithms</a><br/> | |
8637 |         <a href="cppad.xml" target="_top">cppad-20170000.4: A Package for Differentiation of C++ Algorithms</a><br/> | |
8638 | 8638 | version<b>)</b> <a href="double_mat_mul.cpp.xml" target="_top">CppAD Speed: Matrix Multiplication (Double Version)</a><br/> |
8639 | 8639 | versions <a href="download.xml#Daily Versions" target="_top">Download The CppAD Source Code: Daily Versions</a><br/> |
8640 | 8640 |          <a href="download.xml#Monthly Versions" target="_top">Download The CppAD Source Code: Monthly Versions</a><br/> |
244 | 244 | <a href="cos.cpp.xml" target="_top">cos.cpp</a><br/> </td><td> The AD cos Function: Example and Test </td></tr><tr valign="top"><td> |
245 | 245 | <a href="cosh.xml" target="_top">cosh</a><br/> </td><td> The Hyperbolic Cosine Function: cosh </td></tr><tr valign="top"><td> |
246 | 246 | <a href="cosh.cpp.xml" target="_top">cosh.cpp</a><br/> </td><td> The AD cosh Function: Example and Test </td></tr><tr valign="top"><td> |
247 | <a href="cppad.xml" target="_top">CppAD</a><br/> </td><td> cppad-20170000.3: A Package for Differentiation of C++ Algorithms </td></tr><tr valign="top"><td> | |
247 | <a href="cppad.xml" target="_top">CppAD</a><br/> </td><td> cppad-20170000.4: A Package for Differentiation of C++ Algorithms </td></tr><tr valign="top"><td> | |
248 | 248 | <a href="cppad_assert.xml" target="_top">cppad_assert</a><br/> </td><td> CppAD Assertions During Execution </td></tr><tr valign="top"><td> |
249 | 249 | <a href="cppad_det_lu.cpp.xml" target="_top">cppad_det_lu.cpp</a><br/> </td><td> CppAD Speed: Gradient of Determinant Using Lu Factorization </td></tr><tr valign="top"><td> |
250 | 250 | <a href="cppad_det_minor.cpp.xml" target="_top">cppad_det_minor.cpp</a><br/> </td><td> CppAD Speed: Gradient of Determinant by Minor Expansion </td></tr><tr valign="top"><td> |
2 | 2 | // ------------------------------------------------------------ |
3 | 3 | Keyword = |
4 | 4 | [ |
5 | 'CppAD cppad-20170000.3: A Package for Differentiation of C++ Algorithms ',' algorithmic automatic derivative version cppad.hpp syntax introduction example include file preprocessor symbols namespace ', | |
5 | 'CppAD cppad-20170000.4: A Package for Differentiation of C++ Algorithms ',' algorithmic automatic derivative version cppad.hpp syntax introduction example include file preprocessor symbols namespace ', | |
6 | 6 | 'Install CppAD Download, Test, and Install Instructions ',' step 1: 2: cmake 3: check 4: installation ', |
7 | 7 | 'download Download The CppAD Source Code ',' purpose distribution directory compressed archives current version subversion git release versions coin github monthly daily windows file extraction testing install instructions no documentation building ', |
8 | 8 | 'cmake Using CMake to Configure CppAD ',' makefile install prefix postfix include directories lib datadir documentation package compile flags profile maximum number threads sparsity internal structure vector sets memory usage tape implicit explicit the program command build directory check cmake_verbose_makefile generator cppad_prefix cppad_postfix cmake_install_includedirs cmake_install_libdirs cmake_install_datadir cmake_install_docdir package_prefix cppad_cxx_flags c++11 cppad_profile_flag eigen fadbad cppad_testvector cppad_max_num_threads cppad_tape_id_type cstdint cppad_tape_addr_type cppad_deprecated ', |
276 | 276 | |
277 | 277 | <span style="font-style: italic"><span style="color: #9A1900">// compare reverse mode results</span></span> |
278 | 278 | <span style="font-weight: bold"><span style="color: #000000">CPPAD_TESTVECTOR</span></span><span style="color: #990000">(</span><span style="color: #009900">double</span><span style="color: #990000">)</span> <span style="font-weight: bold"><span style="color: #000000">w</span></span><span style="color: #990000">(</span>m<span style="color: #990000">*(</span>q<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">)),</span> <span style="font-weight: bold"><span style="color: #000000">dw_not</span></span><span style="color: #990000">(</span>n<span style="color: #990000">*(</span>q<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">)),</span> <span style="font-weight: bold"><span style="color: #000000">dw_yes</span></span><span style="color: #990000">(</span>n<span style="color: #990000">*(</span>q<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">));</span> |
279 | <span style="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</span>i <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span> i <span style="color: #990000"><</span> m <span style="color: #990000">*</span> <span style="color: #990000">(</span>q <span style="color: #990000">+</span> <span style="color: #993399">1</span><span style="color: #990000">);</span> i<span style="color: #990000">++)</span> | |
280 | w<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">=</span> <span style="color: #009900">double</span><span style="color: #990000">(</span> <span style="color: #993399">1.0</span> <span style="color: #990000">/</span> <span style="color: #009900">double</span><span style="color: #990000">(</span>i <span style="color: #990000">+</span> <span style="color: #993399">1.0</span><span style="color: #990000">)</span> <span style="color: #990000">);</span> | |
279 | 281 | dw_not <span style="color: #990000">=</span> check_not<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Reverse</span></span><span style="color: #990000">(</span>q<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">,</span> w<span style="color: #990000">);</span> |
280 | 282 | dw_yes <span style="color: #990000">=</span> check_yes<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">Reverse</span></span><span style="color: #990000">(</span>q<span style="color: #990000">+</span><span style="color: #993399">1</span><span style="color: #990000">,</span> w<span style="color: #990000">);</span> |
281 | 283 | <span style="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</span>j <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span> j <span style="color: #990000"><</span> n<span style="color: #990000">;</span> j<span style="color: #990000">++)</span> |
302 | 304 | r_not <span style="color: #990000">=</span> check_not<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">RevSparseJac</span></span><span style="color: #990000">(</span>m<span style="color: #990000">,</span> s<span style="color: #990000">);</span> |
303 | 305 | r_yes <span style="color: #990000">=</span> check_yes<span style="color: #990000">.</span><span style="font-weight: bold"><span style="color: #000000">RevSparseJac</span></span><span style="color: #990000">(</span>m<span style="color: #990000">,</span> s<span style="color: #990000">);</span> |
304 | 306 | <span style="font-weight: bold"><span style="color: #0000FF">for</span></span><span style="color: #990000">(</span>i <span style="color: #990000">=</span> <span style="color: #993399">0</span><span style="color: #990000">;</span> i <span style="color: #990000"><</span> m<span style="color: #990000">;</span> i<span style="color: #990000">++)</span> |
305 | ok <span style="color: #990000">&=</span> s_not<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">==</span> s_yes<span style="color: #990000">[</span>i<span style="color: #990000">];</span> | |
307 | ok <span style="color: #990000">&=</span> r_not<span style="color: #990000">[</span>i<span style="color: #990000">]</span> <span style="color: #990000">==</span> r_yes<span style="color: #990000">[</span>i<span style="color: #990000">];</span> | |
306 | 308 | |
307 | 309 | |
308 | 310 | <span style="font-style: italic"><span style="color: #9A1900">// compare reverse mode Hessian sparsity patterns</span></span> |
2 | 2 | xmlns:math='http://www.w3.org/1998/Math/MathML' |
3 | 3 | > |
4 | 4 | <head> |
5 | <title>cppad-20170000.3: A Package for Differentiation of C++ Algorithms</title> | |
5 | <title>cppad-20170000.4: A Package for Differentiation of C++ Algorithms</title> | |
6 | 6 | <meta http-equiv='Content-Type' content='text/html' charset='utf-8'/> |
7 | <meta name="description" id="description" content="cppad-20170000.3: A Package for Differentiation of C++ Algorithms"/> | |
8 | <meta name="keywords" id="keywords" content=" cppad-20170000.3: package differentiation c++ algorithms Ad algorithmic automatic C++ algorithm derivative Cppad version cppad.hpp syntax introduction example include file preprocessor symbols namespace "/> | |
7 | <meta name="description" id="description" content="cppad-20170000.4: A Package for Differentiation of C++ Algorithms"/> | |
8 | <meta name="keywords" id="keywords" content=" cppad-20170000.4: package differentiation c++ algorithms Ad algorithmic automatic C++ algorithm derivative Cppad version cppad.hpp syntax introduction example include file preprocessor symbols namespace "/> | |
9 | 9 | <style type='text/css'> |
10 | 10 | body { color : black } |
11 | 11 | body { background-color : white } |
70 | 70 | , |
71 | 71 | |
72 | 72 | |
73 | <center><b><big><big>cppad-20170000.3: A Package for Differentiation of C++ Algorithms</big></big></b></center> | |
73 | <center><b><big><big>cppad-20170000.4: A Package for Differentiation of C++ Algorithms</big></big></b></center> | |
74 | 74 | <br/> |
75 | 75 | <b><big><a name="Syntax" id="Syntax">Syntax</a></big></b> |
76 | 76 |
168 | 168 | |
169 | 169 | current </td><td align='left' valign='top'> |
170 | 170 | EPL </td><td align='left' valign='top'> |
171 | <a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.epl.tgz" target="_top"><span style='white-space: nowrap'>cppad-20170000.3.epl.tgz</span></a> | |
171 | <a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.epl.tgz" target="_top"><span style='white-space: nowrap'>cppad-20170000.4.epl.tgz</span></a> | |
172 | 172 | |
173 | 173 | </td></tr><tr><td align='left' valign='top'> |
174 | 174 | |
175 | 175 | current </td><td align='left' valign='top'> |
176 | 176 | GPL </td><td align='left' valign='top'> |
177 | <a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.gpl.tgz" target="_top"><span style='white-space: nowrap'>cppad-20170000.3.gpl.tgz</span></a> | |
177 | <a href="http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.gpl.tgz" target="_top"><span style='white-space: nowrap'>cppad-20170000.4.gpl.tgz</span></a> | |
178 | 178 | |
179 | 179 | </td></tr> |
180 | 180 | </table> |
89 | 89 | |
90 | 90 | $comment bin/version assumes that : follows cppad version number here$$ |
91 | 91 | $section |
92 | cppad-20170000.3: A Package for Differentiation of C++ Algorithms | |
92 | cppad-20170000.4: A Package for Differentiation of C++ Algorithms | |
93 | 93 | $$ |
94 | 94 | $mindex AD algorithmic differentiation automatic C++ algorithm derivative CppAD version cppad.hpp$$ |
95 | 95 |
0 | // $Id: checkpoint.cpp 3853 2016-12-14 14:40:11Z bradbell $ | |
1 | 0 | /* -------------------------------------------------------------------------- |
2 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-16 Bradley M. Bell | |
1 | CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-17 Bradley M. Bell | |
3 | 2 | |
4 | 3 | CppAD is distributed under multiple licenses. This distribution is under |
5 | 4 | the terms of the |
131 | 130 | |
132 | 131 | // compare reverse mode results |
133 | 132 | CPPAD_TESTVECTOR(double) w(m*(q+1)), dw_not(n*(q+1)), dw_yes(n*(q+1)); |
133 | for(i = 0; i < m * (q + 1); i++) | |
134 | w[i] = double( 1.0 / double(i + 1.0) ); | |
134 | 135 | dw_not = check_not.Reverse(q+1, w); |
135 | 136 | dw_yes = check_yes.Reverse(q+1, w); |
136 | 137 | for(j = 0; j < n; j++) |
157 | 158 | r_not = check_not.RevSparseJac(m, s); |
158 | 159 | r_yes = check_yes.RevSparseJac(m, s); |
159 | 160 | for(i = 0; i < m; i++) |
160 | ok &= s_not[i] == s_yes[i]; | |
161 | ok &= r_not[i] == r_yes[i]; | |
161 | 162 | |
162 | 163 | |
163 | 164 | // compare reverse mode Hessian sparsity patterns |
94 | 94 | $bold version$$ $pre $$ $cnext $bold license$$ $pre $$ $cnext $bold link$$ |
95 | 95 | $rnext |
96 | 96 | current $cnext EPL $cnext $href% |
97 | http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.epl.tgz% | |
98 | cppad-20170000.3.epl.tgz%$$ | |
97 | http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.epl.tgz% | |
98 | cppad-20170000.4.epl.tgz%$$ | |
99 | 99 | $rnext |
100 | 100 | current $cnext GPL $cnext $href% |
101 | http://www.coin-or.org/download/source/CppAD/cppad-20170000.3.gpl.tgz% | |
102 | cppad-20170000.3.gpl.tgz%$$ | |
101 | http://www.coin-or.org/download/source/CppAD/cppad-20170000.4.gpl.tgz% | |
102 | cppad-20170000.4.gpl.tgz%$$ | |
103 | 103 | $tend |
104 | 104 | |
105 | 105 | $subhead Subversion$$ |
1919 | 1919 | ok &= NearEqual(y[0], 6.0 * x[0], eps10, eps10); |
1920 | 1920 | ok &= NearEqual(y[1], 9.0 * x[1], eps10, eps10); |
1921 | 1921 | |
1922 | return ok; | |
1923 | } | |
1924 | ||
1925 | // Test case where if_false case is not used by conditional expression | |
1926 | // but is use after conditional expression. | |
1927 | // (bug fixed 2017-04-02) | |
1928 | bool cond_exp_if_false_used_after(void) | |
1929 | { bool ok = true; | |
1930 | using CppAD::vector; | |
1931 | using CppAD::AD; | |
1932 | using CppAD::NearEqual; | |
1933 | double eps10 = 10.0 * std::numeric_limits<double>::epsilon(); | |
1934 | ||
1935 | vector< AD<double> > ax(2), ay(1); | |
1936 | ax[0] = 1.0; | |
1937 | ax[1] = 2.0; | |
1938 | Independent(ax); | |
1939 | // | |
1940 | AD<double> left = ax[0]; | |
1941 | AD<double> right = ax[1]; | |
1942 | AD<double> if_true = ax[0] + ax[0]; | |
1943 | AD<double> if_false = ax[1] + ax[1]; | |
1944 | // | |
1945 | AD<double> cexp = CondExpLt(left, right, if_true, if_false); | |
1946 | ay[0] = cexp + if_false; | |
1947 | CppAD::ADFun<double> f(ax, ay); | |
1948 | // | |
1949 | if( conditional_skip_ ) | |
1950 | f.optimize(); | |
1951 | else | |
1952 | f.optimize("no_conditional_skip"); | |
1953 | // | |
1954 | // check case where x[0] < x[1] | |
1955 | vector<double> x(2), y(1); | |
1956 | x[0] = 2.0; | |
1957 | x[1] = 4.0; | |
1958 | y = f.Forward(0, x); | |
1959 | ok &= NearEqual(y[0], x[0] + x[0] + x[1] + x[1], eps10, eps10); | |
1960 | ok &= f.number_skip() == 0; | |
1961 | // | |
1962 | // check case where x[0] >= x[1] (if_true is not used) | |
1963 | x[0] = 4.0; | |
1964 | x[1] = 2.0; | |
1965 | y = f.Forward(0, x); | |
1966 | ok &= NearEqual(y[0], x[1] + x[1] + x[1] + x[1], eps10, eps10); | |
1967 | if( conditional_skip_ ) | |
1968 | ok &= f.number_skip() == 1; | |
1969 | else | |
1970 | ok &= f.number_skip() == 0; | |
1971 | // | |
1922 | 1972 | return ok; |
1923 | 1973 | } |
1924 | 1974 | } |
1997 | 2047 | // check case were a variable in left or right expressions |
1998 | 2048 | // is removed during the optimization |
1999 | 2049 | ok &= cond_exp_skip_remove_var(); |
2050 | // check case where an if case is used after the conditional expression | |
2051 | ok &= cond_exp_if_false_used_after(); | |
2000 | 2052 | } |
2001 | 2053 | // |
2002 | 2054 | CppAD::user_atomic<double>::clear(); |