# HG changeset patch # User e095732 # Date 1363063788 -32400 # Node ID caee170e6cfa151e591f50c38edf1e1d7e3178b6 # Parent b4ca7f75e6b2b44249ae3ff88953d47aca956613 use no convert put/update method diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/StartCodeSegment.java --- a/src/alice/test/codesegment/local/StartCodeSegment.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/StartCodeSegment.java Tue Mar 12 13:49:48 2013 +0900 @@ -21,13 +21,13 @@ // this startup TestCodeSegment. */ DataList list = new DataList(); - int size = 10; + int size = 10000; for (int i = 0; i < size; i++){ Random rnd = new Random(); list.table.add(rnd.nextInt(100000)); } t = System.currentTimeMillis(); - ods.put("key1", list); + ods.put("local","key1", list); //ods.put("local", "key1", 1); //ods.put("local", "key1", 2); //ods.put("local", "key1", 3); diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/TestCodeSegment.java --- a/src/alice/test/codesegment/local/TestCodeSegment.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/TestCodeSegment.java Tue Mar 12 13:49:48 2013 +0900 @@ -3,12 +3,11 @@ import alice.codesegment.CodeSegment; import alice.datasegment.CommandType; import alice.datasegment.Receiver; -import alice.test.codesegment.local.bitonicsort.DataList; public class TestCodeSegment extends CodeSegment { static int count = 0; - + static long y =0; // create input datasegment arg1 Receiver arg1 = ids.create(CommandType.PEEK); public TestCodeSegment(){ @@ -20,15 +19,19 @@ @Override public void run() { - if(count > 0){ + if(count > 100000){ System.out.println(System.currentTimeMillis() - StartCodeSegment.t); + //System.out.println(TestCodeSegment.y ); System.exit(1); } - DataList list = (DataList)arg1.obj; - System.out.println("ssss"+list.table); + //DataList list = arg1.asClass(DataList.class); + //System.out.println(list.table); //System.out.println(arg1.val); + //long u = System.currentTimeMillis(); + //int i = arg1.asInteger()+1; + //TestCodeSegment.y +=( System.currentTimeMillis() - u); + ods.update("local", "key1", arg1.val); - //ods.update("key1",arg1.asInteger()+1); new TestCodeSegment(); //new TestCodeSegment(arg1.index); diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/bitonicsort/EvenPhase.java --- a/src/alice/test/codesegment/local/bitonicsort/EvenPhase.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/bitonicsort/EvenPhase.java Tue Mar 12 13:49:48 2013 +0900 @@ -44,11 +44,11 @@ if (info2==null){ DataList list = (DataList)info1.obj; if (count > sort_count){ - ods.update("array"+info.range, list); + ods.update("array"+info.range, list ,false); return; } ods.put(info.range+"f", "dummy"); - ods.put(info.range+"b", list); + ods.put(info.range+"b", list, false); //System.out.println("next Odd "+info.range+" "+info.range+"b"+" "+(info.range+1)+"f"); new OddPhase(info0.key,info.range+"b",(info.range+1)+"f",count,info6.key); } else { @@ -60,20 +60,20 @@ list3.table.addAll(list2.table); if (count > sort_count){ - ods.update("array"+info.range, list3); + ods.update("array"+info.range, list3 ,false); return; } int block_num = info3.asInteger(); Sort.quickSort(list3.table, 0, list3.table.size()-1); if (!info.lastFlag){ - ods.put(info.range+"f", list3.createDataList(0, block_num/2)); - ods.put(info.range+"b", list3.createDataList(block_num/2, block_num/2)); + ods.put(info.range+"f", list3.createDataList(0, block_num/2) ,false); + ods.put(info.range+"b", list3.createDataList(block_num/2, block_num/2),false); //System.out.println("next Odd "+info.range+" "+ info.range+"b"+" "+(info.range+1)+"f"); new OddPhase(info0.key,info.range+"b",(info.range+1)+"f",count,info6.key); } else { int last_block_num = info4.asInteger(); - ods.put(info.range+"f", list3.createDataList(0, block_num/2)); - ods.put(info.range+"b", list3.createDataList(block_num/2, last_block_num)); + ods.put(info.range+"f", list3.createDataList(0, block_num/2) ,false); + ods.put(info.range+"b", list3.createDataList(block_num/2, last_block_num) ,false); //System.out.println("next Odd "+info.range+" "+ info.range+"b"); new OddPhase(info0.key ,info.range+"b",count,info6.key); } diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/bitonicsort/MakeData.java --- a/src/alice/test/codesegment/local/bitonicsort/MakeData.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/bitonicsort/MakeData.java Tue Mar 12 13:49:48 2013 +0900 @@ -26,6 +26,6 @@ list.table.add(rnd.nextInt(100000)); } - ods.update("list", list); + ods.update("list", list, false); } } diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/bitonicsort/OddPhase.java --- a/src/alice/test/codesegment/local/bitonicsort/OddPhase.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/bitonicsort/OddPhase.java Tue Mar 12 13:49:48 2013 +0900 @@ -43,13 +43,13 @@ if (info2==null){ DataList list = (DataList)info1.obj; if (count > sort_count){ - ods.update("array"+info.range, list); + ods.update("array"+info.range, list, false); return; } Sort.quickSort(list.table,0,list.table.size()-1); if (!info.lastFlag){ - ods.put(info.range+"f", list.createDataList(0, block_num/2)); - ods.put(info.range+"b", list.createDataList(block_num/2, block_num/2)); + ods.put(info.range+"f", list.createDataList(0, block_num/2) ,false); + ods.put(info.range+"b", list.createDataList(block_num/2, block_num/2) ,false); if (info.range==0){ //System.out.println("next Even "+info.range+" "+info.range+"f"); @@ -59,7 +59,7 @@ new EvenPhase(info0.key,(info.range-1)+"b",info.range+"f",count,info6.key); } } else { - ods.put(info.range+"f",list); + ods.put(info.range+"f",list, false); ods.put(info.range+"b","dummy"); //System.out.println("next Even "+info.range+" "+ (info.range-1)+"b"+" "+(info.range)+"f"); new EvenPhase(info0.key,(info.range-1)+"b",info.range+"f",count,info6.key); @@ -73,13 +73,13 @@ list3.table.addAll(list1.table); list3.table.addAll(list2.table); if (count > sort_count){ - ods.update("array"+info.range, list3); + ods.update("array"+info.range, list3, false); return; } Sort.quickSort(list3.table,0,list3.table.size()-1); - ods.put(info.range+"f", list3.createDataList(0, block_num/2)); - ods.put(info.range+"b", list3.createDataList(block_num/2, block_num/2)); + ods.put(info.range+"f", list3.createDataList(0, block_num/2) ,false); + ods.put(info.range+"b", list3.createDataList(block_num/2, block_num/2) ,false); if (info.range==0){ //System.out.println("next Even2b "+info.range+" "+ info.range+"f"); diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/bitonicsort/SetTask.java --- a/src/alice/test/codesegment/local/bitonicsort/SetTask.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/bitonicsort/SetTask.java Tue Mar 12 13:49:48 2013 +0900 @@ -36,13 +36,13 @@ int i = 0; for (i = 0;i< conf.getSplitNum()-1; i++){ ods.put("local", "range"+i, new RangeInfo(i,false)); - ods.update(key+i, list.createDataList(i*block_num, block_num)); + ods.update(key+i, list.createDataList(i*block_num, block_num) ,false); ods.update("local", "count"+i, 0); new OddPhase("range"+i,key+i,0,"count"+i); } ods.put("local", "range"+i, new RangeInfo(i,true)); - ods.update(key+i, list.createDataList(i*block_num, last_block_num)); + ods.update(key+i, list.createDataList(i*block_num, last_block_num) ,false); ods.update("local", "count"+i, 0); ods.put("local","arraynum",i+1); new OddPhase("range"+i,key+i,0,"count"+i); diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/mergesort/MergeArray.java --- a/src/alice/test/codesegment/local/mergesort/MergeArray.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/mergesort/MergeArray.java Tue Mar 12 13:49:48 2013 +0900 @@ -72,6 +72,6 @@ int num = (keyNum1-1)/2; String key = Integer.toString(num); - ods.put(key, list3); + ods.put(key, list3, false); } } diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/mergesort/SeparateArray.java --- a/src/alice/test/codesegment/local/mergesort/SeparateArray.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/mergesort/SeparateArray.java Tue Mar 12 13:49:48 2013 +0900 @@ -26,8 +26,8 @@ String key1 = Integer.toString(num); String key2 = Integer.toString(num+1); - ods.put(key1, list.createDataList(0, length)); - ods.put(key2, list.createDataList(length, length)); + ods.put(key1, list.createDataList(0, length), false); + ods.put(key2, list.createDataList(length, length),false); new SeparateArray(num); new SeparateArray(num+1); @@ -36,14 +36,14 @@ String key = Integer.toString(keyNum); if (list.table.get(0)<=list.table.get(1)){ - ods.put(key, list); + ods.put(key, list, false); } else { Sort.swap(list.table, 0, 1); - ods.put(key, list); + ods.put(key, list,false); } } else { String key = Integer.toString(keyNum); - ods.put(key, list); + ods.put(key, list, false); } } diff -r b4ca7f75e6b2 -r caee170e6cfa src/alice/test/codesegment/local/mergesort/SortStart.java --- a/src/alice/test/codesegment/local/mergesort/SortStart.java Tue Mar 12 00:49:19 2013 +0900 +++ b/src/alice/test/codesegment/local/mergesort/SortStart.java Tue Mar 12 13:49:48 2013 +0900 @@ -22,7 +22,7 @@ } String key = Integer.toString(0); - ods.put(key, list); + ods.put(key, list, false); new SeparateArray(0); new ShowResult(0);