Fix bug in FixSparseHes without having to upload 20170000.2

This commit is contained in:
Brad Bell 2017-02-16 07:14:26 -07:00
commit 4ecffefcd8

View file

@ -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 <bradbell at seanet dot com> - 20170000.1-3
- patch source to fix bug in ForSparseHes.
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 20170000.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild