Skip to content

Parallelize SampleConsensusPrerejective - #6484

Merged
mvieth merged 3 commits into
PointCloudLibrary:masterfrom
mvieth:parallel_sac_prerejective
Oct 6, 2026
Merged

mvieth merged 3 commits into
PointCloudLibrary:masterfrom
mvieth:parallel_sac_prerejective

Conversation

@mvieth

@mvieth mvieth commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

I parallelized the getFitness function, where most of the time is spent. Additionally, finding similar features is parallelized if that is beneficial (mainly depending on input cloud size and number of iterations). I did some benchmarks and found a pretty good (though not perfect) speedup of 1.89 with 2 threads and 3.43 with 4 threads (measured over the whole align() call).

@mvieth mvieth added changelog: enhancement Meta-information for changelog generation module: registration labels Sep 29, 2026
@mvieth
mvieth requested a lite review from Copilot September 29, 2026 10:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Add the missing explicit <algorithm> include to ensure reliable compilation.

Review effort: Lite
Findings: None

What changed in this PR

Adds configurable OpenMP parallelization to SampleConsensusPrerejective for feature matching and fitness evaluation.

Changes:

  • Adds configurable thread usage and non-OpenMP fallback.
  • Parallelizes feature-cache construction and fitness computation.
  • Preserves inlier ordering.

Review note: Add an explicit <algorithm> include for the newly used std::remove.

File Summary
registration/​include/​pcl/​registration/​sample_consensus_prerejective.h Adds OpenMP support and thread configuration.
registration/​include/​pcl/​registration/​impl/​sample_consensus_prerejective.hpp Parallelizes feature searches and fitness evaluation.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mvieth
mvieth marked this pull request as ready for review September 29, 2026 17:46

@larshg larshg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@mvieth
mvieth merged commit 64c60bd into PointCloudLibrary:master Oct 6, 2026
13 checks passed
@mvieth
mvieth deleted the parallel_sac_prerejective branch October 6, 2026 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Meta-information for changelog generation module: registration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants