Changeset 29702ad for tests


Ignore:
Timestamp:
Nov 22, 2022, 10:18:04 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master
Children:
20cf96d
Parents:
1553a55 (diff), d41735a (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
Files:
6 added
2 deleted
5 edited
8 moved

Legend:

Unmodified
Added
Removed
  • tests/PRNG.cfa

    r1553a55 r29702ad  
    88// Created On       : Wed Dec 29 09:38:12 2021
    99// Last Modified By : Peter A. Buhr
    10 // Last Modified On : Sat Apr  9 15:21:14 2022
    11 // Update Count     : 344
     10// Last Modified On : Sun Nov 20 22:17:35 2022
     11// Update Count     : 377
    1212//
    1313
     
    2222#include <mutex_stmt.hfa>
    2323
     24#ifdef __x86_64__                                                                               // 64-bit architecture
     25#define PRNG PRNG64
     26#else                                                                                                   // 32-bit architecture
     27#define PRNG PRNG32
     28#endif // __x86_64__
     29
    2430#ifdef TIME                                                                                             // use -O2 -nodebug
    2531#define STARTTIME start = timeHiRes()
     
    5460
    5561
    56 uint32_t seed = 1009;
     62unsigned int seed = 1009;
    5763
    5864thread T1 {};
     
    158164#if 1
    159165        PRNG prng;
     166
    160167        if ( seed != 0 ) set_seed( prng, seed );
    161168
     
    164171        for ( 20 ) {
    165172                sout | wd(13, prng( prng )) | nonl;                             // cascading => side-effect functions called in arbitary order
    166                 sout | wd(10, prng( prng, 5 )) | nonl;
    167                 sout | wd(13, prng( prng, 0, 5 ));
     173                sout | wd(10, prng( prng, 5z )) | nonl;
     174                sout | wd(13, prng( prng, 0, 5z ));
    168175        } // for
    169176        sout | sepEnable;
     
    199206        for ( 20 ) {
    200207                sout | wd(13, prng()) | nonl;                                   // cascading => side-effect functions called in arbitary order
    201                 sout | wd(10, prng( 5 )) | nonl;
    202                 sout | wd(13, prng( 0, 5 ));
     208                sout | wd(10, prng( 5z )) | nonl;
     209                sout | wd(13, prng( 0, 5z ));
    203210        } // for
    204211        sout | sepEnable;
     
    235242        for ( 20 ) {
    236243                sout | wd(13, prng( th )) | nonl;                               // cascading => side-effect functions called in arbitary order
    237                 sout | wd(10, prng( th, 5 )) | nonl;
    238                 sout | wd(13, prng( th, 0, 5 ));
     244                sout | wd(10, prng( th, 5z )) | nonl;
     245                sout | wd(13, prng( th, 0, 5z ));
    239246        } // for
    240247        sout | sepEnable;
  • tests/concurrent/barrier/generation.cfa

    r1553a55 r29702ad  
    3737                for(c; 'A' ~= 'Z') {
    3838                        // Yield for chaos
    39                         yield(prng(this, 10));
     39                        yield( prng(this, 10) );
    4040
    4141                        // Print the generation, no newline because
     
    4343
    4444                        // Yield again for more chaos
    45                         yield(prng(this, 10));
     45                        yield( prng(this, 10) );
    4646
    4747                        // Block on the barrier
  • tests/concurrent/barrier/order.cfa

    r1553a55 r29702ad  
    3737        for(l; NUM_LAPS) {
    3838                // Yield for chaos
    39                 yield(prng(this, 10));
     39                yield( prng(this, 10) );
    4040
    4141                // Block and what order we arrived
  • tests/concurrent/once.cfa

    r1553a55 r29702ad  
    3030
    3131                // sometime yields
    32                 yield(prng(this, 3));
     32                yield( prng(this, 3) );
    3333        }
    3434}
  • tests/concurrent/readyQ/leader_spin.cfa

    r1553a55 r29702ad  
    2626}
    2727
    28 PRNG lead_rng;
     28PRNG64 lead_rng;
    2929volatile unsigned leader;
    3030volatile size_t lead_idx;
    3131
    32 const unsigned nthreads = 17;
    33 const unsigned stop_count = 327;
     32const uint64_t nthreads = 17;
     33const uint64_t stop_count = 327;
    3434
    3535thread$ * the_main;
Note: See TracChangeset for help on using the changeset viewer.