Package: openems / 0.0.35+dfsg.1-3

0007-Guard-xmmintrin.h-include-so-it-is-only-used-when-ne.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: =?utf-8?q?Stefan_Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Tue, 27 Mar 2018 02:28:22 +0200
Subject: Guard xmmintrin.h include so it is only used when necessary
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

The x86/SSE specific code for Flush-To-Zero is only used when
SSE_CORRECT_DENORMALS is not defined. Guarding the include allows the
code to compile on e.g. ARM.

Signed-off-by: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
---
 openEMS/FDTD/engine_multithread.cpp | 3 +++
 openEMS/FDTD/engine_sse.cpp         | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/openEMS/FDTD/engine_multithread.cpp b/openEMS/FDTD/engine_multithread.cpp
index 7370198..7ebe0d7 100644
--- a/openEMS/FDTD/engine_multithread.cpp
+++ b/openEMS/FDTD/engine_multithread.cpp
@@ -32,7 +32,10 @@
 #include "boost/date_time/posix_time/posix_time.hpp"
 #include "boost/date_time/gregorian/gregorian.hpp"
 #include <iomanip>
+
+#ifndef SSE_CORRECT_DENORMALS
 #include <xmmintrin.h>
+#endif
 
 //! \brief construct an Engine_Multithread instance
 //! it's the responsibility of the caller to free the returned pointer
diff --git a/openEMS/FDTD/engine_sse.cpp b/openEMS/FDTD/engine_sse.cpp
index 660e6d6..2e06685 100644
--- a/openEMS/FDTD/engine_sse.cpp
+++ b/openEMS/FDTD/engine_sse.cpp
@@ -15,7 +15,10 @@
 *	along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef SSE_CORRECT_DENORMALS
 #include <xmmintrin.h>
+#endif
+
 #include "engine_sse.h"
 
 //! \brief construct an Engine_sse instance