- Timestamp:
- Nov 20, 2022, 10:24:14 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 910e1d0
- Parents:
- 25b0fde
- Location:
- tests
- Files:
-
- 1 added
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/.expect/nested_function.txt
r25b0fde rd2ad151 1 total 1051 total 80 -
tests/PRNG.cfa
r25b0fde rd2ad151 8 8 // Created On : Wed Dec 29 09:38:12 2021 9 9 // Last Modified By : Peter A. Buhr 10 // Last Modified On : S at Apr 9 15:21:14202211 // Update Count : 3 4410 // Last Modified On : Sun Nov 20 22:17:35 2022 11 // Update Count : 377 12 12 // 13 13 … … 22 22 #include <mutex_stmt.hfa> 23 23 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 24 30 #ifdef TIME // use -O2 -nodebug 25 31 #define STARTTIME start = timeHiRes() … … 54 60 55 61 56 u int32_t seed = 1009;62 unsigned int seed = 1009; 57 63 58 64 thread T1 {}; … … 158 164 #if 1 159 165 PRNG prng; 166 160 167 if ( seed != 0 ) set_seed( prng, seed ); 161 168 … … 164 171 for ( 20 ) { 165 172 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 )); 168 175 } // for 169 176 sout | sepEnable; … … 199 206 for ( 20 ) { 200 207 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 )); 203 210 } // for 204 211 sout | sepEnable; … … 235 242 for ( 20 ) { 236 243 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 )); 239 246 } // for 240 247 sout | sepEnable; -
tests/concurrent/barrier/generation.cfa
r25b0fde rd2ad151 37 37 for(c; 'A' ~= 'Z') { 38 38 // Yield for chaos 39 yield( prng(this, 10));39 yield( (unsigned)prng(this, 10) ); 40 40 41 41 // Print the generation, no newline because … … 43 43 44 44 // Yield again for more chaos 45 yield( prng(this, 10));45 yield( (unsigned)prng(this, 10) ); 46 46 47 47 // Block on the barrier -
tests/concurrent/barrier/order.cfa
r25b0fde rd2ad151 37 37 for(l; NUM_LAPS) { 38 38 // Yield for chaos 39 yield( prng(this, 10));39 yield( (unsigned)prng(this, 10) ); 40 40 41 41 // Block and what order we arrived -
tests/concurrent/once.cfa
r25b0fde rd2ad151 30 30 31 31 // sometime yields 32 yield( prng(this, 3));32 yield( (unsigned)prng(this, 3) ); 33 33 } 34 34 } -
tests/concurrent/readyQ/leader_spin.cfa
r25b0fde rd2ad151 26 26 } 27 27 28 PRNG lead_rng;28 PRNG64 lead_rng; 29 29 volatile unsigned leader; 30 30 volatile size_t lead_idx; 31 31 32 const u nsignednthreads = 17;33 const u nsignedstop_count = 327;32 const uint64_t nthreads = 17; 33 const uint64_t stop_count = 327; 34 34 35 35 thread$ * the_main; -
tests/io/away_fair.cfa
r25b0fde rd2ad151 67 67 #endif 68 68 69 yield( prng( this, 15 ) );69 yield( (unsigned)prng( this, 15 ) ); 70 70 71 71 #if CFA_HAVE_LINUX_IO_URING_H -
tests/io/comp_basic.cfa
r25b0fde rd2ad151 58 58 block( globals.bar ); 59 59 60 yield( prng( this, 15 ) );60 yield( (unsigned)prng( this, 15 ) ); 61 61 62 62 unsigned i = __atomic_add_fetch( &counter, 1, __ATOMIC_SEQ_CST ); -
tests/io/comp_fair.cfa
r25b0fde rd2ad151 78 78 block( globals.bar ); 79 79 80 yield( prng( this, 15 ) );80 yield( (unsigned)prng( this, 15 ) ); 81 81 82 82 unsigned i = __atomic_add_fetch( &counter, 1, __ATOMIC_SEQ_CST );
Note:
See TracChangeset
for help on using the changeset viewer.