changes following PR #5

This commit is contained in:
Paul Leroy
2024-02-16 11:34:52 +01:00
parent 4b4227bf6a
commit 992f5d4c8c
8 changed files with 6 additions and 17 deletions
+1 -1
View File
@@ -194,7 +194,7 @@ bool ContextBasedFeature::prepare( const CorePoints& corePoints,
bool cancelled = false;
#ifndef _DEBUG
#if defined(_OPENMP)
#pragma omp parallel for num_threads(omp_get_max_threads())
#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)
-3
View File
@@ -75,7 +75,6 @@ namespace masc
, kNN(p_kNN)
, ctxClassLabel(p_ctxClassLabel)
, sf(nullptr)
// , sfWasAlreadyExisting(false)
{
scale = p_scale;
}
@@ -104,7 +103,5 @@ namespace masc
int ctxClassLabel;
//! The computed scalar
CCCoreLib::ScalarField* sf;
//! Whether the SF pre-exists
// bool sfWasAlreadyExisting;
};
}
-2
View File
@@ -151,8 +151,6 @@ namespace masc
: type(p_type)
, sf1(nullptr)
, sf2(nullptr)
// , sf1WasAlreadyExisting(false)
// , sf2WasAlreadyExisting(false)
{
}
+1 -4
View File
@@ -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
-3
View File
@@ -148,9 +148,6 @@ namespace masc
, field2(nullptr)
, statSF1(nullptr)
, statSF2(nullptr)
// , statSF1WasAlreadyExisting(false)
// , statSF2WasAlreadyExisting(false)
//, keepStatSF2(false)
{
//auomatically set the right source for specific features
switch (type)
+2 -2
View File
@@ -32,8 +32,8 @@ QColor getColor(double value, double r1, double g1, double b1)
return QColor(r, g, b);
}
ConfusionMatrix::ConfusionMatrix(const std::vector<ScalarType> &actual, const std::vector<ScalarType> &predicted) :
ui(new Ui::ConfusionMatrix)
ConfusionMatrix::ConfusionMatrix(const std::vector<ScalarType> &actual, const std::vector<ScalarType> &predicted)
: ui(new Ui::ConfusionMatrix)
{
ui->setupUi(this);
this->setWindowFlag(Qt::WindowStaysOnTopHint);
+1 -1
View File
@@ -211,7 +211,7 @@ bool Classifier::classify( const Feature::Source::Set& featureSources,
#ifndef _DEBUG
#if defined(_OPENMP)
#pragma omp parallel for
#pragma omp parallel for num_threads(omp_get_max_threads() - 2)
#endif
#endif
for (int i = 0; i < static_cast<int>(cloud->size()); ++i)
+1 -1
View File
@@ -1235,7 +1235,7 @@ bool Tools::PrepareFeatures(const CorePoints& corePoints, Feature::Set& features
#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)