[ RFC Patch] GSoC 2019 Conclusion

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[ RFC Patch] GSoC 2019 Conclusion

JeanHeyd Meneide
Dear libstdc++,

     This is the full work for the entirety of Bit Data Structures
patch for libstdc++. The documentation XML includes benchmarks and
future work as well as a few implementation notes as well.

     An overview of the final work is here:
https://thephd.github.io/seize-bits-production-gsoc-2019

     While I am only submitting the patch at the end of GSoC, that by
no means indicates that I am done contributing to libstdc++. As I
worked on these bit data structures for libstdc++, I realized there is
a large portion of functionality I reached for that comes from C++20
that is missing from libstdc++, including <span> and
std::ranges::subrange. Since a lot of the 1.5million+ assertions in my
tests of this bit data structure rely heavily on span and other range
primitives, I think I will need to implement those for libstdc++ first
as a precursor to putting in the full test suite (still available
publicly here: https://github.com/ThePhD/itsy_bitsy/tree/master/tests/run_time/source).

     I look forward to working with the libstdc++ community to slowly
improve libstdc++ and, eventually, glibc for many years to come. ♥

Cheers,
JeanHeyd Meneide

bit_ds.patch (280K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ RFC Patch ] GSoC 2019 Conclusion

JeanHeyd Meneide
Dear libstdc++,

     This is a revision of the bit_ds.patch. The older patch didn't
include any of the tests because a pervasive amount of them depended
on <span> and <ranges> from subrange and make_subrange.

     While I implemented <span> (
https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02109.html ), it would
have been quite a bit much to also commit to implementing ranges,
especially since someone was already working on a cmcstl2 port for
libstdc++ and for GCC.

     So, I implemented a span and ranges polyfill that just sit in the
same directory as the tests with this patch, so the tests can run. I
will remove the span_polyfill and ranges_polyfill when <span> and
<ranges> start making their way into libstdc++ proper! This should
also give later reviewers confidence that the thing actually can be
used and does, indeed, work.

     (The contents of the patch as the same as the last one, modulo a
few tweaks to have the tests run.)

     Tested on x86_64 Linux.

Sincerely,
JeanHeyd Meneide

ThePhD.bit_data_structures.patch.txt (467K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ RFC Patch ] Bit Data Structures [GSoC 2019 Conclusion]

JeanHeyd Meneide
In reply to this post by JeanHeyd Meneide
Dear libstdc++,

     With <span> in GCC, I was able to add most of the tests from the
public repository into the gcc tests. I also added a few more
slim-include headers to include just bit_iterator, bit_view, or
bit_sequence.

     There are some additional SFINAE constraints that need to be
implemented for <span> to make all the tests work. I locally applied a
patch Jonathan Wakely showed me and ran the tests, and all of them
passed. Without it, 2 fail with excess compilation errors related to
SFINAE not constraining overloads for their constructors based on the
lack of SFINAE in __adl_begin and friends. The fix is to either
implement ranges::begin fully, or to add -> decltype(func(_cont)) to
the __adl_func functions in range_access.h.

Best Wishes,
JeanHeyd

On Mon, Aug 26, 2019 at 2:24 PM JeanHeyd Meneide
<[hidden email]> wrote:

>
> Dear libstdc++,
>
>      This is the full work for the entirety of Bit Data Structures
> patch for libstdc++. The documentation XML includes benchmarks and
> future work as well as a few implementation notes as well.
>
>      An overview of the final work is here:
> https://thephd.github.io/seize-bits-production-gsoc-2019
>
>      While I am only submitting the patch at the end of GSoC, that by
> no means indicates that I am done contributing to libstdc++. As I
> worked on these bit data structures for libstdc++, I realized there is
> a large portion of functionality I reached for that comes from C++20
> that is missing from libstdc++, including <span> and
> std::ranges::subrange. Since a lot of the 1.5million+ assertions in my
> tests of this bit data structure rely heavily on span and other range
> primitives, I think I will need to implement those for libstdc++ first
> as a precursor to putting in the full test suite (still available
> publicly here: https://github.com/ThePhD/itsy_bitsy/tree/master/tests/run_time/source).
>
>      I look forward to working with the libstdc++ community to slowly
> improve libstdc++ and, eventually, glibc for many years to come. ♥
>
> Cheers,
> JeanHeyd Meneide

ThePhD.bit_ds.patch.txt (469K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [ RFC Patch ] Bit Data Structures [GSoC 2019 Conclusion]

JeanHeyd Meneide
... Except I should totally remember to attach the /right/ version of
the patch. (Sorry for the noise...!)

- JeanHeyd

On Fri, Sep 6, 2019 at 6:55 PM JeanHeyd Meneide <[hidden email]> wrote:

>
> Dear libstdc++,
>
>      With <span> in GCC, I was able to add most of the tests from the
> public repository into the gcc tests. I also added a few more
> slim-include headers to include just bit_iterator, bit_view, or
> bit_sequence.
>
>      There are some additional SFINAE constraints that need to be
> implemented for <span> to make all the tests work. I locally applied a
> patch Jonathan Wakely showed me and ran the tests, and all of them
> passed. Without it, 2 fail with excess compilation errors related to
> SFINAE not constraining overloads for their constructors based on the
> lack of SFINAE in __adl_begin and friends. The fix is to either
> implement ranges::begin fully, or to add -> decltype(func(_cont)) to
> the __adl_func functions in range_access.h.
>
> Best Wishes,
> JeanHeyd
>
> On Mon, Aug 26, 2019 at 2:24 PM JeanHeyd Meneide
> <[hidden email]> wrote:
> >
> > Dear libstdc++,
> >
> >      This is the full work for the entirety of Bit Data Structures
> > patch for libstdc++. The documentation XML includes benchmarks and
> > future work as well as a few implementation notes as well.
> >
> >      An overview of the final work is here:
> > https://thephd.github.io/seize-bits-production-gsoc-2019
> >
> >      While I am only submitting the patch at the end of GSoC, that by
> > no means indicates that I am done contributing to libstdc++. As I
> > worked on these bit data structures for libstdc++, I realized there is
> > a large portion of functionality I reached for that comes from C++20
> > that is missing from libstdc++, including <span> and
> > std::ranges::subrange. Since a lot of the 1.5million+ assertions in my
> > tests of this bit data structure rely heavily on span and other range
> > primitives, I think I will need to implement those for libstdc++ first
> > as a precursor to putting in the full test suite (still available
> > publicly here: https://github.com/ThePhD/itsy_bitsy/tree/master/tests/run_time/source).
> >
> >      I look forward to working with the libstdc++ community to slowly
> > improve libstdc++ and, eventually, glibc for many years to come. ♥
> >
> > Cheers,
> > JeanHeyd Meneide

ThePhD.bit_ds.patch.txt (470K) Download Attachment