Changeset f03209d3 for benchmark/readyQ/locality.go
- Timestamp:
- Jan 5, 2021, 5:51:30 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 4468a70, 587a608
- Parents:
- ed1a6374
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/readyQ/locality.go
red1a6374 rf03209d3 221 221 func main() { 222 222 // Benchmark specific command line arguments 223 nspotsOpt := flag.Int ("n", 0 , "Number of spots where threads sleep (nthreads - nspots are active at the same time)") 223 224 work_sizeOpt := flag.Uint64("w", 2 , "Size of the array for each threads, in words (64bit)") 224 225 countOpt := flag.Uint64("c", 2 , "Number of words to touch when working (random pick, cells can be picked more than once)") … … 229 230 230 231 // Eval command line arguments 232 nspots:= *nspotsOpt 231 233 size := *work_sizeOpt 232 234 cnt := *countOpt 233 235 share := *shareOpt 236 237 if nspots == 0 { nspots = nthreads - nprocs; } 234 238 235 239 // Check params … … 241 245 // Make global data 242 246 barrierStart := make(chan struct{}) // Barrier used at the start 243 threads_left = int64(n procs) // Counter for active threads (not 'nthreads' because at all times 'nthreads - nprocs' are blocked)247 threads_left = int64(nthreads - nspots) // Counter for active threads (not 'nthreads' because at all times 'nthreads - nprocs' are blocked) 244 248 result := make(chan Result) // Channel for results 245 channels := make([]Spot, n threads - nprocs) // Number of spots249 channels := make([]Spot, nspots) // Number of spots 246 250 for i := range channels { 247 251 channels[i] = Spot{[16]uint64{0},uintptr(0), i,[16]uint64{0}} // init spots
Note: See TracChangeset
for help on using the changeset viewer.