[med-svn] [iqtree] 02/03: Fix SSE patch provided by Christian Seiler <christian at iwakd.de> to enable portable (and correct) build

Andreas Tille tille at debian.org
Wed Jun 29 11:35:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository iqtree.

commit 2cb169d957b98f33a9c502a75fec460e7c3f39a0
Author: Andreas Tille <tille at debian.org>
Date:   Wed Jun 29 13:31:10 2016 +0200

    Fix SSE patch provided by Christian Seiler <christian at iwakd.de> to enable portable (and correct) build
---
 debian/patches/sse.patch | 111 +++++++++++++++++++++--------------------------
 1 file changed, 49 insertions(+), 62 deletions(-)

diff --git a/debian/patches/sse.patch b/debian/patches/sse.patch
index b21eeed..362a11a 100644
--- a/debian/patches/sse.patch
+++ b/debian/patches/sse.patch
@@ -5,74 +5,61 @@ Last-Update: Tue, 02 Feb 2016 08:41:45 +0100
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -172,7 +172,7 @@
- 	endif()
- 	SET(EXE_SUFFIX "${EXE_SUFFIX}32")
- 	if (GCC OR CLANG) 
--		set(COMBINED_FLAGS "${COMBINED_FLAGS} -m32")
-+		set(COMBINED_FLAGS "${COMBINED_FLAGS}")
-   	endif()
-     add_definitions(-DBINARY32)
- else()
-@@ -237,7 +237,7 @@
- if (VCC)
- 	set(SSE_FLAGS "/arch:SSE2 -D__SSE3__")
- elseif (GCC OR CLANG)
--	set(SSE_FLAGS "-msse3")
-+	set(SSE_FLAGS "")
- elseif (ICC)
- 	if (WIN32)
- 		set(SSE_FLAGS "/arch:SSE3")
-@@ -246,39 +246,6 @@
- 	endif()
- endif()
- 
--if (IQTREE_FLAGS MATCHES "fma") # AVX+FMA instruction set
-- 	message("Vectorization : AVX+FMA")
--	add_definitions(-D__SSE3 -D__AVX) # define both SSE3 and AVX directive
--	if (VCC)
--		# Visual C++ has no /mfma flag!, FMA is only included in AVX2 
--		set(COMBINED_FLAGS "${COMBINED_FLAGS} /arch:AVX2")
--	elseif (CLANG)
--		set(COMBINED_FLAGS "${COMBINED_FLAGS} -mavx -mfma")
--	elseif (GCC)
--		set(COMBINED_FLAGS "${COMBINED_FLAGS} -mavx -fabi-version=0 -mfma")
--	elseif (ICC) 
--		if (WIN32)
--			 set(COMBINED_FLAGS "${COMBINED_FLAGS} /arch:AVX /Qfma")
--		else()
--			 set(COMBINED_FLAGS "${COMBINED_FLAGS} -mavx -mfma")
--		endif()
--	endif()
--
--	SET(EXE_SUFFIX "${EXE_SUFFIX}-fma")
--
--elseif (IQTREE_FLAGS MATCHES "avx") # AVX instruction set
-- 	message("Vectorization : AVX")
--	add_definitions(-D__SSE3 -D__AVX) # define both SSE3 and AVX directive
--	set(COMBINED_FLAGS "${COMBINED_FLAGS} ${AVX_FLAGS}")
--
--	SET(EXE_SUFFIX "${EXE_SUFFIX}-avx")
--else() #SSE intruction set
--	message("Vectorization : SSE3")
--	add_definitions(-D__SSE3)
--
--endif()
--
--
- ##################################################################
- # Setup compiler flags
- ##################################################################
+@@ -1,4 +1,4 @@
+-##################################################################
++	##################################################################
+ # IQ-TREE cmake build definition
+ # Copyright (c) 2012-2015 Bui Quang Minh, Lam Tung Nguyen
+ ##################################################################
+@@ -172,7 +172,7 @@ if(CMAKE_SIZEOF_VOID_P EQUAL 4 OR IQTREE
+ 	endif()
+ 	SET(EXE_SUFFIX "${EXE_SUFFIX}32")
+ 	if (GCC OR CLANG) 
+-		set(COMBINED_FLAGS "${COMBINED_FLAGS} -m32")
++		set(COMBINED_FLAGS "${COMBINED_FLAGS}")
+   	endif()
+     add_definitions(-DBINARY32)
+ else()
+@@ -237,7 +237,7 @@ SET(SSE_FLAGS "")
+ if (VCC)
+ 	set(SSE_FLAGS "/arch:SSE2 -D__SSE3__")
+ elseif (GCC OR CLANG)
+-	set(SSE_FLAGS "-msse3")
++	set(SSE_FLAGS "-msse2")
+ elseif (ICC)
+ 	if (WIN32)
+ 		set(SSE_FLAGS "/arch:SSE3")
+@@ -273,8 +273,7 @@ elseif (IQTREE_FLAGS MATCHES "avx") # AV
+ 
+ 	SET(EXE_SUFFIX "${EXE_SUFFIX}-avx")
+ else() #SSE intruction set
+-	message("Vectorization : SSE3")
+-	add_definitions(-D__SSE3)
++	message("Vectorization : SSE2")
+ 
+ endif()
+ 
 --- a/phylokernel.h
 +++ b/phylokernel.h
-@@ -16,7 +16,9 @@
+@@ -15,6 +15,10 @@
+ inline Vec2d horizontal_add(Vec2d x[2]) {
  #if  INSTRSET >= 3  // SSE3
      return _mm_hadd_pd(x[0],x[1]);
- #else
--#error "You must compile with SSE3 enabled!"
++#elif   INSTRSET >= 2  // SSE3
 +    Vec2d help0 = _mm_shuffle_pd(x[0], x[1], _MM_SHUFFLE2(0,0));
 +    Vec2d help1 = _mm_shuffle_pd(x[0], x[1], _MM_SHUFFLE2(1,1));
 +    return _mm_add_pd(help0, help1);
+ #else
+ #error "You must compile with SSE3 enabled!"
+ #endif
+--- a/pll/pll.h
++++ b/pll/pll.h
+@@ -82,7 +82,7 @@ extern "C" {
+ #define PLL_VECTOR_WIDTH 2
+ 
+ #else
+-#define PLL_BYTE_ALIGNMENT 1
++#define PLL_BYTE_ALIGNMENT 8
+ #define PLL_VECTOR_WIDTH 1
  #endif
- }
  

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/iqtree.git



More information about the debian-med-commit mailing list