SHARE
TWEET

Untitled

a guest Dec 13th, 2015 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. immortal.c: In function 'test_e':
  2. immortal.c:179:33: warning: passing argument 1 of '_mm_loadu_si128' from incompatible pointer type
  3.     __m128i am = _mm_loadu_si128(a + m);
  4.                                  ^
  5. In file included from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:1258:0,
  6.                  from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/x86intrin.h:31,
  7.                  from immortal.c:11:
  8. /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:692:1: note: expected 'const __vector(2) long long int *' but argument is of type 'char *'
  9.  _mm_loadu_si128 (__m128i const *__P)
  10.  ^
  11. immortal.c:180:33: warning: passing argument 1 of '_mm_loadu_si128' from incompatible pointer type
  12.     __m128i ak = _mm_loadu_si128(a + k);
  13.                                  ^
  14. In file included from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/xmmintrin.h:1258:0,
  15.                  from /usr/lib/gcc/x86_64-linux-gnu/4.9/include/x86intrin.h:31,
  16.                  from immortal.c:11:
  17. /usr/lib/gcc/x86_64-linux-gnu/4.9/include/emmintrin.h:692:1: note: expected 'const __vector(2) long long int *' but argument is of type 'char *'
  18.  _mm_loadu_si128 (__m128i const *__P)
  19.  ^
  20. immortal.c:186:2: warning: format '%d' expects argument of type 'int', but argument 2 has type '__m128i' [-Wformat=]
  21.   printf("%d\n", sum);
  22.   ^
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30. void test_e() {
  31.         int top = 999999999;
  32.  
  33.         char *a;
  34.         a = (/*unsigned*/ char*) calloc(top+1, sizeof(/*unsigned*/ char));
  35.  
  36. __m128i sum = _mm_setzero_si128();
  37. for (int m = 1, k = top - 15; m < k; m += 16, k -= 16) {
  38.    __m128i am = _mm_loadu_si128(a + m);
  39.    __m128i ak = _mm_loadu_si128(a + k);
  40.    ak = _mm_shuffle_epi8(ak, _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15));
  41.    sum = _mm_add_epi16(sum, _mm_maddubs_epi16(am, ak));
  42. }
  43.  
  44.         printf("%d\n", sum);
  45.  
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top