[med-svn] [Git][med-team/bart][master] 4 commits: backport fixes

Martin Uecker (@uecker-guest) gitlab at salsa.debian.org
Thu Oct 13 19:09:37 BST 2022



Martin Uecker pushed to branch master at Debian Med / bart


Commits:
184e0ce7 by Martin Uecker at 2022-10-13T19:35:55+02:00
backport fixes

- - - - -
ca40d8dd by Martin Uecker at 2022-10-13T19:36:54+02:00
unit tests on more archs

- - - - -
1820138f by Martin Uecker at 2022-10-13T20:08:35+02:00
turn off some optimizations for some archs

- - - - -
e4b40717 by Martin Uecker at 2022-10-13T20:08:35+02:00
update copyright

- - - - -


5 changed files:

- debian/changelog
- debian/copyright
- + debian/patches/0009-backport-specfun-fixes.patch
- debian/patches/series
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+bart (0.8.00-2) UNRELEASED; urgency=medium
+
+  * Backport fixes for upstream (should also fix 32-bit archs)
+  * Turn on tests for more archs.
+  * Turn off some optimizations for some archs.
+  * Update debian copyright.
+
+ -- Martin Uecker <uecker at tugraz.at>  Thu, 13 Oct 2022 19:30:06 +0200
+
 bart (0.8.00-1) unstable; urgency=medium
 
   * Turn off LTO build due to GCC bug #1017849. (Closes: #1015357)


=====================================
debian/copyright
=====================================
@@ -5,20 +5,23 @@ Source: https://github.com/mrirecon/bart
 
 Files: *
 Copyright: 2013-2020 The Regents of the University of California
-           2015-2021 Martin Uecker
-           2015-2021 Uecker Lab. University Medical Center Goettingen
+           2015-2022 Martin Uecker
+           2021-2022 Graz Technical University
+           2015-2022 Uecker Lab. University Medical Center Goettingen
            2017-2021 Massachusetts Institute of Technology
            2017      University of Oxford
            2012,2017 Intel Corporation
            2014-2016 Joseph Y Cheng
            2013,2015 Tao Zhang
            2016      Tim Loderhose
-           2016             David Smith
+           2016      David Smith
            2016      Hans Johnson
            2017-2018 Damien Nguyen
            2017-2019 Christian Holme
            2017-2020 Sebastian Rosenzweig
-           2020             Martin Krämer
+           2019-2021 Aurélien Trotier
+           2020      Martin Krämer
+           2021	     Tamás Hakkel
 License: BSD-3-clause
  All rights reserved.
  .


=====================================
debian/patches/0009-backport-specfun-fixes.patch
=====================================
@@ -0,0 +1,166 @@
+From: Martin Uecker <martin.uecker at med.uni-goettingen.de>
+Date: Thu, 13 Oct 2022 19:29:39 +0200
+Subject: backport specfun fixes
+
+---
+ src/num/specfun.c | 122 +++++++++++++++++++++++++++++++++---------------------
+ 1 file changed, 74 insertions(+), 48 deletions(-)
+
+diff --git a/src/num/specfun.c b/src/num/specfun.c
+index a253442..79a18cc 100644
+--- a/src/num/specfun.c
++++ b/src/num/specfun.c
+@@ -55,7 +55,7 @@ double bessel_i0(double x)
+ 
+ 
+ 
+-static long factorial(long k)
++static double factorial(int k)
+ {
+ 	return (0 == k) ? 1 : (k * factorial(k - 1));
+ }
+@@ -75,6 +75,11 @@ double Si_power(double x)
+ }
+ 
+ 
++static double horner(double x, int N, const double coeff[N])
++{
++	return coeff[0] + ((1 == N) ? 1. : (x * horner(x, N - 1, coeff + 1)));
++}
++
+ // Efficient and accurate calculation of Sine Integral using Padé approximants of the convergent Taylor series
+ // For details see:
+ // 	Rowe, B., et al.
+@@ -86,64 +91,85 @@ double Si_power(double x)
+ // helper function to calculate Si accurate for large arguments (> 4)
+ static double Si_help_f(double x)
+ {
+-	double num =	1
+-			+ 7.44437068161936700618 * 10E2		* pow(x,-2)
+-			+ 1.96396372895146869801 * 10E5		* pow(x,-4)
+-			+ 2.37750310125431834034 * 10E7		* pow(x,-6)
+-			+ 1.43073403821274636888 * 10E9		* pow(x,-8)
+-			+ 4.33736238870432522765 * 10E10	* pow(x,-10)
+-			+ 6.40533830574022022911 * 10E11	* pow(x,-12)
+-			+ 4.20968180571076940208 * 10E12	* pow(x,-14)
+-			+ 1.00795182980368574617 * 10E13	* pow(x,-16)
+-			+ 4.94816688199951963482 * 10E12	* pow(x,-18)
+-			- 4.94701168645415959931 * 10E11	* pow(x,-20);
+-
+-	double denum =	1
+-			+ 7.46437068161927678031 * 10E2		* pow(x,-2)
+-			+ 1.97865247031583951450 * 10E5		* pow(x,-4)
+-			+ 2.41535670165126845144 * 10E7		* pow(x,-6)
+-			+ 1.47478952192985464958 * 10E9		* pow(x,-8)
+-			+ 4.58595115847765779830 * 10E10	* pow(x,-10)
+-			+ 7.08501308149515401563 * 10E11	* pow(x,-12)
+-			+ 5.06084464593475076774 * 10E12	* pow(x,-14)
+-			+ 1.43468549171581016479 * 10E13	* pow(x,-16)
+-			+ 1.11535493509914254097 * 10E13	* pow(x,-18);
++	double num_coeff[] = {
++		+1.,
++		+7.44437068161936700618e2,
++		+1.96396372895146869801e5,
++		+2.37750310125431834034e7,
++		+1.43073403821274636888e9,
++		+4.33736238870432522765e10,
++		+6.40533830574022022911e11,
++		+4.20968180571076940208e12,
++		+1.00795182980368574617e13,
++		+4.94816688199951963482e12,
++		-4.94701168645415959931e11,
++	};
++
++	double denum_coeff[] = {
++		+1.,
++		+7.46437068161927678031e2,
++		+1.97865247031583951450e5,
++		+2.41535670165126845144e7,
++		+1.47478952192985464958e9,
++		+4.58595115847765779830e10,
++		+7.08501308149515401563e11,
++		+5.06084464593475076774e12,
++		+1.43468549171581016479e13,
++		+1.11535493509914254097e13,
++	};
++
++	double X = 1. / (x * x);
++	double num = horner(X, ARRAY_SIZE(num_coeff), num_coeff);
++	double denum = horner(X, ARRAY_SIZE(denum_coeff), denum_coeff);
+ 
+ 	return num / denum / x;
+ }
+ 
++
++
++
+ // helper function to calculate Si accurate for large arguments (> 4)
+ static double Si_help_g(double x)
+ {
+-	double num =	1
+-			+ 8.1359520115168615 * 10E2	* pow(x,-2)
+-			+ 2.35239181626478200 * 10E5	* pow(x,-4)
+-			+ 3.12557570795778731 * 10E7	* pow(x,-6)
+-			+ 2.06297595146763354 * 10E9	* pow(x,-8)
+-			+ 6.83052205423625007 * 10E10	* pow(x,-10)
+-			+ 1.09049528450362786 * 10E12	* pow(x,-12)
+-			+ 7.57664583257834349 * 10E12	* pow(x,-14)
+-			+ 1.81004487464664575 * 10E13	* pow(x,-16)
+-			+ 6.43291613143049485 * 10E12	* pow(x,-18)
+-			- 1.36517137670871689 * 10E12	* pow(x,-20);
+-
+-	double denum =	1
+-			+ 8.19595201151451564 * 10E2	* pow(x,-2)
+-			+ 2.40036752835578777 * 10E5	* pow(x,-4)
+-			+ 3.26026661647090822 * 10E7	* pow(x,-6)
+-			+ 2.23355543278099360 * 10E9	* pow(x,-8)
+-			+ 7.87465017341829930 * 10E10	* pow(x,-10)
+-			+ 1.39866710696414565 * 10E12	* pow(x,-12)
+-			+ 1.17164723371736605 * 10E13	* pow(x,-14)
+-			+ 4.01839087307656620 * 10E13	* pow(x,-16)
+-			+ 3.99653257887490811 * 10E13	* pow(x,-18);
+-
+-	return ((x < 0) ? -1 : 1) * num / denum / x / x;
++	double num_coeff[] = {
++		+1.,
++		+8.13595201151686150e2,
++		+2.35239181626478200e5,
++		+3.12557570795778731e7,
++		+2.06297595146763354e9,
++		+6.83052205423625007e10,
++		+1.09049528450362786e12,
++		+7.57664583257834349e12,
++		+1.81004487464664575e13,
++		+6.43291613143049485e12,
++		-1.36517137670871689e12,
++	};
++
++	double denum_coeff[] = {
++		+1.,
++		+8.19595201151451564e2,
++		+2.40036752835578777e5,
++		+3.26026661647090822e7,
++		+2.23355543278099360e9,
++		+7.87465017341829930e10,
++		+1.39866710696414565e12,
++		+1.17164723371736605e13,
++		+4.01839087307656620e13,
++		+3.99653257887490811e13,
++	};
++
++
++	double X = 1. / (x * x);
++
++	double num = horner(X, ARRAY_SIZE(num_coeff), num_coeff);
++	double denum = horner(X, ARRAY_SIZE(denum_coeff), denum_coeff);
++
++	return ((x < 0) ? -1 : 1) * X * (num / denum);
+ }
+ 
+ static double Si_large_x(double x)
+ {
+-	return M_PI / 2 - Si_help_f(x) * cos(x) - Si_help_g(x) * sin(x);
++	return M_PI / 2. - Si_help_f(x) * cos(x) - Si_help_g(x) * sin(x);
+ }
+ 
+ double Si(double x)


=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@
 0006-on-Deban-never-use-git-version.patch
 0007-add-CXXFLAGS-to-nvcc-to-fix-C-build-issue.patch
 0008-relax-a-failing-test.patch
+0009-backport-specfun-fixes.patch


=====================================
debian/rules
=====================================
@@ -11,13 +11,20 @@ export PREFIX=/usr/
 export PARALLEL=1
 export PARALLEL_NJOBS=1
 
+# some archs require turning of some optimizations
+NOEXPOPT_ARCHS=arm64 ppc64el s390x ia64 powerpc ppc64 riscv64
+
+ifneq (,$(filter $(NOEXPOPT_ARCHS), $(DEB_BUILD_ARCH)))
+export DEB_CFLAGS_MAINT_APPEND = -fno-expensive-optimizations
+endif
+
 # Some tests fail on the following architectures probably
 # due to minor differences in floating point processing.
 # For now, just turn it off...
-NOTEST_ARCHS=armel armhf mips mipsel hurd-i386 kfreebsd-i386 m68k powerpcspe sh4
+NOTEST_ARCHS=hurd-i386 kfreebsd-i386 m68k powerpcspe sh4
 
 # For this architesture the test will be run but it will pass in any case even when errors occure
-PRINT_ERRORS_WHEN_TESTING=i386
+PRINT_ERRORS_WHEN_TESTING=armel armhf mips mipsel
 
 %:
 	dh $@



View it on GitLab: https://salsa.debian.org/med-team/bart/-/compare/5459c39ad2eb2a0598a66ad62ce825b66e644833...e4b407173d78296d2d53e301e48a92d2ba7857da

-- 
View it on GitLab: https://salsa.debian.org/med-team/bart/-/compare/5459c39ad2eb2a0598a66ad62ce825b66e644833...e4b407173d78296d2d53e301e48a92d2ba7857da
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20221013/b06d0172/attachment-0001.htm>


More information about the debian-med-commit mailing list