Please help me in enbaling the SSE 3 and SSE 4.2 in visual studio 2010 ultimate. I am currently working on a sandy bridge processor based desktopplatform running on win 7 SP1. The AVX option is getting enabled through /arch:AVX command line option, but not SSE options. I just have options of enabling SSE and SSE2, not higher versions. I tried with/QxAVX, /QaxAVX,/arch:SSE, /arch:SSE2...when I tried to compile the code , it is ignoring these options. It is just accepting /arch:AVX. I want the SSE 3.0 and higheroptionsto be enabled in this tool.Please help.
If you are running a Visual Studio project, you must select Intel C++ in order to use Intel compiler and associated options.
When you made a similar post on Intel C++ forum, the assumption was that you had selected or at least installed Intel C++, but your post here leaves it in doubt. Please choose a single forum most appropriate to your question.
VS2012 supports /arch:SSE2 and /arch:AVX, but not options which aren't applicable to AMD platforms. I guess VS2010 may accept /arch:AVX but not do much useful with it.
AFAIK, MSVC doesn't generate any advanced SSE code (VS2012 is claimed to have a vectorizer, but I don't know how clever it is and what instruction set it uses). The /arch: switches mostly control how the floating point computations are compiled - to be performed by x87 FPU or SSE (the latter being the default). I think, /arch:AVX is mostly equivalent to /arch:SSE2, except it makes SSE code VEX-encoded, but I didn't verify that.
Anyway, unlike GCC, in MSVC all SSE/AVX intrinsics are available regardless of this compiler switch, you just have to include immintrin.h. It is your responsibility though to perform a CPU check and dispatch to the code version that suits the CPU.
Can i know what is the processor that you are using? Is it intel or non-intel processor? However you can install CPU-Z and see the instructions specified by this tool. See if you have SSE3 and SSE4.x.
Sukruth H V
So the issue here is that, You have not selected the Intel C++ compiler and you are using the Visual C++ compiler. Please select Intel C++ compiler and then goto Properties --> Code Generation [Intel C++] --> Intel Processor-Specific Optimization and then select the SIMD instruction set that you desire. This is what even Tim P wanted to convey.
Sukruth H V