
Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science. I was interested in the bits & ints project, specifically Compressed array and Compressed vector as well as the utilities for bit mask manipulation. Could some one help me better understand the requirements of this project? I would like to draft a proposal for GSoC 2010 and wanted to better understand the project before I write a proposal.

----- Original Message ----- From: "Brian Bartman" <bbartmanboost@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, March 18, 2010 2:45 PM Subject: [boost] Google Summer Of Code
Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science.
I was interested in the bits & ints project, specifically Compressed array and Compressed vector as well as the utilities for bit mask manipulation.
Could some one help me better understand the requirements of this project? I would like to draft a proposal for GSoC 2010 and wanted to better understand the project before I write a proposal.
Hello, I don't know if you are interested in improving Boost.Bitfield. I had two features I wanted to add since long time but I had not time lastly finish them. You can find information related to Boost.Bitfield in https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi.... The two features are: * Add bitfields group Used to easily manipulate groups of bitfields the same way as does C bitfields, but in a portable manner. Example declaration: struct Rgb565 { struct red {}; struct green {}; struct blue {}; typedef bitfields< member<unsigned char, red, 5>, member<unsigned char, green, 6>, member<unsigned char, blue, 5> > type; }; Example usage: Rgb565::type r = make_bitfields<Rgb565::type, 1,2,3>; // Write to a bitfield. r.get<Rgb565::red>() = 23; //or r.set<Rgb565::red>(23); // Read from a bitfield Rgb565::at<Rgb565::blue>::value_type b = r.get<Rgb565::blue>(); Other posibility could be to use unamed bitfields whic are accessed as tuples. typedef bitfields_group<5,6,5 > Rgb565; Rgb565 r; r.get<0>() = 23; // or r.set<0>(23); // Read from a bitfield Rgb565::at<2>::value_type b = r.get<2>(); * Add pointer_plus_bits Based on - the article of Joaquin Optimizing red-black tree color bits (http://bannalia.blogspot.com/2008/11/optimizing-red-black-tree-color-bits.ht...), - the implementation of Ion pointer_plus_bits from Boost.Intrusive (http://www.boost.org/boost/boost/intrusive/pointer_plus_bits.hpp) , and - Clang's QualType smart pointer (Clang's QualType smart pointer) This class will allows to use the unsused bits of a pointer to reduce the size of the nodes containing pointers and bits and sometimes improving also the performances. I have not reached yet the interface I would like to have. For the moment we can do typedef pointer_plus_bits<int*,1,bool>::type pint_and_bool; int i=0; pint_and_bool v1; ASSERT_EQUALS(v1.pointer(),0); ASSERT_EQUALS(v1.small_int(),false); pint_and_bool v2(&i, true); ASSERT_EQUALS(v2.pointer(),&i); ASSERT_EQUALS(v2.small_int(),true); v1.pointer()=v2.pointer(); v1.small_int()=true; ASSERT_EQUALS(v1.pointer(),&i); ASSERT_EQUALS(v1.small_int(),true); typedef pointer_plus_bits< pointer_plus_bits<int*,1,bool>::type ,1, bool>::type pint_and_bool_bool pint_and_bool_bool v1; ASSERT_EQUALS(v1.small_int(),false); ASSERT_EQUALS(v1.pointer().get_pointer(),0); ASSERT_EQUALS(v1.get_pointer().get_pointer(),0); ASSERT_EQUALS(v1.get_pointer().small_int(),false); Let me know if this is related to what you are interested in. best, Vicente

Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science.
I don't know if you are interested in improving Boost.Bitfield. I had two
features I wanted to add since long time but I had not time lastly finish them. You can find information related to Boost.Bitfield in https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi... .
Hi Vicente. I think these would be great components of a "bit-based" proposal. I think I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept), and a compact tuple, which (I think) is basically what you described for the RGB structure. I think the pointer_plus_bits may make the project a bit extensive for the summer, but definitely something to think about as an extension. On my part, I'd like to see compact_vector, compact_tuple and tools for bit and bitmask manipulation, with the pointer space reuse being an optional component. Would you be willing to mentor? Andrew Sutton andrew.n.sutton@gmail.com

Hi there,
I think these would be great components of a "bit-based" proposal. I think I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept), and a compact tuple, which (I think) is basically what you described for the RGB structure.
Boost::GIL offers such functionality already. There, you can create bit_aligned images with up to 5 channels in all combinations possible. Like: typedef bit_aligned_image1_type< 11, gray_layout_t>::type gray11_image_t; or typedef bit_aligned_image1_type< 10, 11, 12, rgb_layout_t>::type rgb101112_image_t; etc. Were you thinking of such a functionality? Regards, Christian

That looks similar however the proposal would be to generalize a capability similar to that one and abstract the functionality into its own data structures. On Thu, Mar 18, 2010 at 3:46 PM, Christian Henning <chhenning@gmail.com>wrote:
Hi there,
I think these would be great components of a "bit-based" proposal. I think I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept), and a compact tuple, which (I think) is basically what you described for the RGB structure.
Boost::GIL offers such functionality already. There, you can create bit_aligned images with up to 5 channels in all combinations possible. Like:
typedef bit_aligned_image1_type< 11, gray_layout_t>::type gray11_image_t;
or
typedef bit_aligned_image1_type< 10, 11, 12, rgb_layout_t>::type rgb101112_image_t;
etc.
Were you thinking of such a functionality?
Regards, Christian _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

----- Original Message ----- From: "Andrew Sutton" <andrew.n.sutton@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, March 18, 2010 8:26 PM Subject: Re: [boost] Google Summer Of Code
Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science.
I don't know if you are interested in improving Boost.Bitfield. I had two
features I wanted to add since long time but I had not time lastly finish them. You can find information related to Boost.Bitfield in https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi... .
Hi Vicente.
I think these would be great components of a "bit-based" proposal. I think I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept),
Could you point me to the library is using this kind of maps? An example?
and a compact tuple, which (I think) is basically what you described for the RGB structure.
Yes I suppose we talk of the same thing.
I think the pointer_plus_bits may make the project a bit extensive for the summer, but definitely something to think about as an extension.
Maybe :(
On my part, I'd like to see compact_vector, compact_tuple and tools for bit and bitmask manipulation, with the pointer space reuse being an optional component.
Would you be willing to mentor?
Who has posted the idea for Bits & Ints? is you? "Bits & Ints Boost could use a utility library that brings together and extends a number of existing data structrues and utilities for working with binary data. This library might include: a.. Multidimensional bitfields or dynamic_bitfields. b.. Compressed value array and vector (like vector<bool> but also for multi-bit values) c.. Programming utilities for bit and bitmask manipulation This may also cover a number of integral special functions, including: a.. Functions for getting carry bits from addition and the high-half of an integer multiply b.. Sign extension from a length of m bits to a length of n c.. Rounding right-shifts (correctly rounded integer divide by powers of 2) d.. Saturating arithmetic operations e.. Multi-word shifts (used for things like inserting in the middle of a vector<bool>) f.. Bit reversal g.. Two-word divide by one-word value (there is often a special instruction for that) h.. Bit-interleaved arithmetic operations (used for Morton order/cache-oblivious traversals of matrices and similar things) i.. Everything from chapter 5 of https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785... " In order to mentor this program I will need to understand what is behind each line. Be free to contact me off line, and we will discuss of this subject. Best, Vicente

I was writing my proposal and going over some of the different ways to suggest implementation for bit masks and utilities, and was wondering if it would be alright to propose to do the work in C++0x which I have been working in for the last two years or so. The project would benefit from the following features in C++0x, Varidic templates (a compact tupple) static_assert (for preventing the user from causing a massive error with 0 width bit fields) constexper s (not part of GCC but its been a couple of months since I last updated) On Thu, Mar 18, 2010 at 2:56 PM, vicente.botet <vicente.botet@wanadoo.fr>wrote:
----- Original Message ----- From: "Andrew Sutton" <andrew.n.sutton@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, March 18, 2010 8:26 PM Subject: Re: [boost] Google Summer Of Code
Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science.
I don't know if you are interested in improving Boost.Bitfield. I had two
features I wanted to add since long time but I had not time lastly
them. You can find information related to Boost.Bitfield in
https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi...
.
Hi Vicente.
I think these would be great components of a "bit-based" proposal. I
finish think
I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept),
Could you point me to the library is using this kind of maps? An example?
and a compact tuple, which (I think) is basically what you described for the RGB structure.
Yes I suppose we talk of the same thing.
I think the pointer_plus_bits may make the project a bit extensive for the summer, but definitely something to think about as an extension.
Maybe :(
On my part, I'd like to see compact_vector, compact_tuple and tools for bit and bitmask manipulation, with the pointer space reuse being an optional component.
Would you be willing to mentor?
Who has posted the idea for Bits & Ints? is you? "Bits & Ints
Boost could use a utility library that brings together and extends a number of existing data structrues and utilities for working with binary data. This library might include:
a.. Multidimensional bitfields or dynamic_bitfields. b.. Compressed value array and vector (like vector<bool> but also for multi-bit values) c.. Programming utilities for bit and bitmask manipulation This may also cover a number of integral special functions, including:
a.. Functions for getting carry bits from addition and the high-half of an integer multiply b.. Sign extension from a length of m bits to a length of n c.. Rounding right-shifts (correctly rounded integer divide by powers of 2) d.. Saturating arithmetic operations e.. Multi-word shifts (used for things like inserting in the middle of a vector<bool>) f.. Bit reversal g.. Two-word divide by one-word value (there is often a special instruction for that) h.. Bit-interleaved arithmetic operations (used for Morton order/cache-oblivious traversals of matrices and similar things) i.. Everything from chapter 5 of https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785... "
In order to mentor this program I will need to understand what is behind each line.
Be free to contact me off line, and we will discuss of this subject.
Best, Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Hi Brian, ----- Original Message ----- From: "Brian Bartman" <bbartmanboost@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, March 30, 2010 4:55 PM Subject: Re: [boost] Google Summer Of Code
I was writing my proposal and going over some of the different ways to suggest implementation for bit masks and utilities, and was wondering if it would be alright to propose to do the work in C++0x which I have been working in for the last two years or so.
The project would benefit from the following features in C++0x, Varidic templates (a compact tupple) static_assert (for preventing the user from causing a massive error with 0 width bit fields) constexper s (not part of GCC but its been a couple of months since I last updated)
I think that the better is to implement something that can be used on a large set of compilers. This includes of course compilers providing C++0x support. For the other, you will need to emulate the C++0x features that are not available, so you will need to emulate variadic templates. static assert is already emmulated either by BOOST_STATEIC_ASSERT or BOOST_MPL_STATIC_ASSERT. You can present a plan that starts with the use of C++0x features if you think it is more convenient, but as the project is not too large I consider that support for the common C++98 compilers is desirable. Best, Vicente
On Thu, Mar 18, 2010 at 2:56 PM, vicente.botet <vicente.botet@wanadoo.fr>wrote:
----- Original Message ----- From: "Andrew Sutton" <andrew.n.sutton@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, March 18, 2010 8:26 PM Subject: Re: [boost] Google Summer Of Code
Hello my name is Brian Bartman and I am an undergraduate at Kent State University Majoring in computer science.
I don't know if you are interested in improving Boost.Bitfield. I had two
features I wanted to add since long time but I had not time lastly
them. You can find information related to Boost.Bitfield in
https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi...
.
Hi Vicente.
I think these would be great components of a "bit-based" proposal. I
finish think
I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept),
Could you point me to the library is using this kind of maps? An example?
and a compact tuple, which (I think) is basically what you described for the RGB structure.
Yes I suppose we talk of the same thing.
I think the pointer_plus_bits may make the project a bit extensive for the summer, but definitely something to think about as an extension.
Maybe :(
On my part, I'd like to see compact_vector, compact_tuple and tools for bit and bitmask manipulation, with the pointer space reuse being an optional component.
Would you be willing to mentor?
Who has posted the idea for Bits & Ints? is you? "Bits & Ints
Boost could use a utility library that brings together and extends a number of existing data structrues and utilities for working with binary data. This library might include:
a.. Multidimensional bitfields or dynamic_bitfields. b.. Compressed value array and vector (like vector<bool> but also for multi-bit values) c.. Programming utilities for bit and bitmask manipulation This may also cover a number of integral special functions, including:
a.. Functions for getting carry bits from addition and the high-half of an integer multiply b.. Sign extension from a length of m bits to a length of n c.. Rounding right-shifts (correctly rounded integer divide by powers of 2) d.. Saturating arithmetic operations e.. Multi-word shifts (used for things like inserting in the middle of a vector<bool>) f.. Bit reversal g.. Two-word divide by one-word value (there is often a special instruction for that) h.. Bit-interleaved arithmetic operations (used for Morton order/cache-oblivious traversals of matrices and similar things) i.. Everything from chapter 5 of https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785... "
In order to mentor this program I will need to understand what is behind each line.
Be free to contact me off line, and we will discuss of this subject.
Best, Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Alright thanks for the feed back I'll keep that in mind. On Tue, Mar 30, 2010 at 11:56 AM, vicente.botet <vicente.botet@wanadoo.fr>wrote:
Hi Brian, ----- Original Message ----- From: "Brian Bartman" <bbartmanboost@gmail.com> To: <boost@lists.boost.org> Sent: Tuesday, March 30, 2010 4:55 PM Subject: Re: [boost] Google Summer Of Code
I was writing my proposal and going over some of the different ways to suggest implementation for bit masks and utilities, and was wondering if it would be alright to propose to do the work in C++0x which I have been working in for the last two years or so.
The project would benefit from the following features in C++0x, Varidic templates (a compact tupple) static_assert (for preventing the user from causing a massive error with 0 width bit fields) constexper s (not part of GCC but its been a couple of months since I last updated)
I think that the better is to implement something that can be used on a large set of compilers. This includes of course compilers providing C++0x support. For the other, you will need to emulate the C++0x features that are not available, so you will need to emulate variadic templates. static assert is already emmulated either by BOOST_STATEIC_ASSERT or BOOST_MPL_STATIC_ASSERT.
You can present a plan that starts with the use of C++0x features if you think it is more convenient, but as the project is not too large I consider that support for the common C++98 compilers is desirable.
Best, Vicente
On Thu, Mar 18, 2010 at 2:56 PM, vicente.botet <vicente.botet@wanadoo.fr wrote:
----- Original Message ----- From: "Andrew Sutton" <andrew.n.sutton@gmail.com> To: <boost@lists.boost.org> Sent: Thursday, March 18, 2010 8:26 PM Subject: Re: [boost] Google Summer Of Code
Hello my name is Brian Bartman and I am an undergraduate at Kent
State
University Majoring in computer science.
I don't know if you are interested in improving Boost.Bitfield. I had two
features I wanted to add since long time but I had not time lastly finish them. You can find information related to Boost.Bitfield in
.
Hi Vicente.
I think these would be great components of a "bit-based" proposal. I think I'd like to see a compact or compressed vector to replace the 1- and 2-bit color maps in Boost (and generalize the concept),
Could you point me to the library is using this kind of maps? An example?
and a compact tuple, which (I think) is basically what you described for the RGB structure.
Yes I suppose we talk of the same thing.
I think the pointer_plus_bits may make the project a bit extensive for the summer, but definitely something to think about as an extension.
Maybe :(
On my part, I'd like to see compact_vector, compact_tuple and tools for bit and bitmask manipulation, with the pointer space reuse being an
https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfi... optional
component.
Would you be willing to mentor?
Who has posted the idea for Bits & Ints? is you? "Bits & Ints
Boost could use a utility library that brings together and extends a number of existing data structrues and utilities for working with binary data. This library might include:
a.. Multidimensional bitfields or dynamic_bitfields. b.. Compressed value array and vector (like vector<bool> but also for multi-bit values) c.. Programming utilities for bit and bitmask manipulation This may also cover a number of integral special functions, including:
a.. Functions for getting carry bits from addition and the high-half of an integer multiply b.. Sign extension from a length of m bits to a length of n c.. Rounding right-shifts (correctly rounded integer divide by powers of 2) d.. Saturating arithmetic operations e.. Multi-word shifts (used for things like inserting in the middle of a vector<bool>) f.. Bit reversal g.. Two-word divide by one-word value (there is often a special instruction for that) h.. Bit-interleaved arithmetic operations (used for Morton order/cache-oblivious traversals of matrices and similar things) i.. Everything from chapter 5 of
https://www-01.ibm.com/chips/techlib/techlib.nsf/techdocs/852569B20050FF7785...
"
In order to mentor this program I will need to understand what is behind each line.
Be free to contact me off line, and we will discuss of this subject.
Best, Vicente
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (4)
-
Andrew Sutton
-
Brian Bartman
-
Christian Henning
-
vicente.botet