File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
search/include/pcl/search Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -396,14 +396,15 @@ namespace pcl
396396 }
397397
398398 /* * \brief Set the number of threads to use for searching over multiple points or indices
399- * \param[in] nr_threads the number of threads to use (0 automatically sets the threads based on the hardware)
399+ * \param[in] num_threads the number of threads to use (0 automatically sets the threads based on the hardware)
400400 */
401- void setNumberOfThreads (unsigned int nr_threads ) {
401+ void setNumberOfThreads (unsigned int num_threads ) {
402402 #ifdef _OPENMP
403- num_threads_ = nr_threads != 0 ? nr_threads : omp_get_num_procs ();
403+ num_threads_ = num_threads != 0 ? num_threads : omp_get_num_procs ();
404404 #else
405405 if (nr_threads != 1 ) {
406- PCL_WARN (" OpenMP is not available. Keeping number of threads unchanged at 1\n " );
406+ PCL_WARN (" OpenMP is not available. Setting number of threads to 1\n " );
407+ num_threads_ = 1 ;
407408 }
408409 #endif
409410 }
@@ -418,7 +419,7 @@ namespace pcl
418419 std::string name_;
419420
420421 /* * \brief The number of threads to use when searching over multiple points or indices */
421- unsigned int num_threads_{1 };
422+ unsigned int num_threads_{0 };
422423
423424 private:
424425 struct Compare
You can’t perform that action at this time.
0 commit comments