hopefully fixed test failure on Linux

pull/3032/head
Vadim Pisarevsky 11 years ago
parent 24b01a8e4f
commit 222f8a3d5e
  1. 9
      modules/imgproc/src/morph.cpp
  2. 2
      modules/ml/src/boost.cpp
  3. 26
      modules/ml/src/tree.cpp

@ -1221,7 +1221,7 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
IPP_MORPH_CASE(CV_32FC3, 32f_C3R, 32f);
IPP_MORPH_CASE(CV_32FC4, 32f_C4R, 32f);
default:
return false;
;
}
#undef IPP_MORPH_CASE
@ -1253,14 +1253,11 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne
IPP_MORPH_CASE(CV_32FC3, 32f_C3R, 32f);
IPP_MORPH_CASE(CV_32FC4, 32f_C4R, 32f);
default:
return false;
;
}
#undef IPP_MORPH_CASE
#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ >= 8
return false; /// It disables false positive warning in GCC 4.8 and further
#endif
}
return false;
}
static bool IPPMorphOp(int op, InputArray _src, OutputArray _dst,

@ -220,7 +220,6 @@ public:
void updateWeightsAndTrim( int treeidx, vector<int>& sidx )
{
putchar('<');
int i, n = (int)w->sidx.size();
int nvars = (int)varIdx.size();
double sumw = 0., C = 1.;
@ -374,7 +373,6 @@ public:
if( w->sample_weights[si] >= threshold )
sidx.push_back(si);
}
putchar('>'); fflush(stdout);
}
float predictTrees( const Range& range, const Mat& sample, int flags0 ) const

@ -340,26 +340,6 @@ int DTreesImpl::addTree(const vector<int>& sidx )
break;
w_nidx = w->wnodes[w_pidx].right;
#if 1
if( w_nidx < 0 )
{
size_t i, nnodes = w->wnodes.size();
printf("w_pidx = %d\nwnodes (%d): ", w_pidx, (int)n);
for( i = 0; i < nnodes; i++ )
{
printf("[%d. depth=%d parent=%d, left=%d, right=%d] ",
(int)i, w->wnodes[i].depth, w->wnodes[i].parent, w->wnodes[i].left, w->wnodes[i].right);
}
nnodes = nodes.size();
printf("\nnodes (%d): ", (int)nnodes);
for( i = 0; i < nnodes; i++ )
{
printf("[%d. parent=%d, left=%d, right=%d] ", (int)i, nodes[i].parent, nodes[i].left, nodes[i].right);
}
printf("\n");
}
#endif
CV_Assert( w_nidx >= 0 );
}
}
@ -450,8 +430,10 @@ int DTreesImpl::addNodeAndTrySplit( int parent, const vector<int>& sidx )
if( params.useSurrogates )
CV_Error( CV_StsNotImplemented, "surrogate splits are not implemented yet");
w->wnodes[nidx].left = addNodeAndTrySplit( nidx, sleft );
w->wnodes[nidx].right = addNodeAndTrySplit( nidx, sright );
int left = addNodeAndTrySplit( nidx, sleft );
int right = addNodeAndTrySplit( nidx, sright );
w->wnodes[nidx].left = left;
w->wnodes[nidx].right = right;
CV_Assert( w->wnodes[nidx].left > 0 && w->wnodes[nidx].right > 0 );
}

Loading…
Cancel
Save