boostorg / dynamic_bitset

Boost.org dynamic_bitset module
http://boost.org/libs/dynamic_bitset
Boost Software License 1.0
38 stars 59 forks source link

dynamic_bitset cannot be used in a parallel program #52

Closed alexanderkjeldaas closed 4 years ago

alexanderkjeldaas commented 4 years ago

Ok, it can be used, but not in any reasonably efficient manner.

A natural way to use a bitset in a parallel program is to work on sections of the bitset.

This requires being able to see a "view" of the bitset.

An option to create a read-only view into a bitset in O(1) time would suffice in a lot of cases.

Consider the case where a set of bitsets are processed in parallel and a various sections of the bitsets are processed. In such a scenario, the threads can have local bitsets as storage, but would need to read slices of shared bitsets.

Writing back to a bitset in parallel could be more problematic, but a slice API that snaps to the closest block size could be used.

mclow commented 4 years ago

I'm having a hard time seeing this as an "issue". A major piece of new functionality being requested, sure - but an 'issue'?

alexanderkjeldaas commented 4 years ago

I don't understand. Is there a tag needed for a feature request?

glenfe commented 4 years ago

@alexanderkjeldaas, what you're asking for isn't so much a feature for boost::dynamic_bitset as much as it is its own (new) class. The Boost mailing list (http://lists.boost.org/) is probably the best place to start with that.