Changeset 94d93510 for benchmark/readyQ
- Timestamp:
- Dec 17, 2020, 2:42:33 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:
- aa1d13c
- Parents:
- 8235415
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
r8235415 r94d93510 83 83 } 84 84 85 func work(data * [] uint64, size uint64, cnt uint64, state * uint64) { 86 for i := uint64(0); i < cnt; i++ { 87 (*data)[__xorshift64(state) % size] += 1 88 } 89 } 90 85 91 func local(result chan uint64, start chan struct{}, size uint64, cnt uint64, channels [] Spot, share bool, id int) { 86 92 state := rand.Uint64() … … 99 105 <- start 100 106 for true { 101 for i := uint64(0); i < cnt; i++ { 102 (*data)[__xorshift64(&state) % size] += 1 103 } 107 work(data, size, cnt, &state) 104 108 105 109 i := __xorshift64(&state) % uint64(len(channels))
Note: See TracChangeset
for help on using the changeset viewer.