Changeset 921cd82


Ignore:
Timestamp:
Feb 13, 2020, 3:48:35 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
103c292, 3b9c674, 4aac9ff
Parents:
eeaa3e2
Message:

formatting, change to CFA statements in quicksort

File:
1 edited

Legend:

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

    reeaa3e2 r921cd82  
    1111// Created On       : Wed Dec  6 12:15:52 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Thu Oct 10 13:58:18 2019
    14 // Update Count     : 176
     13// Last Modified On : Wed Feb 12 18:24:47 2020
     14// Update Count     : 177
    1515//
    1616
     
    2727
    2828void ?{}( Quicksort & qs, int values[], int size, int depth ) {
    29         qs.values = values;  qs.low = 0;  qs.high = size;  qs.depth = depth;
     29        qs.[values, low, high, depth] = [values, 0, size, depth];
    3030} // Quicksort
    3131
     
    167167                        values[counter] = size - counter;                       // descending values
    168168                } // for
    169                 for ( int i = 0; i < 200; i +=1 ) {                             // random shuffle a few values
     169                for ( i; 200 ) {                                                                // random shuffle a few values
    170170                        swap( values[rand() % size], values[rand() % size] );
    171171                } // for
Note: See TracChangeset for help on using the changeset viewer.