[med-svn] r6586 - trunk/packages/vxl/trunk/debian/patches
Mathieu Malaterre
malat-guest at alioth.debian.org
Mon Apr 18 19:43:31 UTC 2011
Author: malat-guest
Date: 2011-04-18 19:43:25 +0000 (Mon, 18 Apr 2011)
New Revision: 6586
Added:
trunk/packages/vxl/trunk/debian/patches/sse2.patch
Modified:
trunk/packages/vxl/trunk/debian/patches/series
Log:
Fix patch
Modified: trunk/packages/vxl/trunk/debian/patches/series
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/series 2011-04-18 19:10:13 UTC (rev 6585)
+++ trunk/packages/vxl/trunk/debian/patches/series 2011-04-18 19:43:25 UTC (rev 6586)
@@ -4,3 +4,4 @@
vxl.soname3.patch
video4linux.patch
opencl_unix.patch
+sse2.patch
Added: trunk/packages/vxl/trunk/debian/patches/sse2.patch
===================================================================
--- trunk/packages/vxl/trunk/debian/patches/sse2.patch (rev 0)
+++ trunk/packages/vxl/trunk/debian/patches/sse2.patch 2011-04-18 19:43:25 UTC (rev 6586)
@@ -0,0 +1,81 @@
+From b106984cb0a4168913f1c814e1b2775e745989bb Mon Sep 17 00:00:00 2001
+From: Tom Vercauteren <tom.vercauteren at gmail.com>
+Date: Tue, 19 May 2009 09:29:23 -0400
+Subject: [PATCH] COMP: Use vanilla implementation in rounding function when gcc-xml is used
+
+---
+ Utilities/vxl/core/vnl/vnl_math.h | 19 +++++++++++--------
+ 1 files changed, 11 insertions(+), 8 deletions(-)
+
+Index: vxl-1.14.0/core/vnl/vnl_math.h
+===================================================================
+--- vxl-1.14.0.orig/core/vnl/vnl_math.h 2011-04-18 21:42:26.000000000 +0200
++++ vxl-1.14.0/core/vnl/vnl_math.h 2011-04-18 21:42:37.000000000 +0200
+@@ -44,16 +44,20 @@
+ #endif
+
+ // Figure out when the fast implementation can be used
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING
++#if VNL_CONFIG_ENABLE_SSE2_ROUNDING && defined(__SSE2__)
+ # if !VXL_HAS_EMMINTRIN_H
+ # error "Required file emmintrin.h for SSE2 not found"
+ # else
+ # include <emmintrin.h> // sse 2 intrinsics
++# define USE_SSE2_IMPL 1
+ # endif
++#else
++# define USE_SSE2_IMPL 0
+ #endif
+ // Turn on fast impl when using GCC on Intel-based machines with the following exception:
+ // PPC with Mac OS X
+-#if defined(__GNUC__) && (!defined(__APPLE__) || !defined(__ppc__) )
++// GCCXML
++#if defined(__GNUC__) && (defined(__i386__) || defined(__i386) || defined(__x86_64__) || defined(__x86_64)) && (!defined(__APPLE__) || !defined(__ppc__) )
+ # define GCC_USE_FAST_IMPL 1
+ #else
+ # define GCC_USE_FAST_IMPL 0
+@@ -184,7 +188,7 @@
+ // We assume that the rounding mode is not changed from the default
+ // one (or at least that it is always restored to the default one).
+
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING // Fast sse2 implementation
++#if USE_SSE2_IMPL // Fast sse2 implementation
+
+ inline int vnl_math_rnd_halfinttoeven(float x)
+ {
+@@ -295,7 +299,7 @@
+ // We also assume that the rounding mode is not changed from the default
+ // one (or at least that it is always restored to the default one).
+
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING || GCC_USE_FAST_IMPL || VC_USE_FAST_IMPL
++#if USE_SSE2_IMPL || GCC_USE_FAST_IMPL || VC_USE_FAST_IMPL
+
+ inline int vnl_math_rnd_halfintup(float x) { return vnl_math_rnd_halfinttoeven(2*x+0.5f)>>1; }
+ inline int vnl_math_rnd_halfintup(double x) { return vnl_math_rnd_halfinttoeven(2*x+0.5)>>1; }
+@@ -328,7 +332,7 @@
+ // We assume that the rounding mode is not changed from the default
+ // one (or at least that it is always restored to the default one).
+
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING || GCC_USE_FAST_IMPL || VC_USE_FAST_IMPL
++#if USE_SSE2_IMPL || GCC_USE_FAST_IMPL || VC_USE_FAST_IMPL
+
+ inline int vnl_math_rnd(float x) { return vnl_math_rnd_halfinttoeven(x); }
+ inline int vnl_math_rnd(double x) { return vnl_math_rnd_halfinttoeven(x); }
+@@ -350,7 +354,7 @@
+ // We also assume that the rounding mode is not changed from the default
+ // one (or at least that it is always restored to the default one).
+
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING // Fast sse2 implementation
++#if USE_SSE2_IMPL // Fast sse2 implementation
+
+ inline int vnl_math_floor(float x)
+ {
+@@ -435,7 +439,7 @@
+ // We also assume that the rounding mode is not changed from the default
+ // one (or at least that it is always restored to the default one).
+
+-#if VNL_CONFIG_ENABLE_SSE2_ROUNDING // Fast sse2 implementation
++#if USE_SSE2_IMPL // Fast sse2 implementation
+
+ inline int vnl_math_ceil(float x)
+ {
More information about the debian-med-commit
mailing list