Commit 9d8644de authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

turn off SSE2 optimization in cv::exp & cv::log in the case of VS2005 or earlier…

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)
parent 9dfb15db
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "precomp.hpp" #include "precomp.hpp"
namespace cv namespace cv
{ {
...@@ -771,6 +772,12 @@ static const double expTab[] = { ...@@ -771,6 +772,12 @@ static const double expTab[] = {
}; };
// 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_prescale = 1.4426950408889634073599246810019 * (1 << EXPTAB_SCALE);
static const double exp_postscale = 1./(1 << EXPTAB_SCALE); static const double exp_postscale = 1./(1 << EXPTAB_SCALE);
static const double exp_max_val = 3000.*(1 << EXPTAB_SCALE); // log10(DBL_MAX) < 3000 static const double exp_max_val = 3000.*(1 << EXPTAB_SCALE); // log10(DBL_MAX) < 3000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment