From 4ecffefcd814e1569d09431652391f265499fd22 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Feb 16 2017 14:14:26 +0000 Subject: Fix bug in FixSparseHes without having to upload 20170000.2 --- diff --git a/cppad.spec b/cppad.spec index c000bca..5c3bc8e 100644 --- a/cppad.spec +++ b/cppad.spec @@ -18,7 +18,7 @@ # Release starts with 1; https://fedoraproject.org/wiki/Packaging:Versioning Name: cppad Version: 20170000.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc # Only noarch.rpms provided. The user can compile with or without debugging @@ -89,7 +89,32 @@ cat << EOF > junk.sed s|NearEqual(jfac\\*\\([^,]*\\), *value *, *eps99 *, *eps99)|NearEqual(\\1, value/jfac, eps99, eps99)| EOF sed -i test_more/div.cpp -f junk.sed - +# +# Bug fix corresponding to 20170000.2. (should not be necessary for 2018) +sed -n -e '1,475p' cppad/local/for_hes_sweep.hpp > junk.tmp +cat << EOF >> junk.tmp + { typename Vector_set::const_iterator + itr_i(for_jac_sparse, i_x); + size_t ix = *itr_i; + while( ix < for_jac_sparse.end() ) + { for_hes_sparse.binary_union( + ix, ix, j_x, for_jac_sparse + ); + ix = *(++itr_i); + } + typename Vector_set::const_iterator + itr_j(for_jac_sparse, j_x); + size_t jx = *itr_j; + while( jx < for_jac_sparse.end() ) + { for_hes_sparse.binary_union( + jx, jx, i_x, for_jac_sparse + ); + jx = *(++itr_j); + } + } +EOF +sed -n -e '482,$p' cppad/local/for_hes_sweep.hpp >> junk.tmp +mv junk.tmp cppad/local/for_hes_sweep.hpp # # ----------------------------------------------------------------------------- # Replace cppad_SOURCE_DIR by the system include directory so that @@ -178,6 +203,9 @@ make check # ---------------------------------------------------------------------------- %changelog +* Thu Feb 16 2017 Brad Bell - 20170000.1-3 +- patch source to fix bug in ForSparseHes. + * Fri Feb 10 2017 Fedora Release Engineering - 20170000.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild