added an example of chare array broadcast
authorAaron Becker <akbecker@gmail.com>
Tue, 7 Sep 2010 01:14:11 +0000 (20:14 -0500)
committerAaron Becker <akbecker@gmail.com>
Tue, 7 Sep 2010 01:14:11 +0000 (20:14 -0500)
Note: this example doesn't work if you don't specify a constructor for
the array because of some gremlin in charmxi.

src/langs/charj/tests/unit/ChareArrayBroadcast.cj [new file with mode: 0644]

diff --git a/src/langs/charj/tests/unit/ChareArrayBroadcast.cj b/src/langs/charj/tests/unit/ChareArrayBroadcast.cj
new file mode 100644 (file)
index 0000000..259b02b
--- /dev/null
@@ -0,0 +1,16 @@
+package tests.unit;
+
+public chare_array [1d] SimpleChareArray {
+    int x;
+    public entry SimpleChareArray() {}
+    public entry void test() {
+        CkPrintf("Testing\n");
+    }
+}
+
+public mainchare Main {
+    public entry Main(CkArgMsg m) {
+        SimpleChareArray@ a = new SimpleChareArray@(10);
+        a@test();
+    }
+}