From: bdemsky Date: Sat, 2 Apr 2011 23:26:43 +0000 (+0000) Subject: fixed benchmark X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b2a3ec55e5f850ce807f219a8a1c7c599bf1736b;p=IRC.git fixed benchmark --- diff --git a/Robust/src/Benchmarks/oooJava/barneshut/Barneshut.java b/Robust/src/Benchmarks/oooJava/barneshut/Barneshut.java index 688d0c91..7bc6e6a8 100644 --- a/Robust/src/Benchmarks/oooJava/barneshut/Barneshut.java +++ b/Robust/src/Benchmarks/oooJava/barneshut/Barneshut.java @@ -244,35 +244,31 @@ public void ComputeCenterOfMass(ArrayIndexedGraph octree, ArrayIndexedNode roo for (int step = 0; step < local_ntimesteps; step++) { // time-step the system ComputeCenterAndDiameter(); ArrayIndexedGraph octree = new ArrayIndexedGraph(8); - genreach q1; ArrayIndexedNode root = octree.createNode(new OctTreeNodeData(centerx, centery, centerz)); // create the tree's root - genreach q2; octree.addNode(root); - genreach q3; double radius = diameter * 0.5; for (int i = 0; i < local_nbodies; i++) { - genreach r0; Insert(octree, root, body[i], radius); // grow the tree by inserting each body - genreach r1; body[i].root=root; - genreach r2; } curr = 0; // summarize subtree info in each internal node (plus restructure tree and sort bodies for performance reasons) ComputeCenterOfMass(octree, root); - for(int i=0; i < local_nbodies; i++){ - // compute the acceleration of each body (consumes most of the total runtime) - // n.ComputeForce(octree, root, diameter, itolsq, step, dthf, epssq); - OctTreeLeafNodeData eachbody=body[i]; - double di=diameter; - double it=itolsq; - double dt=dthf; - double ep=epssq; - sese parallel{ - eachbody.ComputeForce(octree, di, it, step, dt, ep); - } + sese force { + for(int i=0; i < local_nbodies; i++){ + // compute the acceleration of each body (consumes most of the total runtime) + // n.ComputeForce(octree, root, diameter, itolsq, step, dthf, epssq); + OctTreeLeafNodeData eachbody=body[i]; + double di=diameter; + double it=itolsq; + double dt=dthf; + double ep=epssq; + sese parallel{ + eachbody.ComputeForce(octree, di, it, step, dt, ep); + } + } } for (int i = 0; i < local_nbodies; i++) {