SIMD version check
I am using Intel Core2Duo E4500 processor. 开发者_运维问答It is supposed to have SSE3, SSSE3 facilities. But if I try to use them in programs it shows the following error "SSE3 instruction set not enabled"
Any ideas?
On Linux, have a look at the flags
field of the output of cat /proc/cpuinfo
Try adding this gcc command line options:
-march=core2 -msse3
And probably is also a good idea to turn on sse optimizations for floating point operations:
-mfpmath=sse
Use CPU-Z to check for available instruction sets.
If you're using Visual Studio, there's an option in C/C++ -> Code Generation -> Enable Enhanced Instruction Set
.
Here's how to enable it in gcc.
From the above link:
-msse3
-mssse3
If you compile on the same machine where you will be executing your code, with any recent gcc you should be able to use -march=native
to take advantage of all your CPU features. It should tell you during compilation then, if you are using unsupported instructions in your asm
.
精彩评论