diff --git a/filters/include/pcl/filters/impl/radius_outlier_removal.hpp b/filters/include/pcl/filters/impl/radius_outlier_removal.hpp index 387860d66fd..9b221959888 100644 --- a/filters/include/pcl/filters/impl/radius_outlier_removal.hpp +++ b/filters/include/pcl/filters/impl/radius_outlier_removal.hpp @@ -89,10 +89,10 @@ pcl::RadiusOutlierRemoval::applyFilterIndices (Indices &indices) #pragma omp parallel for \ default(none) \ schedule(dynamic,64) \ - firstprivate(nn_indices) \ - firstprivate(nn_dists) \ + firstprivate(nn_indices, nn_dists) \ + shared(nn_dists_max, mean_k, indices, oii, rii) \ num_threads(num_threads_) - for (ptrdiff_t i = 0; i < indices_->size(); i++) + for (ptrdiff_t i = 0; i < static_cast(indices_->size()); i++) { const index_t index = indices_->at(i); // Perform the nearest-k search @@ -153,10 +153,10 @@ pcl::RadiusOutlierRemoval::applyFilterIndices (Indices &indices) #pragma omp parallel for \ default(none) \ schedule(dynamic, 64) \ - firstprivate(nn_indices) \ - firstprivate(nn_dists) \ + firstprivate(nn_indices, nn_dists) \ + shared(nn_dists_max, mean_k, indices, oii, rii) \ num_threads(num_threads_) - for (ptrdiff_t i = 0; i < indices_->size(); i++) + for (ptrdiff_t i = 0; i < static_cast(indices_->size()); i++) { const index_t index = indices_->at(i); if (!pcl::isXYFinite((*input_)[index]))