Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

print a __m128i variable

$
0
0

I'm trying to learn to code using intrinsics and below is a code which does addition

compiler used: icc

#include<stdio.h>#include<emmintrin.h>int main(){        __m128i a = _mm_set_epi32(1,2,3,4);        __m128i b = _mm_set_epi32(1,2,3,4);        __m128i c;        c = _mm_add_epi32(a,b);        printf("%d\n",c[2]);        return 0;}

I get the below error:

test.c(9): error: expression must have pointer-to-object type        printf("%d\n",c[2]);

How do I print the values in the variable c which is of type __m128i


Viewing all articles
Browse latest Browse all 12111

Trending Articles