Changeset ffec1bf for benchmark/readyQ
- Timestamp:
- Jul 25, 2022, 2:23:28 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 4c48be0, 5cf1228, def751f
- Parents:
- 9e23b446 (diff), 1f950c3b (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. - Location:
- benchmark/readyQ
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/churn.cfa
r9e23b446 rffec1bf 58 58 59 59 threads_left = nthreads; 60 BThrd * threads[nthreads];60 BThrd ** threads = alloc(nthreads); 61 61 for(i; nthreads ) { 62 62 BThrd & t = *(threads[i] = malloc()); … … 90 90 91 91 free(spots); 92 free(threads); 92 93 } 93 94 -
benchmark/readyQ/cycle.cfa
r9e23b446 rffec1bf 52 52 { 53 53 threads_left = tthreads; 54 BThrd * threads[tthreads];55 Partner thddata[tthreads];54 BThrd ** threads = alloc(tthreads); 55 Partner * thddata = alloc(tthreads); 56 56 for(i; tthreads) { 57 (thddata[i]){}; 57 58 unsigned pi = (i + nthreads) % tthreads; 58 59 thddata[i].next = &thddata[pi].self; … … 83 84 delete(threads[i]); 84 85 } 86 free(threads); 87 free(thddata); 85 88 } 86 89 -
benchmark/readyQ/cycle.cpp
r9e23b446 rffec1bf 39 39 { 40 40 threads_left = tthreads; 41 Fibre * threads[tthreads];42 Partner thddata[tthreads];41 Fibre ** threads = new Fibre *[tthreads](); 42 Partner* thddata = new Partner[tthreads](); 43 43 for(unsigned i = 0; i < tthreads; i++) { 44 44 unsigned pi = (i + nthreads) % tthreads; … … 69 69 global_blocks += thddata[i].blocks; 70 70 } 71 72 delete[](threads); 73 delete[](thddata); 71 74 } 72 75 -
benchmark/readyQ/locality.cfa
r9e23b446 rffec1bf 222 222 threads_left = nprocs; 223 223 { 224 MyThread * threads[nthreads];224 MyThread ** threads = alloc(nthreads); 225 225 for(i; nthreads) { 226 226 threads[i] = malloc(); … … 259 259 free( threads[i] ); 260 260 } 261 free( threads ); 261 262 } 262 263 -
benchmark/readyQ/locality.cpp
r9e23b446 rffec1bf 217 217 { 218 218 FibreInit(1, nprocs); 219 MyData * data_arrays[nthreads];219 MyData ** data_arrays = new MyData *[nthreads](); 220 220 for(size_t i = 0; i < nthreads; i++) { 221 221 data_arrays[i] = new MyData( i, wsize ); … … 228 228 229 229 threads_left = nthreads - nspots; 230 Fibre * threads[nthreads];231 MyCtx * thddata[nthreads];230 Fibre ** threads = new Fibre *[nthreads](); 231 MyCtx ** thddata = new MyCtx *[nthreads](); 232 232 { 233 233 for(size_t i = 0; i < nthreads; i++) { … … 240 240 i 241 241 ); 242 threads[i] = new Fibre( reinterpret_cast<void (*)(void *)>(thread_main), thddata[i] ); 242 threads[i] = new Fibre(); 243 threads[i]->run( reinterpret_cast<void (*)(MyCtx*)>(thread_main), thddata[i] ); 243 244 } 244 245 … … 267 268 delete( data_arrays[i] ); 268 269 } 270 delete[](data_arrays); 269 271 270 272 for(size_t i = 0; i < nspots; i++) { 271 273 delete( spots[i] ); 272 274 } 275 276 delete[](threads); 277 delete[](thddata); 273 278 } 274 279 -
benchmark/readyQ/yield.cfa
r9e23b446 rffec1bf 34 34 { 35 35 threads_left = nthreads; 36 Yielder threads[nthreads]; 36 Yielder * threads = alloc(nthreads); 37 for(i; nthreads) { 38 (threads[i]){}; 39 } 40 37 41 printf("Starting\n"); 38 42 … … 52 56 Yielder & y = join( threads[i] ); 53 57 global_counter += y.count; 58 ^(threads[i]){}; 54 59 } 60 free(threads); 55 61 } 56 62 -
benchmark/readyQ/yield.cpp
r9e23b446 rffec1bf 33 33 { 34 34 threads_left = nthreads; 35 Fibre * threads[nthreads];35 Fibre ** threads = new Fibre *[nthreads](); 36 36 for(unsigned i = 0; i < nthreads; i++) { 37 37 threads[i] = new Fibre(); … … 52 52 fibre_join( threads[i], nullptr ); 53 53 } 54 delete[] threads; 54 55 } 55 56
Note: See TracChangeset
for help on using the changeset viewer.