From 4a14ae88548ed44665ea019f772aef5734e08205 Mon Sep 17 00:00:00 2001 From: Paul Leroy Date: Sun, 23 Mar 2025 20:26:12 +0100 Subject: [PATCH] create local variable in OPENMP loop in G3PointAction.cpp --- CMakeLists.txt | 2 +- LICENCE.txt | 20 ++++++++++++++++++++ src/G3PointAction.cpp | 10 ++++++---- 3 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 LICENCE.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 09e9e7f..bb19a84 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ target_sources(G3PointPlugin ui/WolmanCustomPlot.ui ) - set(QG3POINT_PLUGIN_VERSION "0.4") + set(QG3POINT_PLUGIN_VERSION "0.5") add_subdirectory( include ) add_subdirectory( src ) diff --git a/LICENCE.txt b/LICENCE.txt new file mode 100644 index 0000000..0672827 --- /dev/null +++ b/LICENCE.txt @@ -0,0 +1,20 @@ +//########################################################################## +//# # +//# G3POINT PLUGIN FOR CLOUDCOMPARE # +//# # +//# This program is free software: you can redistribute it and/or modify # +//# it under the terms of the GNU General Public License as published by # +//# the Free Software Foundation, either version 3 of the License, # +//# or (at your option) any later version. # +//# # +//# This program is distributed in the hope that it will be useful, # +//# but WITHOUT ANY WARRANTY; without even the implied warranty of # +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +//# GNU General Public License for more details. # +//# # +//# You should have received a copy of the GNU General Public License # +//# along with this program. If not, see . # +//# # +//# COPYRIGHT: CNRS / OSERen / UNIVERSITY OF RENNES # +//# # +//########################################################################## diff --git a/src/G3PointAction.cpp b/src/G3PointAction.cpp index e1e0e16..92084b3 100644 --- a/src/G3PointAction.cpp +++ b/src/G3PointAction.cpp @@ -1155,10 +1155,6 @@ bool G3PointAction::wolman() float dx = 1.1 * b_axis.maxCoeff(); - Eigen::ArrayXf x_grid; - Eigen::ArrayXf y_grid; - Eigen::ArrayXf distances; - Eigen::Index minLoc; std::vector d; std::random_device rd; @@ -1172,6 +1168,12 @@ bool G3PointAction::wolman() #endif for (int k = 0; k < n_iter; k++) { + // local variables + Eigen::ArrayXf x_grid; + Eigen::ArrayXf y_grid; + Eigen::ArrayXf distances; + Eigen::Index minLoc; + if (k % 20 == 0) { std::cout << k << std::endl;