From 9d8644dee05b5280fa9aa9feb5ded1539d32bf38 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Sun, 5 Dec 2010 02:26:04 +0000 Subject: [PATCH] turn off SSE2 optimization in cv::exp & cv::log in the case of VS2005 or earlier versions, because of missing _mm_cast* intrinsics (ticket #729) --- modules/core/src/mathfuncs.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/core/src/mathfuncs.cpp b/modules/core/src/mathfuncs.cpp index c56312a213..6f107cc374 100644 --- a/modules/core/src/mathfuncs.cpp +++ b/modules/core/src/mathfuncs.cpp @@ -42,6 +42,7 @@ #include "precomp.hpp" + namespace cv { @@ -769,7 +770,13 @@ static const double expTab[] = { 1.9571441241754002690183222516269 * EXPPOLY_32F_A0, 1.9784560263879509682582499181312 * EXPPOLY_32F_A0, }; - + + +// the code below uses _mm_cast* intrinsics, which are not avialable on VS2005 +#if defined _MSC_VER && _MSC_VER < 1500 +#undef CV_SSE2 +#define CV_SSE2 0 +#endif static const double exp_prescale = 1.4426950408889634073599246810019 * (1 << EXPTAB_SCALE); static const double exp_postscale = 1./(1 << EXPTAB_SCALE);