adolc/0001-Recompute-the-taylors-for-eq_plus_prod-and-eq_min_pr.patch
Kshitij Kulshreshtha 9775d67623 - Update to upstream version 2.5.1
* Lots of bugfixes
- Added a couple of post release bugfixes from trunk

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/adolc?expand=0&rev=41
2014-08-17 12:23:42 +00:00

76 lines
2.3 KiB
Diff

From dcbe760e6c38394cd29fef04f8b9b3c1db581c3d Mon Sep 17 00:00:00 2001
From: kulshres <kulshres@94ac48a7-3327-4b6a-8511-9a4036a20e83>
Date: Tue, 29 Jul 2014 08:59:42 +0000
Subject: [PATCH] Recompute the taylors for eq_plus_prod and eq_min_prod
correctly
The original logic only worked on the first taylors, so was
correct only for _HOS_ and _HOV_ modes, but not for _HOS_OV_
Signed-off-by: Kshitij Kulshreshtha <kshitij@math.upb.de>
git-svn-id: https://projects.coin-or.org/svn/ADOL-C/trunk@535 94ac48a7-3327-4b6a-8511-9a4036a20e83
---
ADOL-C/src/ho_rev.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/ADOL-C/src/ho_rev.c b/ADOL-C/src/ho_rev.c
index 1f5d6a0..1b5477a 100644
--- a/ADOL-C/src/ho_rev.c
+++ b/ADOL-C/src/ho_rev.c
@@ -1066,9 +1066,14 @@ int hov_ti_reverse(
/* RECOMPUTATION */
ASSIGN_T( Tres, rpp_T[res])
+#if !defined(_HOS_OV_)
deconv1(k,Targ1,Targ2,Tres);
+#endif
- FOR_0_LE_l_LT_p
+ FOR_0_LE_l_LT_p {
+#if _HOS_OV_
+ deconv1(k,Targ1,Targ2,Tres);
+#endif
if (0 == ARES) {
HOV_INC(Aarg1, k1)
HOV_INC(Aarg2, k1)
@@ -1089,7 +1094,9 @@ int hov_ti_reverse(
HOV_INC(Aarg2, k)
HOS_OV_INC(Targ1, k)
HOS_OV_INC(Targ2, k)
+ HOS_OV_INC(Tres, k)
}
+ }
break;
/*--------------------------------------------------------------------------*/
@@ -1109,9 +1116,14 @@ int hov_ti_reverse(
/* RECOMPUTATION */
ASSIGN_T( Tres, rpp_T[res])
+#if !defined(_HOS_OV_)
inconv1(k,Targ1,Targ2,Tres);
+#endif
- FOR_0_LE_l_LT_p
+ FOR_0_LE_l_LT_p {
+#if _HOS_OV_
+ inconv1(k,Targ1,Targ2,Tres);
+#endif
if (0 == ARES) {
HOV_INC(Aarg1, k1)
HOV_INC(Aarg2, k1)
@@ -1132,7 +1144,9 @@ int hov_ti_reverse(
HOV_INC(Aarg2, k)
HOS_OV_INC(Targ1, k)
HOS_OV_INC(Targ2, k)
+ HOS_OV_INC(Tres, k)
}
+ }
break;
/*--------------------------------------------------------------------------*/
--
2.0.1