KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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
Tags (comma-separated)
Save Edits
Cancel