1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

dispatch: added CV_TRY_${OPT} macro, fix dnn build

- 1: OPT is available directly or via dispatcher
- 0: optimization is not compiled at all
This commit is contained in:
Alexander Alekhin
2017-06-27 17:05:15 +03:00
parent 9ee60dbff2
commit f8a75c4361
6 changed files with 47 additions and 19 deletions
@@ -127,7 +127,7 @@ public:
biasMat_ = &biasMat;
dstMat_ = &dstMat;
nstripes_ = nstripes;
useAVX2_ = checkHardwareSupport(CPU_AVX2);
useAVX2_ = CV_CPU_HAS_SUPPORT_AVX2;
}
void operator()(const Range& r) const
@@ -161,7 +161,7 @@ public:
memcpy(sptr, sptr_, vecsize*sizeof(sptr[0]));
#if CV_DNN_TRY_AVX2
#if CV_TRY_AVX2
if( useAVX2_ )
fastGEMM1T_avx2( sptr, wptr, wstep, biasptr, dptr, nw, vecsize);
else