updated to allow for fine-grained parallelism via OpenMP. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The total number of threads can be controlled by a new program argument "-n". The default value is the
total number of threads available to the system. This can easily be changed by altering the assignment
at the top of the main.cpp file.
For comparison, when running on the sample data with 1 thread:
real 0m23.472s
user 0m19.635s
sys 0m0.024s
and with 8 threads:
real 0m6.474s
user 0m26.259s
sys 0m0.025s
The important metric is the "real" time. The user time should be about the same, as it is the summation
across all threads. The final estimates are exactly the same (we should do some more complicated
examples; however, this looks very promising for now).