Flat-array distance precomputation + bitset CSR pipeline#17
Open
adthoms wants to merge 1 commit into
Open
Conversation
Precompute all N*(N-1)/2 pairwise Euclidean distances as flat float arrays, then scan once to build a bitset of compatible edges, and convert to CSR graph. This eliminates per-pair Eigen temporaries and operator[] calls, enabling SIMD-friendly memory access patterns. New files: - include/robin/distance.hpp: bulk pairwise Euclidean + cosine precomputation - include/robin/bitset.hpp: compact bitset with popcount + CSR construction Modified: - include/robin/math.hpp: factored out pair_from_linear_index utility - include/robin/robin.hpp: declared precomputed pipeline free functions - src/robin.cpp: implemented precomputed pipelines, wired into Make3dRegInvGraph and Make3dNormalRegInvGraph with automatic fallback for large inputs - tests/: added tests for pair_from_linear_index, precomputed graph equivalence, and integration tests for the optimized 3D registration pipeline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
include/robin/distance.hpp) and compact bitset edge storage with popcount-based CSR construction (include/robin/bitset.hpp)pair_from_linear_indexutility from inline code incore.hppintomath.hppfor reuse across the codebaseMake3dRegInvGraphandMake3dNormalRegInvGraphwith automatic fallback to existing path when memory budget exceeds 512MBTest plan
pair_from_linear_indexunit tests: validates all pairs unique and ordered for N=5,10,50,100Make3dRegInvGraphprecomputed pipeline: no-outlier and with-outlier scenarios (N=20)🤖 Generated with Claude Code