We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c82a36 commit d932223Copy full SHA for d932223
1 file changed
src/gravity/step.h
@@ -14,9 +14,10 @@ inline void Step(std::vector<Particle>& p, real dt) {
14
root.computeMass();
15
16
real theta = 0.5;
17
-
18
- for (auto& a : p) {
19
- bhForce(&root, a, theta, dt);
+
+ #pragma omp parallel for schedule(static)
+ for (int i = 0; I < p.size(); i++) {
20
+ bhForce(&root, p[I], theta, dt);
21
}
22
23
for (auto& a : p) {
0 commit comments