mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Replace pow with std::pow
The C pow casts to double while std::pow has overloads that can be optimized by the compiler. Also replace pow(*, 1./3) by cbrt.
This commit is contained in:
@@ -942,7 +942,7 @@ void CvCascadeBoostTree::write( FileStorage &fs, const Mat& featureMap )
|
||||
int maxCatCount = ((CvCascadeBoostTrainData*)data)->featureEvaluator->getMaxCatCount();
|
||||
int subsetN = (maxCatCount + 31)/32;
|
||||
queue<CvDTreeNode*> internalNodesQueue;
|
||||
int size = (int)pow( 2.f, (float)ensemble->get_params().max_depth);
|
||||
int size = (int)std::pow( 2, ensemble->get_params().max_depth);
|
||||
std::vector<float> leafVals(size);
|
||||
int leafValIdx = 0;
|
||||
int internalNodeIdx = 1;
|
||||
|
||||
Reference in New Issue
Block a user