Changeset fd84538
- Timestamp:
- Dec 16, 2020, 3:03:03 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:
- 024fa4b
- Parents:
- 2dd0689
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
r2dd0689 rfd84538 61 61 } 62 62 63 63 func __xorshift64( state * uint64 ) (uint64) { 64 x := *state 65 x ^= x << 13 66 x ^= x >> 7 67 x ^= x << 17 68 *state = x 69 return x 70 } 64 71 65 72 func local(result chan uint64, start chan struct{}, size uint64, cnt uint64, channels [] Spot, share bool) { 66 lrand := rand.New(rand.NewSource(rand.Int63()))73 state := rand.Uint64() 67 74 var data [] uint64 68 75 data = make([]uint64, size) … … 78 85 for true { 79 86 for i := uint64(0); i < cnt; i++ { 80 data[ lrand.Uint64() % size] += 187 data[__xorshift64(&state) % size] += 1 81 88 } 82 89 83 i := lrand.Int() % len(channels)90 i := __xorshift64(&state) % uint64(len(channels)) 84 91 data = channels[i].put(sem, data, share) 85 92 count += 1
Note: See TracChangeset
for help on using the changeset viewer.