File: sse2-immediate-fix.diff

package info (click to toggle)
libitpp 4.3.1-9
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,604 kB
  • sloc: cpp: 73,626; makefile: 660; python: 548; sh: 261
file content (16 lines) | stat: -rw-r--r-- 604 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
This patch is to fix an issue with g++ 7.3 onwards, where SSE2_SHUFF
needs to be an 8-bit immediate.

diff --git a/itpp/base/random_dsfmt.h b/itpp/base/random_dsfmt.h
index ccbf182..a3d5472 100644
--- a/itpp/base/random_dsfmt.h
+++ b/itpp/base/random_dsfmt.h
@@ -299,7 +299,7 @@ private:
    */
   static void do_recursion(typename Context::w128_t *r, typename Context::w128_t *a, typename Context::w128_t *b, typename Context::w128_t *lung) {
 #if defined(__SSE2__)
-    const unsigned int SSE2_SHUFF = 0x1bU;
+#define SSE2_SHUFF 0x1bU
 
     __m128i x = a->si;
     __m128i z = _mm_slli_epi64(x, SL1);