Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph coloring #48

Merged
merged 51 commits into from
Oct 26, 2023
Merged

Graph coloring #48

merged 51 commits into from
Oct 26, 2023

Conversation

erincatto
Copy link
Owner

@erincatto erincatto commented Aug 12, 2023

Use graph coloring to multithread the active simulation. Islands are not used in the solver, but are still used for sleep.

Graph coloring results in many small jobs, so I implemented fine grained task coordination similar to bepu physics.

Implemented SIMD constraint solver making use of graph colors. Each color has fully independent constraints that may be solved simultaneously.

Performance using AVX SIMD was measured to be significantly faster than the island solver for large islands and many smaller islands. Scenarios with many large dynamic bodies interacting with many much smaller dynamic bodies may perform better with an island solver due to color overflow.

Tasks left to do before merging this PR.

  • split islands
  • overflow color
  • time of impact
  • fix crash with mouse joint on sleeping island
  • fix build
  • restitution

@erincatto erincatto merged commit a494055 into main Oct 26, 2023
4 checks passed
@erincatto erincatto deleted the erincatto/graph_color branch October 26, 2023 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant