From: jjenista Date: Mon, 1 Nov 2010 19:41:43 +0000 (+0000) Subject: a version of micro4 that collects the results and shows sequential behavior is preser... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a24fe82ca3131c345e9350c680362e1c4ff64772;p=IRC.git a version of micro4 that collects the results and shows sequential behavior is preserved, brians fix is awesome --- diff --git a/Robust/src/Benchmarks/oooJava/micro4.5/makefile b/Robust/src/Benchmarks/oooJava/micro4.5/makefile new file mode 100644 index 00000000..a12742fa --- /dev/null +++ b/Robust/src/Benchmarks/oooJava/micro4.5/makefile @@ -0,0 +1 @@ +include ../micro-master-makefile diff --git a/Robust/src/Benchmarks/oooJava/micro4.5/test.java b/Robust/src/Benchmarks/oooJava/micro4.5/test.java new file mode 100644 index 00000000..26f2ada9 --- /dev/null +++ b/Robust/src/Benchmarks/oooJava/micro4.5/test.java @@ -0,0 +1,42 @@ +public class Foo { + public Foo() {} + int f; +} + + +public class test { + public static void main( String argv[] ) { + long count = 800; + int numFoo = 10; + + Foo[] array = new Foo[numFoo]; + + for( int i = 0; i < numFoo; i++ ) { + array[i] = new Foo(); + } + + for( long j = 0; j < count; j++ ) { + for( int i = 0; i < numFoo; i++ ) { + rblock child1 { + int x = 2; + } + + Foo foo = array[i]; + + // a variable fro sib + // AND memory dependence + rblock child2 { + foo.f += x; + } + } + } + + long total = 0; + for( long j = 0; j < count; j++ ) { + for( int i = 0; i < numFoo; i++ ) { + total += array[i].f; + } + } + System.out.println( "t="+total ); + } +}