Skip to content

Commit

Permalink
Merge pull request #2418 from ThorstenHarter/master
Browse files Browse the repository at this point in the history
Make pcl::MovingLeastSquares thread-safe
  • Loading branch information
taketwo authored Sep 7, 2018
2 parents 22734a7 + c9f505c commit 5cb9070
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions surface/include/pcl/surface/impl/mls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::performProcessing (PointCloudOut &
// Compute the number of coefficients
nr_coeff_ = (order_ + 1) * (order_ + 2) / 2;

size_t mls_result_index = 0;

#ifdef _OPENMP
// (Maximum) number of threads
const unsigned int threads = threads_ == 0 ? 1 : threads_;
Expand Down Expand Up @@ -324,6 +322,7 @@ pcl::MovingLeastSquares<PointInT, PointOutT>::performProcessing (PointCloudOut &
// Get a plane approximating the local surface's tangent and project point onto it
const int index = (*indices_)[cp];

size_t mls_result_index = 0;
if (cache_mls_results_)
mls_result_index = index; // otherwise we give it a dummy location.

Expand Down

0 comments on commit 5cb9070

Please sign in to comment.