Skip to content

Replace a bit counting loop with an efficient population count #1297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2016

Conversation

timattox
Copy link
Contributor

The opal_hwloc_base_get_npus() function needs to count the number of bits turned on in a cpuset.
This patch replaces a linear bit counting loop with a call to an already existing efficient population count routine: hwloc_bitmap_weight()

@rhc54
Copy link
Contributor

rhc54 commented Jan 13, 2016

👍 Thanks Tim!

rhc54 pushed a commit that referenced this pull request Jan 13, 2016
Replace a bit counting loop with an efficient population count
@rhc54 rhc54 merged commit eb65b5f into open-mpi:master Jan 13, 2016
@timattox timattox deleted the use_hwloc_bitmap_weight branch January 14, 2016 17:51
jsquyres pushed a commit to jsquyres/ompi that referenced this pull request Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants