Changeset 29702ad for tests/PRNG.cfa
- Timestamp:
- Nov 22, 2022, 10:18:04 AM (3 years ago)
- 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. - File:
-
- 1 edited
-
tests/PRNG.cfa (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/PRNG.cfa
r1553a55 r29702ad 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;
Note:
See TracChangeset
for help on using the changeset viewer.