mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-30 09:00:50 +08:00
changes following PR #5
This commit is contained in:
+1
-4
@@ -418,14 +418,13 @@ static bool ComputeMathOpWithNearestNeighbor( const CorePoints& corePoints,
|
||||
ccLog::Print(logMessage);
|
||||
CCCoreLib::NormalizedProgress nProgress(progressCb, pointCount);
|
||||
|
||||
QMutex mutex;
|
||||
double meanNeighborhoodSize = 0;
|
||||
int tenth = pointCount / 10;
|
||||
error.clear();
|
||||
bool cancelled = false;
|
||||
#ifndef _DEBUG
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for num_threads(std::max(1, omp_get_max_threads() - 2))
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < static_cast<int>(pointCount); ++i)
|
||||
@@ -473,9 +472,7 @@ static bool ComputeMathOpWithNearestNeighbor( const CorePoints& corePoints,
|
||||
|
||||
if (progressCb)
|
||||
{
|
||||
mutex.lock();
|
||||
cancelled = !nProgress.oneStep();
|
||||
mutex.unlock();
|
||||
if (cancelled)
|
||||
{
|
||||
//process cancelled by the user
|
||||
|
||||
Reference in New Issue
Block a user