replace openmp with thread-pool library bc openmp has larger fork boundary overhead

This commit is contained in:
2026-02-22 23:54:14 +01:00
parent 73b01f6af3
commit 443069f597
7 changed files with 82 additions and 30 deletions

View File

@ -129,7 +129,7 @@ auto Octree::CalculateForce(int node_idx, const Vector3 &pos) -> Vector3 {
// Barnes-Hut
if (node.leaf || (size * size / dist_sq) < (THETA * THETA)) {
float dist = std::sqrt(dist_sq);
float force_mag = REPULSION_FORCE * node.mass_total / dist_sq;
float force_mag = BH_FORCE * node.mass_total / dist_sq;
return Vector3Scale(diff, force_mag / dist);
}