Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How should I enable SSE2 in Visual Studio 2008 builds?

Even though I set ENABLE_SSE and ENABLE_SSE2 to true in CMake, I see that CV_SSE2 is not defined in the generated projects. In internal.hpp, the only place where CV_SSE2 can be defined to 1 is inside a <#if defined __SSE2__ || defined _M_X64 || (defined _M_IX86_FP && _M_IX86_FP >= 2)> block.

It seems that the author(s) expected the compiler to predefine __SSE2__ whenever sse2 instructions are available, but this is not the case with Visual Studio 2008.

What is the best workaround for this bug in OpenCV 2.4.3? Should I manually change internal.hpp, or is there a configuration option that I should know about?