Parallel CPU LBVH Implementation
Description
This pull request introduces a new broad phase collision detection method, LBVH (Linear Bounding Volume Hierarchy), and adds performance profiling capabilities to the project. It also includes updates to the build system and Python bindings to support these features. The most important changes are grouped below.
LBVH Broad Phase Collision Detection
- Added implementation of the
LBVHclass insrc/ipc/broad_phase/lbvh.hppand corresponding source file, providing a new broad phase method for collision detection. This includes node structure, build routines, and candidate detection logic. - Added a Python example
python/examples/lbvh.pydemonstrating LBVH usage and visualization.
Performance Profiling
- Added a new profiler utility (
src/ipc/utils/profiler.cpp,src/ipc/utils/profiler.hpp) to measure and record performance metrics, with CSV output support. - Updated the build configuration (
CMakeLists.txt,src/ipc/config.hpp.in) to allow enabling/disabling the profiler via theIPC_TOOLKIT_WITH_PROFILERoption. - Instrumented the BVH broad phase implementation (
src/ipc/broad_phase/bvh.cpp) with profiler blocks to collect timing data for key routines.
Type of change
- [x] Enhancement (non-breaking change which improves existing functionality)
Codecov Report
:x: Patch coverage is 89.24419% with 37 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 97.25%. Comparing base (42cf86e) to head (9f43de0).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/ipc/utils/profiler.cpp | 9.09% | 30 Missing :warning: |
| src/ipc/broad_phase/lbvh.cpp | 97.27% | 7 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #188 +/- ##
==========================================
- Coverage 97.38% 97.25% -0.14%
==========================================
Files 147 151 +4
Lines 23651 24001 +350
Branches 796 835 +39
==========================================
+ Hits 23032 23341 +309
- Misses 619 660 +41
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 97.25% <89.24%> (-0.14%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.