stdgpu icon indicating copy to clipboard operation
stdgpu copied to clipboard

bitset: Class name and API

Open stotko opened this issue 6 years ago • 0 comments

Our bitset class is a GPU version of std::bitset which, however, is designed to cover more use cases. In particular, its interface and implementation (run-time fixed-sized) is somewhere between std::bitset (compile-time fixed-sized) and boost::dynamic_bitset (run-time dynamic-sized). This may lead to confusion if users expect the exact same API as std::bitset.

There are several ways to address this issue:

  • Rename it to dynamic_bitset and extend its API to match (as close as possible) boost.
  • Rename it to vector<bool> and change/extend its API to match (as close as possible) vector.
  • Keep the name and extend its API towards boost's version, i.e. considering the non-dynamic-sized functions.

At the moment, the last option seems to be a good compromise. However, it does not fully solve the problem regarding potential user confusion. Since any of the options will break the API, this change is considered for stdgpu 2.0.0

stotko avatar Dec 30 '19 10:12 stotko