码迷,mamicode.com
首页 > 其他好文 > 详细

high performance program (SSE4.2 intrin instruction)

时间:2014-11-20 17:04:34      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:c   优化   gcc   


In file included from mm_lddqu.si128.c:2:0:
/usr/local/lib/gcc/x86_64-redhat-linux/4.7.1/include/nmmintrin.h:31:3: error: #error "SSE4.2 instruction set not enabled"
这个问题产生的原因:
没有加 
Support for SSSE3 built-in functions and code generation are available via -mssse3.
Support for SSE4.1 built-in functions and code generation are available via -msse4.1.
Support for SSE4.2 built-in functions and code generation are available via -msse4.2.

Both SSE4.1 and SSE4.2 support can be enabled via -msse4.


  1 #include <stdio.h>
  2 #include <nmmintrin.h>
  3 int main()
  4 {
  5         unsigned char pBuf[32];
  6         __m128i i;
  7         __m128i j;
  8         printf("%d\n",sizeof(__m128i));
  9         return 0;
 10 }


complier:
gcc mm_lddqu.si128.c -msse4.2

 
output:
         16

high performance program (SSE4.2 intrin instruction)

标签:c   优化   gcc   

原文地址:http://blog.csdn.net/zhangxxxww/article/details/41315279

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!