Changeset 3f8baf4
- Timestamp:
- Dec 21, 2020, 6:00:05 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- fe97de26
- Parents:
- 7efb322
- Location:
- benchmark/readyQ
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.cfa
r7efb322 r3f8baf4 36 36 // ================================================== 37 37 struct MyData { 38 uint64_t [16] _p1; // padding38 uint64_t _p1[16]; // padding 39 39 uint64_t * data; 40 40 size_t len; 41 41 processor * ttid; 42 42 size_t id; 43 uint64_t [16] _p2; // padding43 uint64_t _p2[16]; // padding 44 44 }; 45 45 … … 74 74 MyThread * volatile ptr; 75 75 size_t id; 76 uint64_t [16] _p1; // padding76 uint64_t _p1[16]; // padding 77 77 }; 78 78 … … 256 256 printf("Number of threads : %'d\n", nthreads); 257 257 printf("Total Operations(ops) : %'15llu\n", global_count); 258 printf("Work size (64bit words): %'15llu ", wsize);259 printf("Total Operations(ops) : %'15llu ", global_count);260 printf("Total G Migrations : %'15llu ", global_gmigs);261 printf("Total D Migrations : %'15llu ", global_dmigs);258 printf("Work size (64bit words): %'15llu\n", wsize); 259 printf("Total Operations(ops) : %'15llu\n", global_count); 260 printf("Total G Migrations : %'15llu\n", global_gmigs); 261 printf("Total D Migrations : %'15llu\n", global_dmigs); 262 262 printf("Ops per second : %'18.2lf\n", ((double)global_count) / (end - start)`ds); 263 263 printf("ns per ops : %'18.2lf\n", (end - start)`dns / global_count); -
benchmark/readyQ/locality.go
r7efb322 r3f8baf4 75 75 // May exchanges data 76 76 type Spot struct { 77 _p1 [16]uint64 // padding 77 78 ptr uintptr // atomic variable use fo MES 78 79 id int // id for debugging 79 _p [16]uint64 // padding80 _p2 [16]uint64 // padding 80 81 } 81 82 … … 244 245 channels := make([]Spot, nthreads - nprocs) // Number of spots 245 246 for i := range channels { 246 channels[i] = Spot{ uintptr(0), i,[16]uint64{0}} // init spots247 channels[i] = Spot{[16]uint64{0},uintptr(0), i,[16]uint64{0}} // init spots 247 248 } 248 249 -
benchmark/readyQ/locality.rs
r7efb322 r3f8baf4 17 17 // ================================================== 18 18 struct MyData { 19 _p1: [u64; 16], 19 20 data: Vec<u64>, 20 21 ttid: ThreadId, 21 22 _id: usize, 23 _p2: [u64; 16], 22 24 } 23 25 … … 25 27 fn new(id: usize, size: usize) -> MyData { 26 28 MyData { 29 _p1: [0; 16], 27 30 data: vec![0; size], 28 31 ttid: thread::current().id(), 29 32 _id: id, 33 _p2: [0; 16], 30 34 } 31 35 } … … 53 57 // ================================================== 54 58 struct MyCtx { 55 _p1: [ 16]u64,59 _p1: [u64; 16], 56 60 s: sync::Semaphore, 57 61 d: MyDataPtr, 58 62 ttid: ThreadId, 59 63 _id: usize, 60 _p2: [ 16]u64,64 _p2: [u64; 16], 61 65 } 62 66 … … 64 68 fn new(d: *mut MyData, id: usize) -> MyCtx { 65 69 MyCtx { 70 _p1: [0; 16], 66 71 s: sync::Semaphore::new(0), 67 72 d: MyDataPtr{ ptr: d }, 68 73 ttid: thread::current().id(), 69 _id: id 74 _id: id, 75 _p2: [0; 16], 70 76 } 71 77 } … … 83 89 // May exchanges data 84 90 struct MySpot { 91 _p1: [u64; 16], 85 92 ptr: AtomicU64, 86 93 _id: usize, 94 _p2: [u64; 16], 87 95 } 88 96 … … 90 98 fn new(id: usize) -> MySpot { 91 99 let r = MySpot{ 100 _p1: [0; 16], 92 101 ptr: AtomicU64::new(0), 93 102 _id: id, 103 _p2: [0; 16], 94 104 }; 95 105 r
Note: See TracChangeset
for help on using the changeset viewer.