Changes in benchmark/readyQ/locality.cfa [3f8baf4:06573b2]
- File:
-
- 1 edited
-
benchmark/readyQ/locality.cfa (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.cfa
r3f8baf4 r06573b2 63 63 } 64 64 65 void access(MyData & this, size_t idx) {65 __attribute__((noinline)) void access(MyData & this, size_t idx) { 66 66 size_t l = this.len; 67 67 this.data[idx % l] += 1; … … 126 126 // ================================================== 127 127 // Do some work by accessing 'cnt' cells in the array 128 void work(MyData & data, size_t cnt, uint64_t & state) {128 __attribute__((noinline)) void work(MyData & data, size_t cnt, uint64_t & state) { 129 129 for (cnt) { 130 130 access(data, __xorshift64(state)); … … 166 166 167 167 void ?{}( MyThread & this, MyData * data, MySpot ** spots, size_t spot_len, size_t cnt, bool share, size_t id) { 168 ((thread&)this){ bench_cluster }; 168 169 this.data = data; 169 170 this.spots.ptr = spots; … … 196 197 unsigned long long global_dmigs = 0; 197 198 198 MyData * data_arrays[nthreads];199 for(i; nthreads) {200 data_arrays[i] = malloc();201 (*data_arrays[i]){ i, wsize };202 }203 204 MySpot * spots[nthreads - nprocs];205 for(i; nthreads - nprocs) {206 spots[i] = malloc();207 (*spots[i]){ i };208 }209 210 199 Time start, end; 211 200 { 201 MyData * data_arrays[nthreads]; 202 for(i; nthreads) { 203 data_arrays[i] = malloc(); 204 (*data_arrays[i]){ i, wsize }; 205 } 206 207 MySpot * spots[nthreads - nprocs]; 208 for(i; nthreads - nprocs) { 209 spots[i] = malloc(); 210 (*spots[i]){ i }; 211 } 212 212 213 BenchCluster bc = { nprocs }; 213 214 threads_left = nprocs; … … 250 251 } 251 252 } 252 } 253 254 printf("Duration (ms) : %'ld\n", (end - start)`dms); 253 254 for(i; nthreads) { 255 delete( data_arrays[i] ); 256 } 257 258 for(i; nthreads - nprocs) { 259 delete( spots[i] ); 260 } 261 } 262 263 printf("Duration (ms) : %'lf\n", (end - start)`dms); 255 264 printf("Number of processors : %'d\n", nprocs); 256 265 printf("Number of threads : %'d\n", nthreads); 257 266 printf("Total Operations(ops) : %'15llu\n", global_count); 258 printf("Work size (64bit words): %'15 llu\n", wsize);267 printf("Work size (64bit words): %'15u\n", wsize); 259 268 printf("Total Operations(ops) : %'15llu\n", global_count); 260 269 printf("Total G Migrations : %'15llu\n", global_gmigs);
Note:
See TracChangeset
for help on using the changeset viewer.