mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #21937 from Kumataro:4.x-fix-21911
* Fix warnings for clang15 * Fix warnings: Remove unnecessary code * Fix warnings: Remove unnecessary code
This commit is contained in:
@@ -133,8 +133,6 @@ cvCreateChildMemStorage( CvMemStorage * parent )
|
||||
static void
|
||||
icvDestroyMemStorage( CvMemStorage* storage )
|
||||
{
|
||||
int k = 0;
|
||||
|
||||
CvMemBlock *block;
|
||||
CvMemBlock *dst_top = 0;
|
||||
|
||||
@@ -144,7 +142,7 @@ icvDestroyMemStorage( CvMemStorage* storage )
|
||||
if( storage->parent )
|
||||
dst_top = storage->parent->top;
|
||||
|
||||
for( block = storage->bottom; block != 0; k++ )
|
||||
for( block = storage->bottom; block != 0; )
|
||||
{
|
||||
CvMemBlock *temp = block;
|
||||
|
||||
|
||||
@@ -253,11 +253,8 @@ static int initialize_simplex(Mat_<double>& c, Mat_<double>& b,double& v,vector<
|
||||
}
|
||||
|
||||
static int inner_simplex(Mat_<double>& c, Mat_<double>& b,double& v,vector<int>& N,vector<int>& B,vector<unsigned int>& indexToRow){
|
||||
int count=0;
|
||||
for(;;){
|
||||
dprintf(("iteration #%d\n",count));
|
||||
count++;
|
||||
|
||||
for(;;){
|
||||
static MatIterator_<double> pos_ptr;
|
||||
int e=-1,pos_ctr=0,min_var=INT_MAX;
|
||||
bool all_nonzero=true;
|
||||
|
||||
@@ -988,7 +988,6 @@ void parallelForFinalize(const Region& rootRegion)
|
||||
std::vector<TraceManagerThreadLocal*> threads_ctx;
|
||||
getTraceManager().tls.gather(threads_ctx);
|
||||
RegionStatistics parallel_for_stat;
|
||||
int threads = 0;
|
||||
for (size_t i = 0; i < threads_ctx.size(); i++)
|
||||
{
|
||||
TraceManagerThreadLocal* child_ctx = threads_ctx[i];
|
||||
@@ -996,7 +995,6 @@ void parallelForFinalize(const Region& rootRegion)
|
||||
if (child_ctx && child_ctx->stackTopRegion() == &rootRegion)
|
||||
{
|
||||
CV_LOG_PARALLEL(NULL, "Thread=" << child_ctx->threadID << " " << child_ctx->stat);
|
||||
threads++;
|
||||
RegionStatistics child_stat;
|
||||
child_ctx->stat.grab(child_stat);
|
||||
parallel_for_stat.append(child_stat);
|
||||
@@ -1012,6 +1010,7 @@ void parallelForFinalize(const Region& rootRegion)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float parallel_coeff = std::min(1.0f, duration / (float)(parallel_for_stat.duration));
|
||||
CV_LOG_PARALLEL(NULL, "parallel_coeff=" << 1.0f / parallel_coeff);
|
||||
CV_LOG_PARALLEL(NULL, parallel_for_stat);
|
||||
|
||||
Reference in New Issue
Block a user