Skip to content

a program demonstrating the potential efficiency gains (or losses) from the use of pthreads and a simple lockless algorithm given an arbitrary number of cores/threads

License

Notifications You must be signed in to change notification settings

jkeys-ecg-nmsu/pthreads-timing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pthreads-timing

A short program demonstrating the benefits of pthreads on a parallelizable algorithm, a (step-wise) array summation. Each thread is given a block of memory to sum.

  • -b # set the number blocks in which to divide the input array (one block per pthread)
  • -m # set init mode; 0 for arr[i] = i, 1 for rng
  • -p # the step size for the array summation (default 1, with a single pass over each block)
  • -r # the seed (the random number generator is unseeded if this value is not provided)

About

a program demonstrating the potential efficiency gains (or losses) from the use of pthreads and a simple lockless algorithm given an arbitrary number of cores/threads

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published