Changeset 8fe35be
- Timestamp:
- Jul 25, 2022, 12:47:05 PM (16 months ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 1f950c3b
- Parents:
- 970fa54
- Location:
- benchmark/readyQ
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/churn.cfa
r970fa54 r8fe35be 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
r970fa54 r8fe35be 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[pi]){}; 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
r970fa54 r8fe35be 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
r970fa54 r8fe35be 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
r970fa54 r8fe35be 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++) { … … 267 267 delete( data_arrays[i] ); 268 268 } 269 delete[](data_arrays); 269 270 270 271 for(size_t i = 0; i < nspots; i++) { 271 272 delete( spots[i] ); 272 273 } 274 275 delete[](threads); 276 delete[](thddata); 273 277 } 274 278 -
benchmark/readyQ/yield.cfa
r970fa54 r8fe35be 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
r970fa54 r8fe35be 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.