[med-svn] r22673 - in trunk/packages/hhsuite/trunk/debian: . patches

Andreas Tille tille at moszumanska.debian.org
Sat Aug 13 05:43:03 UTC 2016


Author: tille
Date: 2016-08-13 05:43:02 +0000 (Sat, 13 Aug 2016)
New Revision: 22673

Added:
   trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1.patch
   trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1_use_inline.patch
Modified:
   trunk/packages/hhsuite/trunk/debian/changelog
   trunk/packages/hhsuite/trunk/debian/patches/series
Log:
Use system defined log2 and log10 to enable build using gcc-6.1


Modified: trunk/packages/hhsuite/trunk/debian/changelog
===================================================================
--- trunk/packages/hhsuite/trunk/debian/changelog	2016-08-12 13:48:35 UTC (rev 22672)
+++ trunk/packages/hhsuite/trunk/debian/changelog	2016-08-13 05:43:02 UTC (rev 22673)
@@ -1,3 +1,10 @@
+hhsuite (2.0.16-7) UNRELEASED; urgency=medium
+
+  * Use system defined log2 and log10 to enable build using gcc-6.1
+    Closes: #831115
+
+ -- Andreas Tille <tille at debian.org>  Sat, 13 Aug 2016 07:27:28 +0200
+
 hhsuite (2.0.16-6) unstable; urgency=medium
 
   * Versioned Build-Depends ffindex0-dev (>= 0.9.9.6-2)

Added: trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1.patch
===================================================================
--- trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1.patch	                        (rev 0)
+++ trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1.patch	2016-08-13 05:43:02 UTC (rev 22673)
@@ -0,0 +1,18 @@
+Description: Use system provided log2 and log10 of gcc-6.1
+Bug-Debian: https://bugs.debian.org/831115
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Sat, 13 Aug 2016 07:27:28 +0200
+
+--- a/src/util.C
++++ b/src/util.C
+@@ -55,8 +55,8 @@ inline int iround(double x) {return int(
+ inline double fmean(double x, double y, double d) { return pow( (pow(x,d)+pow(y,d))/2 ,1./d);}
+ 
+ // log base 2
+-inline float log2(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
+-inline float log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
++//inline float log2(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
++//inline float log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
+ 
+ 
+ /////////////////////////////////////////////////////////////////////////////////////

Added: trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1_use_inline.patch
===================================================================
--- trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1_use_inline.patch	                        (rev 0)
+++ trunk/packages/hhsuite/trunk/debian/patches/gcc-6.1_use_inline.patch	2016-08-13 05:43:02 UTC (rev 22673)
@@ -0,0 +1,79 @@
+Description: Rename redefined log2 to enable build using gcc-6.1
+ Note: May be its just better to use the system provided log2
+  ---> While this patch works syntactically the system provided
+       log2 and log10 are really used since this patch is
+       deactivated but left for discussion as alternative to
+       gcc-6.1
+Bug-Debian: https://bugs.debian.org/831115
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Sat, 13 Aug 2016 07:27:28 +0200
+
+--- a/src/util.C
++++ b/src/util.C
+@@ -55,7 +55,7 @@ inline int iround(double x) {return int(
+ inline double fmean(double x, double y, double d) { return pow( (pow(x,d)+pow(y,d))/2 ,1./d);}
+ 
+ // log base 2
+-inline float log2(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
++inline float log2_i(float x)  {return (x<=0? (float)(-100000):1.442695041*log(x));}
+ inline float log10(float x) {return (x<=0? (float)(-100000):0.434294481*log(x));}
+ 
+ 
+@@ -63,29 +63,29 @@ inline float log10(float x) {return (x<=
+ // fast log base 2
+ /////////////////////////////////////////////////////////////////////////////////////
+ 
+-// Fast log2 
++// Fast log2_i
+ // ATTENTION: need to compile with g++ -fno-strict-aliasing when using -O2 or -O3!!! 
+ // Maximum deviation: +/- 2.1E-5
+-// Run time: ~1.2E-8s on Intel core2 2.13GHz, log2(): 5.4E-8s
++// Run time: ~1.2E-8s on Intel core2 2.13GHz, log2_i(): 5.4E-8s
+ // For a negative argument, -128 is returned.
+ // The function makes use of the representation of 4-byte floating point numbers:
+ // seee eeee emmm mmmm mmmm mmmm mmmm mmmm
+ // s is the sign, eee eee e gives the exponent + 127 (in hex: 0x7f).
+ // The following 23 bits give the mantisse, the binary digits after the decimal 
+ // point:  x = (-1)^s * 1.mmmmmmmmmmmmmmmmmmmmmmm * 2^(eeeeeeee-127)
+-// Therefore,  log2(x) = eeeeeeee-127 + log2(1.mmmmmm...) 
+-//                     = eeeeeeee-127 + log2(1+y),  where y = 0.mmmmmm... 
+-//                     ~ eeeeeeee-127 + ((a*y+b)*y+c)*y 
++// Therefore,  log2_i(x) = eeeeeeee-127 + log2_(1.mmmmmm...) 
++//                       = eeeeeeee-127 + log2_(1+y),  where y = 0.mmmmmm... 
++//                       ~ eeeeeeee-127 + ((a*y+b)*y+c)*y 
+ // The coefficients a, b  were determined by a least squares fit, and c=1-a-b to get 1 at y=1.
+ // Lower/higher order polynomials may be used for faster or more precise calculation:
+-// Order 1: log2(1+y) ~ y                 
+-// Order 2: log2(1+y) = (a*y + 1-a)*y, a=-0.3427                                           
++// Order 1: log2_i(1+y) ~ y                 
++// Order 2: log2_i(1+y) = (a*y + 1-a)*y, a=-0.3427                                           
+ //  => max dev = +/- 8E-3, run time ~ ?
+-// Order 3: log2(1+y) = ((a*y+b)*y + 1-a-b)*y, a=0.1564, b=-0.5773   
++// Order 3: log2_i(1+y) = ((a*y+b)*y + 1-a-b)*y, a=0.1564, b=-0.5773   
+ //  => max dev = +/- 1E-3, run time ~ ?
+-// Order 4: log2(1+y) = (((a*y+b)*y+c)*y + 1-a-b-c)*y, a=-0.0803 b=0.3170 c=-0.6748 
++// Order 4: log2_i(1+y) = (((a*y+b)*y+c)*y + 1-a-b-c)*y, a=-0.0803 b=0.3170 c=-0.6748 
+ //  => max dev = +/- 1.4E-4, run time ~ ?
+-// Order 5: log2(1+y) = ((((a*y+b)*y+c)*y+d)*y + 1-a-b-c-d)*y, 
++// Order 5: log2_i(1+y) = ((((a*y+b)*y+c)*y+d)*y + 1-a-b-c-d)*y, 
+ //     a=0.0440047 b=-0.1903190 c=0.4123442 d=-0.7077702 1-a-b-c-d=1.441740
+ //  => max dev = +/- 2.1E-5, run time ~ 1.2E-8s
+ inline float flog2(float x)
+@@ -155,7 +155,7 @@ __m128 _mm_flog2_ps(__m128 X)
+   R = _mm_add_ps(R, CONST32_D);           // R = ((a*X+b)*X+c)*X+d
+   R = _mm_mul_ps(R, X);                   // R = (((a*X+b)*X+c)*X+d)*X
+   R = _mm_add_ps(R, CONST32_E);           // R = (((a*X+b)*X+c)*X+d)*X+e
+-  R = _mm_mul_ps(R, X);                   // R = ((((a*X+b)*X+c)*X+d)*X+e)*X ~ log2(1+X) !! 
++  R = _mm_mul_ps(R, X);                   // R = ((((a*X+b)*X+c)*X+d)*X+e)*X ~ log2_i(1+X) !! 
+   R = _mm_add_ps(R, _mm_cvtepi32_ps(E));  // convert integer exponent to float and add to mantisse
+   return R;
+ }
+@@ -172,7 +172,7 @@ __m128 _mm_flog2_ps(__m128 X)
+ // In the code, *(int *)&x is an integer which contains the bytes as the 
+ // floating point variable x is represented in memory. The expression 
+ //     (((*(int *)&x) & 0x7f800000 ) >>23 )-0x7f is the exponent eeeeeeee, 
+-// i.e., the largest integer that is smaller than log2(x) (e.g. -1 for 0.9).
++// i.e., the largest integer that is smaller than log2_i(x) (e.g. -1 for 0.9).
+ inline float fast_log2(float x)
+ {
+   static float lg2[1025];         // lg2[i] = log2[1+x/1024]

Modified: trunk/packages/hhsuite/trunk/debian/patches/series
===================================================================
--- trunk/packages/hhsuite/trunk/debian/patches/series	2016-08-12 13:48:35 UTC (rev 22672)
+++ trunk/packages/hhsuite/trunk/debian/patches/series	2016-08-13 05:43:02 UTC (rev 22673)
@@ -8,3 +8,4 @@
 perl_interpreter
 version_bump
 add_Makefile_in_data.patch
+gcc-6.1.patch




More information about the debian-med-commit mailing list