Ignore:
Timestamp:
Dec 12, 2018, 3:48:10 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
515a037
Parents:
90cfc16 (diff), 5ebb1368 (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

Location:
tests/concurrent/examples
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/examples/boundedBufferEXT.c

    r90cfc16 r85acec94  
    88// Created On       : Wed Apr 18 22:52:12 2018
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Thu Aug 16 08:17:03 2018
    11 // Update Count     : 8
     10// Last Modified On : Tue Dec 11 21:55:02 2018
     11// Update Count     : 9
    1212//
    1313
     
    115115                sum += sums[i];
    116116        } // for
    117         sout | "total:" | sum | endl;
     117        sout | "total:" | sum;
    118118}
    119119
  • tests/concurrent/examples/boundedBufferINT.c

    r90cfc16 r85acec94  
    88// Created On       : Mon Oct 30 12:45:13 2017
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Thu Aug 16 08:17:58 2018
    11 // Update Count     : 83
     10// Last Modified On : Tue Dec 11 21:55:45 2018
     11// Update Count     : 84
    1212//
    1313
     
    116116                sum += sums[i];
    117117        } // for
    118         sout | "total:" | sum | endl;
     118        sout | "total:" | sum;
    119119}
    120120
  • tests/concurrent/examples/datingService.c

    r90cfc16 r85acec94  
    88// Created On       : Mon Oct 30 12:56:20 2017
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Sun May 27 09:05:18 2018
    11 // Update Count     : 26
     10// Last Modified On : Tue Dec 11 21:55:34 2018
     11// Update Count     : 28
    1212//
    1313
     
    5858        yield( random( 100 ) );                                                         // don't all start at the same time
    5959        unsigned int partner = girl( TheExchange, id, ccode );
    60         sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode | endl;
     60        sout | "Girl:" | id | "is dating Boy at" | partner | "with ccode" | ccode;
    6161        girlck[id] = partner;
    6262} // Girl main
     
    6969
    7070thread Boy {
    71         DatingService &TheExchange;
     71        DatingService & TheExchange;
    7272        unsigned int id, ccode;
    7373}; // Boy
     
    7676        yield( random( 100 ) );                                                         // don't all start at the same time
    7777        unsigned int partner = boy( TheExchange, id, ccode );
    78         sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode | endl;
     78        sout | " Boy:" | id | "is dating Girl" | partner | "with ccode" | ccode;
    7979        boyck[id] = partner;
    8080} // Boy main
  • tests/concurrent/examples/matrixSum.c

    r90cfc16 r85acec94  
    1111// Created On       : Mon Oct  9 08:29:28 2017
    1212// Last Modified By : Peter A. Buhr
    13 // Last Modified On : Tue Nov  6 17:51:32 2018
    14 // Update Count     : 14
     13// Last Modified On : Tue Dec 11 21:54:55 2018
     14// Update Count     : 15
    1515//
    1616
     
    5454                total += subtotals[r];                                                  // total subtotals
    5555        } // for
    56         sout | total | endl;
     56        sout | total;
    5757}
    5858
  • tests/concurrent/examples/quickSort.c

    r90cfc16 r85acec94  
    99// Created On       : Wed Dec  6 12:15:52 2017
    1010// Last Modified By : Peter A. Buhr
    11 // Last Modified On : Thu Aug 16 08:17:41 2018
    12 // Update Count     : 163
     11// Last Modified On : Tue Dec  4 18:00:27 2018
     12// Update Count     : 167
    1313//
    1414
     
    8888
    8989void usage( char * argv[] ) {
    90         sout | "Usage:" | argv[0] | "( -s unsorted-file [ sorted-file ] | -t size (>= 0) [ depth (>= 0) ] )" | endl;
     90        sout | "Usage:" | argv[0] | "( -s unsorted-file [ sorted-file ] | -t size (>= 0) [ depth (>= 0) ] )";
    9191        exit( EXIT_FAILURE );                                                           // TERMINATE!
    9292} // usage
     
    114114                                &sortedfile = new( (const char *)argv[2] ); // open the output file
    115115                                if ( fail( sortedfile ) ) {
    116                                         serr | "Error! Could not open sorted output file \"" | argv[2] | "\"" | endl;
     116                                        serr | "Error! Could not open sorted output file \"" | argv[2] | "\"";
    117117                                        usage( argv );
    118118                                } // if
     
    121121                                &unsortedfile = new( (const char *)argv[1] ); // open the input file
    122122                                if ( fail( unsortedfile ) ) {
    123                                         serr | "Error! Could not open unsorted input file \"" | argv[1] | "\"" | endl;
     123                                        serr | "Error! Could not open unsorted input file \"" | argv[1] | "\"";
    124124                                        usage( argv );
    125125                                } // if
     
    127127                } // if
    128128        } // if
     129        sortedfile | nlOff;                                                                     // turn off auto newline
    129130
    130131        enum { ValuesPerLine = 22 };                                            // number of values printed per line
     
    137138                        for ( int counter = 0; counter < size; counter += 1 ) { // read unsorted numbers
    138139                                unsortedfile | values[counter];
    139                                 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | endl | "  ";
     140                                if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
    140141                                sortedfile | values[counter];
    141142                                if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
    142143                        } // for
    143                         sortedfile | endl;
     144                        sortedfile | nl;
    144145                        if ( size > 0 ) {                                                       // values to sort ?
    145146                                Quicksort QS = { values, size - 1, 0 }; // sort values
    146147                        } // wait until sort tasks terminate
    147148                        for ( int counter = 0; counter < size; counter += 1 ) { // print sorted list
    148                                 if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | endl | "  ";
     149                                if ( counter != 0 && counter % ValuesPerLine == 0 ) sortedfile | nl | "  ";
    149150                                sortedfile | values[counter];
    150151                                if ( counter < size - 1 && (counter + 1) % ValuesPerLine != 0 ) sortedfile | ' ';
    151152                        } // for
    152                         sortedfile | endl | endl;
     153                        sortedfile | nl;
    153154
    154155                        delete( values );
Note: See TracChangeset for help on using the changeset viewer.