add universal hardware support check function
* use hasSIMD128 rather than calling checkHardwareSupport * add SIMD check in spartialgradient.cpp * add SIMD check in stereosgbm.cpp * add SIMD check in canny.cpp
This commit is contained in:
@@ -301,7 +301,7 @@ public:
|
||||
void operator()(const Range &boundaries) const
|
||||
{
|
||||
#if CV_SIMD128
|
||||
bool haveSIMD = checkHardwareSupport(CV_CPU_SSE2) || checkHardwareSupport(CV_CPU_NEON);
|
||||
bool haveSIMD = hasSIMD128();
|
||||
#endif
|
||||
|
||||
const int type = src.type(), cn = CV_MAT_CN(type);
|
||||
@@ -709,7 +709,7 @@ public:
|
||||
uchar* pdst = dst.ptr() + (ptrdiff_t)(dst.step * boundaries.start);
|
||||
|
||||
#if CV_SIMD128
|
||||
bool haveSIMD = checkHardwareSupport(CV_CPU_SSE2) || checkHardwareSupport(CV_CPU_NEON);
|
||||
bool haveSIMD = hasSIMD128();
|
||||
#endif
|
||||
|
||||
for (int i = boundaries.start; i < boundaries.end; i++, pmap += mapstep, pdst += dst.step)
|
||||
@@ -962,7 +962,7 @@ static void CannyImpl(Mat& dx, Mat& dy, Mat& dst,
|
||||
#define CANNY_POP(d) (d) = *--stack_top
|
||||
|
||||
#if CV_SIMD128
|
||||
bool haveSIMD = checkHardwareSupport(CV_CPU_SSE2) || checkHardwareSupport(CV_CPU_NEON);
|
||||
bool haveSIMD = hasSIMD128();
|
||||
#endif
|
||||
|
||||
// calculate magnitude and angle of gradient, perform non-maxima suppression.
|
||||
|
||||
Reference in New Issue
Block a user