Ignore:
Timestamp:
Dec 21, 2020, 6:00:05 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Fixed the padding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/locality.rs

    r7efb322 r3f8baf4  
    1717// ==================================================
    1818struct MyData {
     19        _p1: [u64; 16],
    1920        data: Vec<u64>,
    2021        ttid: ThreadId,
    2122        _id: usize,
     23        _p2: [u64; 16],
    2224}
    2325
     
    2527        fn new(id: usize, size: usize) -> MyData {
    2628                MyData {
     29                        _p1: [0; 16],
    2730                        data: vec![0; size],
    2831                        ttid: thread::current().id(),
    2932                        _id: id,
     33                        _p2: [0; 16],
    3034                }
    3135        }
     
    5357// ==================================================
    5458struct MyCtx {
    55         _p1: [16]u64,
     59        _p1: [u64; 16],
    5660        s: sync::Semaphore,
    5761        d: MyDataPtr,
    5862        ttid: ThreadId,
    5963        _id: usize,
    60         _p2: [16]u64,
     64        _p2: [u64; 16],
    6165}
    6266
     
    6468        fn new(d: *mut MyData, id: usize) -> MyCtx {
    6569                MyCtx {
     70                        _p1: [0; 16],
    6671                        s: sync::Semaphore::new(0),
    6772                        d: MyDataPtr{ ptr: d },
    6873                        ttid: thread::current().id(),
    69                         _id: id
     74                        _id: id,
     75                        _p2: [0; 16],
    7076                }
    7177        }
     
    8389// May exchanges data
    8490struct MySpot {
     91        _p1: [u64; 16],
    8592        ptr: AtomicU64,
    8693        _id: usize,
     94        _p2: [u64; 16],
    8795}
    8896
     
    9098        fn new(id: usize) -> MySpot {
    9199                let r = MySpot{
     100                        _p1: [0; 16],
    92101                        ptr: AtomicU64::new(0),
    93102                        _id: id,
     103                        _p2: [0; 16],
    94104                };
    95105                r
Note: See TracChangeset for help on using the changeset viewer.