Skip to content

Commit

Permalink
Merge pull request #18991 from alalek:workaround_12959
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Dec 2, 2020
2 parents aac30e7 + d35e2f5 commit 512be4a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 9 additions & 6 deletions modules/core/src/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2429,6 +2429,13 @@ struct IPPInitSingleton
ippTopFeatures = ippCPUID_SSE42;

pIppLibInfo = ippiGetLibVersion();

// workaround: https://github.com/opencv/opencv/issues/12959
std::string ippName(pIppLibInfo->Name ? pIppLibInfo->Name : "");
if (ippName.find("SSE4.2") != std::string::npos)
{
ippTopFeatures = ippCPUID_SSE42;
}
}

public:
Expand Down Expand Up @@ -2468,16 +2475,12 @@ int getIppFeatures()
#endif
}

unsigned long long getIppTopFeatures();

#ifdef HAVE_IPP
unsigned long long getIppTopFeatures()
{
#ifdef HAVE_IPP
return getIPPSingleton().ippTopFeatures;
#else
return 0;
#endif
}
#endif

void setIppStatus(int status, const char * const _funcname, const char * const _filename, int _line)
{
Expand Down
4 changes: 3 additions & 1 deletion modules/ts/src/ts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,9 @@ void SystemInfoCollector::OnTestProgramStart(const testing::UnitTest&)
}
recordPropertyVerbose("cv_cpu_features", "CPU features", cv::getCPUFeaturesLine());
#ifdef HAVE_IPP
recordPropertyVerbose("cv_ipp_version", "Intel(R) IPP version", cv::ipp::useIPP() ? cv::ipp::getIppVersion() : "disabled");
recordPropertyVerbose("cv_ipp_version", "Intel(R) IPP version", cv::ipp::useIPP() ? cv::ipp::getIppVersion() : "disabled");
if (cv::ipp::useIPP())
recordPropertyVerbose("cv_ipp_features", "Intel(R) IPP features code", cv::format("0x%llx", cv::ipp::getIppTopFeatures()));
#endif
#ifdef HAVE_OPENCL
cv::dumpOpenCLInformation();
Expand Down

0 comments on commit 512be4a

Please sign in to comment.