Remove __thread as it does not work on Tilera and use newflag for Task version
authorjzhou <jzhou>
Tue, 19 Apr 2011 00:46:07 +0000 (00:46 +0000)
committerjzhou <jzhou>
Tue, 19 Apr 2011 00:46:07 +0000 (00:46 +0000)
13 files changed:
Robust/src/Benchmarks/Scheduling/GC/Fibheaps/FibHeapsBench.java
Robust/src/Benchmarks/Scheduling/GC/GCBench/GCBench.java
Robust/src/Benchmarks/Scheduling/GC/JGFMonteCarlo/JGFMonteCarloBench.java
Robust/src/Benchmarks/Scheduling/GC/MTree/macrotest_tree.java
Robust/src/Benchmarks/Scheduling/GC/RayTracer/RayTracerBench.java
Robust/src/Benchmarks/Scheduling/GC/bh/BHBench.java
Robust/src/Benchmarks/Scheduling/GC/lcss/LcssBench.java
Robust/src/Benchmarks/Scheduling/GC/tsp/TSPBench.java
Robust/src/Benchmarks/Scheduling/GC/voronoi/VoronoiBench.java
Robust/src/ClassLibrary/Bristlecone/Object.java
Robust/src/ClassLibrary/Bristlecone/ServerSocket.java
Robust/src/Runtime/object.c
Robust/src/Runtime/runtime.h

index 46e295f18ac1fcb5887510c40c81c23e0e027d61..e90b503e0c5439ae2a14051d011ede1f2cccbd79 100644 (file)
@@ -9,7 +9,7 @@ task t1(StartupObject s{initialstate}) {
 
   int threadnum = 62; // 56;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(){run};
+    TestRunner tr = newflag TestRunner(){run};
   }
 
   taskexit(s{!initialstate});
index b78ea7ddc5584ac3453fd79eb282ad83ac5a1b84..6ffa1401c624e39da322e58e71f04dc499f89dc4 100644 (file)
@@ -52,7 +52,7 @@ task t1(StartupObject s{initialstate}) {
 
   int threadnum = 62; // 56;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner gcb = new TestRunner(){run};
+    TestRunner gcb = newflag TestRunner(){run};
   }
 
   taskexit(s{!initialstate});
index 7b6cf0ffe92a538c0f84afee7ed39a57c3cf2847..24dfcbcb85818306cddc18b061ebb8b1a2f48b83 100644 (file)
@@ -27,15 +27,15 @@ task t1(StartupObject s{initialstate}) {
     int nruns = 62 * 62;  //16 * 16;
     int group = 62; // 16;
     
-    AppDemo ad = new AppDemo(datasize, nruns, group){merge};
+    AppDemo ad = newflag AppDemo(datasize, nruns, group){merge};
     
     ad.initSerial();
     
     for(int i = 0; i < group; i++) {
-       AppDemoRunner adr = new AppDemoRunner(i, 
-                                             nruns, 
-                                             group, 
-                                             ad){run};
+       AppDemoRunner adr = newflag AppDemoRunner(i, 
+                                                     nruns, 
+                                                     group, 
+                                                     ad){run};
     }
     
     taskexit(s{!initialstate});
index 34f603c1338538e5a8375e32937c08d0767a6b8c..f242aefe626c6c7304b09a22d33b061e46910b09 100644 (file)
@@ -5,7 +5,7 @@ task t1(StartupObject s{initialstate}) {
     int size = 40000;
     int nodenum = size*10;
        for(int i = 0; i < threadnum; ++i) {
-               TestRunner tr = new TestRunner(i, size, nodenum){run};
+               TestRunner tr = newflag TestRunner(i, size, nodenum){run};
        }
 
        taskexit(s{!initialstate});
index 5a288fda65213ac8280ed607c162ed5d52ce8052..1b07263f70cda4516e89a008c8217054a945ad0f 100644 (file)
@@ -3,11 +3,11 @@ task t1(StartupObject s{initialstate}) {
 
   int threadnum = 62; // 56;
   int size = threadnum * 25;
-  Composer comp = new Composer(threadnum, size){compose};
+  Composer comp = newflag Composer(threadnum, size){compose};
   RayTracer rt = new RayTracer();
   Scene scene = rt.createScene();
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(i, threadnum, size, scene){run};
+    TestRunner tr = newflag TestRunner(i, threadnum, size, scene){run};
   }
 
   taskexit(s{!initialstate});
index 2c7e839d389f1caf3b12cf877939d6abb80bd0f4..ae858e4df7acd89cdfaf22905383cf3f9ca4c33c 100644 (file)
@@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) {
   int threadnum = 62; // 56;
   int nbody = 700; //4096; //30000;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(nbody){run};
+    TestRunner tr = newflag TestRunner(nbody){run};
   }
 
   taskexit(s{!initialstate});
index 1bdeefe4ac6f463c13b7ef5e85bc27c2bdb7159a..1e8b02a307e26dd64a39df5cfa7e41ef4fd9aa5e 100644 (file)
@@ -16,7 +16,7 @@ task t1(StartupObject s{initialstate}) {
   args[4] = 81; //51; // 501;
   args[5] = 240; //0; // 1500;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(args){run};
+    TestRunner tr = newflag TestRunner(args){run};
   }
 
   taskexit(s{!initialstate});
index f00f631854969c990e0686f2491f4b8f07d05bfb..1d305a83243af4aed1e394df60187f4f1139ee50 100644 (file)
@@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) {
   int threadnum = 62; // 56;
   int ncities = 4080;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(ncities){run};
+    TestRunner tr = newflag TestRunner(ncities){run};
   }
 
   taskexit(s{!initialstate});
index f1c44a9683b3d4e222eb08e5ad4241098abf7c3a..1394fcfae6f24d15d3b7aeb04edd4bd9d25fe497 100644 (file)
@@ -10,7 +10,7 @@ task t1(StartupObject s{initialstate}) {
   int threadnum = 62; // 56;
   int npoints = 32000; //30000;
   for(int i = 0; i < threadnum; ++i) {
-    TestRunner tr = new TestRunner(npoints){run};
+    TestRunner tr = newflag TestRunner(npoints){run};
   }
 
   taskexit(s{!initialstate});
index d4ccd8f73edb9c2491ce6a44d780924cdbf5b481..d364ac4c9ce31827232df4db7fb7c0c315c2c096 100644 (file)
@@ -1,6 +1,5 @@
 public class Object {
   /* DO NOT USE ANY OF THESE - THEY ARE FOR IMPLEMENTING TAGS */
-  private int cachedCode;  //first field has to be a primitive
   private Object tags;  
 
   public native int hashCode();
index 723e886c7bf349e0d19da8b2aa5e41e51ad355b3..e203c8cbf79e3094cb5eed70331278cdf26cb421 100644 (file)
@@ -18,7 +18,7 @@ public class ServerSocket {
   }
 
   public Socket accept(tag td) {
-    Socket s=new Socket() {
+    Socket s=newflag Socket() {
     } {td};
     int newfd=nativeaccept(s);
     s.setFD(newfd);
index d0f59488dc834eddf563a31a490f6bc6f1ea9624..aaae9f3846e82f58a940ed1e1a4086d9b786fae9 100644 (file)
 #endif
 
 #ifndef MAC
+#ifdef THREADS
 __thread struct lockvector lvector;
 __thread int mythreadid;
+#endif
 #else
 
 #endif
index cd7939f32728d6d4cf673f474faa859d5811c127..c09bf434a0f3fac75ec4c5f5e304ccfec94b985c 100644 (file)
@@ -157,6 +157,7 @@ inline void setupsmemmode(void);
 #endif
 #endif
 
+#ifdef THREADS
 #define MAXLOCKS 256
 
 struct lockpair {
@@ -173,6 +174,7 @@ struct lockvector {
 extern __thread struct lockvector lvector;
 extern __thread int mythreadid;
 #endif
+#endif
 
 #ifdef TASK
 #ifndef MULTICORE