Ignore:
Timestamp:
Jun 21, 2019, 3:42:05 PM (5 years ago)
Author:
Aaron Moss <a3moss@…>
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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/examples/quickSort.generic.cfa

    rc1ed2ee r8d61d620  
    1111// Created On       : Wed Dec  6 12:15:52 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Fri Mar 15 14:52:41 2019
    14 // Update Count     : 147
     13// Last Modified On : Fri Jun 21 08:28:20 2019
     14// Update Count     : 149
    1515//
    1616
     
    141141                  if ( eof( unsortedfile ) ) break;
    142142                        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 numbers
     143                        for ( counter; size ) {                                         // read unsorted numbers
    144144                                unsortedfile | values[counter];
    145145                                if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
     
    151151                                Quicksort(ELEMTYPE) QS = { values, size - 1, 0 }; // sort values
    152152                        } // wait until sort tasks terminate
    153                         for ( int counter = 0; counter < size; counter += 1 ) { // print sorted list
     153                        for ( counter; size ) {                                         // print sorted list
    154154                                if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
    155155                                sortedfile | values[counter];
     
    166166
    167167                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 numbers
     168                for ( counter; size ) {                                                 // generate unsorted numbers
    169169                        values[counter] = size - counter;                       // descending values
    170170                } // for
     
    173173                } // wait until sort tasks terminate
    174174
    175                 // for ( int counter = 0; counter < size - 1; counter += 1 ) { // check sorting
     175                // for ( counter; size - 1 ) {                                  // check sorting
    176176                //      if ( values[counter] > values[counter + 1] ) abort();
    177177                // } // for
Note: See TracChangeset for help on using the changeset viewer.