introduces stall site in front of loop body. later it should be done by the optimizat...
authoryeom <yeom>
Thu, 18 Nov 2010 22:14:55 +0000 (22:14 +0000)
committeryeom <yeom>
Thu, 18 Nov 2010 22:14:55 +0000 (22:14 +0000)
Robust/src/Benchmarks/oooJava/kmeans/Normal.java

index 29925c789d58c90be2b8c80c2073268f50d99b7e..29294ecb9e6562c554db4dbeb351eba3e9303b99 100644 (file)
@@ -283,6 +283,12 @@ public class Normal {
                        // Work in parallel with other threads
                        thread_work(args);
                        delta = args.global_delta;
                        // Work in parallel with other threads
                        thread_work(args);
                        delta = args.global_delta;
+                       
+                       // put stall site here rather than having inside of loop
+           nclusters=clusters.length;
+           int newCenterLen=new_centers_len.length;
+           int new_centersLen=new_centers.length;
+      //
 
                        /* Replace old cluster centers with new_centers */
                        for (int i = 0; i < nclusters; i++) {
 
                        /* Replace old cluster centers with new_centers */
                        for (int i = 0; i < nclusters; i++) {