Merge pull request #4135 from lupustr3:ipp_code_refactoring
This commit is contained in:
@@ -305,6 +305,7 @@ enum BorderTypes {
|
||||
#define CV_SUPPRESS_DEPRECATED_START
|
||||
#define CV_SUPPRESS_DEPRECATED_END
|
||||
#endif
|
||||
#define CV_UNUSED(name) (void)name
|
||||
//! @endcond
|
||||
|
||||
/*! @brief Signals an error and raises the exception.
|
||||
|
@@ -235,9 +235,67 @@ static inline IppDataType ippiGetDataType(int depth)
|
||||
# define IPP_VERSION_X100 0
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IPP_ICV_ONLY
|
||||
#define HAVE_ICV 1
|
||||
#else
|
||||
#define HAVE_ICV 0
|
||||
#endif
|
||||
|
||||
|
||||
#define CV_IPP_CHECK_COND (cv::ipp::useIPP())
|
||||
#define CV_IPP_CHECK() if(CV_IPP_CHECK_COND)
|
||||
|
||||
#ifdef HAVE_IPP
|
||||
|
||||
#ifdef CV_IPP_RUN_VERBOSE
|
||||
#define CV_IPP_RUN_(condition, func, ...) \
|
||||
{ \
|
||||
if (cv::ipp::useIPP() && (condition) && func) \
|
||||
{ \
|
||||
printf("%s: IPP implementation is running\n", CV_Func); \
|
||||
fflush(stdout); \
|
||||
CV_IMPL_ADD(CV_IMPL_IPP); \
|
||||
return __VA_ARGS__; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
printf("%s: Plain implementation is running\n", CV_Func); \
|
||||
fflush(stdout); \
|
||||
} \
|
||||
}
|
||||
#elif defined CV_IPP_RUN_ASSERT
|
||||
#define CV_IPP_RUN_(condition, func, ...) \
|
||||
{ \
|
||||
if (cv::ipp::useIPP() && (condition)) \
|
||||
{ \
|
||||
if(func) \
|
||||
{ \
|
||||
CV_IMPL_ADD(CV_IMPL_IPP); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
setIppErrorStatus(); \
|
||||
CV_Error(cv::Error::StsAssert, #func); \
|
||||
} \
|
||||
return __VA_ARGS__; \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define CV_IPP_RUN_(condition, func, ...) \
|
||||
if (cv::ipp::useIPP() && (condition) && func) \
|
||||
{ \
|
||||
CV_IMPL_ADD(CV_IMPL_IPP); \
|
||||
return __VA_ARGS__; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
#define CV_IPP_RUN_(condition, func, ...)
|
||||
#endif
|
||||
|
||||
#define CV_IPP_RUN(condition, func, ...) CV_IPP_RUN_(condition, func, __VA_ARGS__)
|
||||
|
||||
|
||||
#ifndef IPPI_CALL
|
||||
# define IPPI_CALL(func) CV_Assert((func) >= 0)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user