Request for interest in new library : Bit Logic

I have been working on a library that is used for low level bit manipulation of integral types, and modeling of n-bit length types. I have written it as a template library, for inclusion with the Boost library ( hopefully). This is my public request for interest to see if anyone would be interested in such a library. This code runs under Visual Studio and g++ ( linux, and Mac ) . I have posted a web page with documentation ( still a work in progress ), of most all the functionality in the library. There is also a tar ball there, that has been tested with Boost 1.33.1 . Documentation and source tar-ball can be found here : http://www.emulogic.com/bit_logic Any feedback, positive, negative, suggestions is always appreciated. Also if there is a better suggestion for a name, I am open to it. I realize the Boost.Logic library has a very different purpose than this one, and don't want them to be confused. -Art

Hi, I looked at the docs, but some of the links are broken on the first page. I tried IE and Firefox. I also found some of the examples confusing, such as clicking bit_array -> select, and the example used a bit_vector. Even more confusing is the lack of documentation of the classes' template argument. Also, If I can do the following typedef bit_array<16> 16bits; I would also expect to be able to get the size value at compile time through a const, static value or enum, such as 16bits::size. Chris On 1/31/07, Art Stamness <artstamness@yahoo.com> wrote:

On Jan 31, 2007, at 6:31 PM, Chris Weed wrote:
I have replaced the dead links, and placed unfinished comments next to documentation that are yet to be complete.
I also found some of the examples confusing, such as clicking bit_array -> select, and the example used a bit_vector.
I have added a large note at the top of pages with shared functionality, so any, none, select, iterators, pack, unpack, and flip should all say that these functions are equivalent across bit_containers: bit_array, bit_vector, bit_container adaptor.
Even more confusing is the lack of documentation of the classes' template argument.
I have added template argument list documentation to all classes, and class template functions.
It is there. bit_array<16>::static_size is an enum of value 16. This is done the same as you would find with boost::array<int, 10>::static_size . Thank you for your feedback. -Art

--- Art Stamness wrote:
Can you illustrate the differences between your library, std::bitset, and boost::dynamic_bitset? Cromwell D. Enage ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news

I have begun to add more information about differences with the std::bitset and a bit_array here: http://www.emulogic.com/bit_logic/faq.html These same ideas apply to the dynamic_bitset, I will be adding more documentation on that soon. Thank you for your feedback. On Jan 31, 2007, at 6:59 PM, Cromwell Enage wrote:

I was surprised not to find the least_significant_ bit_index and most_significant_bit_index functions. These can be heavily optimized using binary search and logical and/or manips for integral types, compared to a loop, so it would be especially worth having in your collection. -- Hervé Brönnimann hervebronnimann@mac.com On Jan 31, 2007, at 5:30 PM, Art Stamness wrote:

On 2/1/07, Hervé Brönnimann <hervebronnimann@mac.com> wrote:
To my understanding, these functions are already accepted into Boost under different names. See integer_log2.hpp and lowest_bit.hpp by Gennaro Prota, 2003 - 2004, in boost\pending. Function integer_log2.hpp is implemented using binary search, and function lowest_bit.hpp simply calls integer_log2.hpp. I believe that the codes can be optimized even more using lookup tables, and I work on it together with Alla Serikova. Sincerely, Yura.

As stated by another on the thread, these already exists for the integral types. using boost::lowest_bit I added : find_first, find_next functions. The website has been updated, and a new code drop placed with those functions implemented. As for "most_significant_bit_index" I have not done that yet. Can you think of an example case where that would be helpful? Thank you for the feedback. -Art On Feb 1, 2007, at 6:48 PM, Hervé Brönnimann wrote:
participants (5)
-
Art Stamness
-
Chris Weed
-
Cromwell Enage
-
Hervé Brönnimann
-
Yuriy Koblents-Mishke