Changeset 8d61d620 for tests/concurrent/examples/quickSort.generic.cfa
- Timestamp:
- Jun 21, 2019, 3:42:05 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 18e683b, f2f22e3
- Parents:
- c1ed2ee (diff), 49dee5e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrent/examples/quickSort.generic.cfa
rc1ed2ee r8d61d620 11 11 // Created On : Wed Dec 6 12:15:52 2017 12 12 // Last Modified By : Peter A. Buhr 13 // Last Modified On : Fri Mar 15 14:52:41201914 // Update Count : 14 713 // Last Modified On : Fri Jun 21 08:28:20 2019 14 // Update Count : 149 15 15 // 16 16 … … 141 141 if ( eof( unsortedfile ) ) break; 142 142 ELEMTYPE * values = alloc( size ); // values to be sorted, too large to put on stack 143 for ( int counter = 0; counter < size; counter += 1 ) {// read unsorted numbers143 for ( counter; size ) { // read unsorted numbers 144 144 unsortedfile | values[counter]; 145 145 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | " "; … … 151 151 Quicksort(ELEMTYPE) QS = { values, size - 1, 0 }; // sort values 152 152 } // wait until sort tasks terminate 153 for ( int counter = 0; counter < size; counter += 1 ) {// print sorted list153 for ( counter; size ) { // print sorted list 154 154 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | " "; 155 155 sortedfile | values[counter]; … … 166 166 167 167 ELEMTYPE * values = alloc( size ); // values to be sorted, too large to put on stack 168 for ( int counter = 0; counter < size; counter += 1 ) {// generate unsorted numbers168 for ( counter; size ) { // generate unsorted numbers 169 169 values[counter] = size - counter; // descending values 170 170 } // for … … 173 173 } // wait until sort tasks terminate 174 174 175 // for ( int counter = 0; counter < size - 1; counter += 1 ) {// check sorting175 // for ( counter; size - 1 ) { // check sorting 176 176 // if ( values[counter] > values[counter + 1] ) abort(); 177 177 // } // for
Note: See TracChangeset
for help on using the changeset viewer.