terminal/src/inc
Michael Niksa 680577f55c
Update til::bitmap to use dynamic_bitset<> + libpopcnt (#5092)
This commit replaces `std::vector<bool>` with `dynamic_bitset<>` by
@pinam45 (https://github.com/pinam45/dynamic_bitset) and with
`libpopcnt` for high-performance bit counting by @kimwalisch
(https://github.com/kimwalisch/libpopcnt).

* [x] In support of performance, incremental rendering, and Terminal
  "not speed enough" as well as my sanity relative to
  `std::vector<bool>`
* [x] Tests updated and passed.
* [x] `LICENSE`, `NOTICE`, and provenance files updated.
* [x] I'm a core contributor. I discussed it with @DHowett-MSFT and
  cleared the licensing checks before pulling this in.

## Details `std::vector<bool>` provided by the Microsoft VC Runtime is
incapable of a great many things. Many of the methods you come to expect
off of `std::vector<T>` that are dutifully presented through the `bool`
variant will spontaneously fail at some future date because it decides
you allocated, resized, or manipulated the `vector<bool>` specialization
in an unsupported manner. Half of the methods will straight up not work
for filling/resizing in bulk. And you will tear your hair out as it will
somehow magically forget the assignment of half the bits you gave it
part way through an iteration then assert out and die.

As such, to preserve my sanity, I searched for an alternative. I came
across the self-contained header-only library `dynamic_bitset` by
@pinam45 which appears to do as much of `boost::dynamic_bitset` as I
wanted, but without including 400kg of boost libraries. It also has a
nifty optional dependency on `libpopcnt` by @kimwalisch that will use
processor-specific extensions for rapidly counting bits. @DHowett-MSFT
and I briefly discussed how nice `popcnt` would have been on
`std::vector<bool>` last week... and now we can have it. (To be fair, I
don't believe I'm using it yet... but we'll be able to easily dial in
`til::bitmap` soon and not worry about a performance hit if we do have
to walk bits and count them thanks to `libpopcnt`.)

This PR specifically focuses on swapping the dependencies out and
ingesting the new libraries. We'll further tune `til::bitmap` in future
pulls as necessary.

## Validation
* [x] Ran the automated tests for bitmap.
* [x] Ran the terminal manually and it looks fine still.
2020-03-25 02:41:10 +00:00
..
CppCoreCheck Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
test Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
til Update til::bitmap to use dynamic_bitset<> + libpopcnt (#5092) 2020-03-25 02:41:10 +00:00
argb.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
conattrs.hpp Add support for passing through extended text attributes, like… (#2917) 2019-10-04 15:53:54 -05:00
conime.h Replace macros with constexpr part 2 (#3416) 2019-11-04 07:37:47 -06:00
conint.h Merge remote-tracking branch 'origin/inbox' into HEAD 2020-02-03 15:16:52 -08:00
conpty-static.h Add support for "reflow"ing the Terminal buffer (#4741) 2020-03-12 17:43:37 -07:00
conpty.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
consoletaeftemplates.hpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
contsf.h add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
cpl_core.h Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
DefaultSettings.h Terminal uses system default for number of rows scrolled at a t… (#3575) 2020-01-06 09:39:02 -08:00
HostAndPropsheetIncludes.h Introduce UiaTextRangeBase::FindText() for Accessibility (#4373) 2020-01-31 23:26:19 +00:00
IDefaultColorProvider.hpp Fix a bunch of spelling errors across the project (#4295) 2020-02-10 20:40:01 +00:00
ITerminalOutputConnection.hpp Apply audit mode to TerminalInput/Adapter/Parser libraries (#4005) 2020-01-03 14:25:21 +00:00
ITerminalOwner.hpp Revert locking changes (#3488) 2019-11-08 13:44:52 -08:00
LibraryIncludes.h Update til::bitmap to use dynamic_bitset<> + libpopcnt (#5092) 2020-03-25 02:41:10 +00:00
operators.hpp Initial release of the Windows Terminal source code 2019-05-02 15:29:04 -07:00
til.h Move ConPTY to use til::bitmap (#5024) 2020-03-23 15:57:54 +00:00
unicode.hpp The Azure cloud shell connector (#1808) 2019-07-25 13:31:41 -07:00
VtIoModes.hpp add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00