summaryrefslogtreecommitdiff
path: root/absl/hash
Commit message (Collapse)AuthorAge
* Split absl/hash/hash_test.cc into two filesGravatar Benjamin Barenblat2023-05-25
| | | | | | | | | | hash_test.cc leans heavily on INSTANTIATE_TYPED_TEST_SUITE_P, which is quite memory- and CPU-hungry. Split a few heavyweight tests into a new hash_instantiated_test.cc, reducing peak RAM consumption (or, on multicore systems, compilation time). PiperOrigin-RevId: 535305679 Change-Id: Ic204da0a47c749c3f7db5f902ade8d74ed3043bb
* trivial: format some files using clang-formatGravatar Patrick Xia2023-04-27
| | | | | PiperOrigin-RevId: 527598377 Change-Id: I0ae1505db595b7f3a420f2f608c6e02f8800f138
* Fix some spelling mistakesGravatar Vertexwahn2023-04-24
|
* `AbslHashValue()` applied to a C-style array simply decays the array to a ↵Gravatar Abseil Team2023-04-20
| | | | | | | pointer and hashes that, which is very unlikely to be what the author intended. PiperOrigin-RevId: 525923741 Change-Id: I876dbde341f0b0642fa3d10e3f67b0b31d0311bf
* Hash support for std::wstring_view/u16string_view/u32string_viewGravatar Abseil Team2023-03-24
| | | | | PiperOrigin-RevId: 519200954 Change-Id: I349023cacab0ac4cbefb8505efd29a5eda1e9067
* [absl] Update documentation to reflect hash support for std::wstring, ↵Gravatar Lawrence Wolf-Sonkin2023-03-10
| | | | | | | std::u16string and std::u32stringstrings PiperOrigin-RevId: 515726337 Change-Id: I08e184ec1f7169835c034ac45a7e87293dc53078
* Merge pull request #1388 from miladfarca:fix-Read1To3-on-BEGravatar Copybara-Service2023-02-22
|\ | | | | | | | | PiperOrigin-RevId: 511499093 Change-Id: I9ea2bbc38cbe8bd9dae937626d8faac41c010b38
* \ Merge pull request #1401 from AtariDreams:appleGravatar Copybara-Service2023-02-21
|\ \ | | | | | | | | | | | | PiperOrigin-RevId: 511270860 Change-Id: Ib7de8c72505bf141d450f950074a27f9f4f1613c
| * | Remove check for apple_build_version for hash workaroundGravatar Rose2023-02-21
|/ / | | | | | | Apple's clang fork has the missing commit now, and we can safely use the above codepath.
| * Fix Read1To3 on big EndianGravatar Milad Fa2023-02-15
|/
* Fix a discrepancy between absl::Hash and absl::HashOf for some negative ↵Gravatar Abseil Team2023-02-06
| | | | | | | signed integral types and improve the performance of absl::Hash. PiperOrigin-RevId: 507598042 Change-Id: I96a7bd6b9c360f435f216b2671ae84d9768a46e8
* Tweak the compilation condition for IsHashableTest.PoisonHashGravatar Derek Mauro2023-01-17
| | | | | | | #1359 PiperOrigin-RevId: 502597369 Change-Id: I5d65ed7e2dbe4b51ebce47f282ead89d91d919cd
* Replace absl::Hash for inputs from 9 to 16 bytes according to AlphaZero findingsGravatar Abseil Team2023-01-07
| | | | | PiperOrigin-RevId: 500401844 Change-Id: I6d0909a8e395c914861dd034824a34737a52d71f
* Eliminate AArch64-specific code paths from LowLevelHashGravatar Benjamin Barenblat2022-12-08
| | | | | | | | | | | | | | After internal investigation, it’s no longer clear that the alternative LowLevelHash mixer committed in a05366d851c5cb88065272f951e03955197e7c11 unequivocally improves performance on AArch64. It unnecessarily reduces performance on Apple Silicon and the AWS Graviton. It also lowers hash quality, which offsets much of the performance gain it provides on the Arm Neoverse N1 (see https://github.com/abseil/abseil-cpp/issues/1093). Switch back to the original mixer. Closes: https://github.com/abseil/abseil-cpp/issues/1093 PiperOrigin-RevId: 493941913 Change-Id: I84c789b2f88c91dec22f6f0f6e8c5129d2939a6f
* CMake: Mark absl::cord_test_helpers and absl::spy_hash_state PUBLICGravatar Abseil Team2022-10-03
| | | | | PiperOrigin-RevId: 478611460 Change-Id: I327dbd1c16a22649e3a25b9ebbc94b48a2fda26f
* Fix "unsafe narrowing" warnings in absl, 10/n.Gravatar Abseil Team2022-09-08
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on tests.) Bug: chromium:1292951 PiperOrigin-RevId: 473055916 Change-Id: I40cdd6c87ba9d0a5fb2db5746cff04f14ee829c2
* CMake: Mark hash_testing as a public testonly library, as it is with BazelGravatar Derek Mauro2022-09-02
| | | | | PiperOrigin-RevId: 471833563 Change-Id: Ida281308afab67e73b2da61418e82b22c2110ef9
* Workaround bug in GCC 7.2Gravatar Jonathan Conder2022-08-12
| | | | | | See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83830. Before GCC 7.4, __cpp_lib_has_unique_object_representations was defined but has_unique_object_representations_v was not.
* Fix "unsafe narrowing" warnings in absl, 2/n.Gravatar Abseil Team2022-08-01
| | | | | | | | | | | | | | | Addresses failures with the following, in some files: -Wshorten-64-to-32 -Wimplicit-int-conversion -Wsign-compare -Wsign-conversion -Wtautological-unsigned-zero-compare (This specific CL focuses on .cc files in dirs a-h.) Bug: chromium:1292951 PiperOrigin-RevId: 464541951 Change-Id: If23b63ccea8e9b730159ff1c7288e9300a40b6bd
* Fix -Warray-parameter warningGravatar Abseil Team2022-07-13
| | | | | | | | | | Clang recently added this warning which flags inconsistencies between array parameters in function declarations. See https://crbug.com/1343303 PiperOrigin-RevId: 460725261 Change-Id: I57b1e99f13698c947e948c6024e3f6f4642ea189
* Export of internal Abseil changesGravatar Abseil Team2022-04-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f4c7e510922668c68be4aa79a00867c3d3ca9f95 by Derek Mauro <dmauro@google.com>: Many improvements to LeakChecker builds The presence of the LeakChecker is now detected when possible. GCC users using LeakChecker in standalone mode still need to use -DLEAK_CHECKER. This is now documented in the header. The hacky targets used for testing leak checking have been removed in favor of testing in AddressSanitizer mode on Kokoro. Fixes #885 Fixes #1153 PiperOrigin-RevId: 441203393 Change-Id: Ibe64ef6b104bcaf31839ff7184e558cc86abdd1c -- 5c70a23aa83b8152ab95d2cf21662fc63c80ef7d by Abseil Team <absl-team@google.com>: Add a benchmark for stacktrace PiperOrigin-RevId: 441196473 Change-Id: I4c9aa2e797aa2cae09abfaaee3abe5c09eb62fc4 -- 50b406052273b9d5bad04a7860a96e4d5d956c02 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 441114481 Change-Id: I667af7a50d5631ca91289dd24c91ba90233e0184 -- 568b4eaac120b420bce5290179d407d2b57d5bae by Dino Radakovic <dinor@google.com>: Internal change PiperOrigin-RevId: 440894155 Change-Id: Ia587ffc65a8321126585fb363b7c0ca8cc2a0da2 -- d53948eace4f3a10ac5a6c1496dc51b81adc412c by Abseil Team <absl-team@google.com>: Explicitly give internal linkage to symbols which are not used outside of their translation units. PiperOrigin-RevId: 440424519 Change-Id: I531c5e229d443375483b7550a34f48042589a99b GitOrigin-RevId: f4c7e510922668c68be4aa79a00867c3d3ca9f95
* Export of internal Abseil changesGravatar Abseil Team2022-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- afa44fa0245a1cfb1824ef9697b3fa77fa9615c9 by Laramie Leavitt <lar@google.com>: Comment CMakeLists.txt about internal absl_cc_library() targets. From what I can tell, these are the CMake targets that are public: absl::algorithm absl::algorithm_container absl::base absl::core_headers absl::dynamic_annotations absl::log_severity absl::cleanup absl::btree absl::fixed_array absl::flat_hash_map absl::flat_hash_set absl::inlined_vector absl::node_hash_map absl::node_hash_set absl::debugging absl::failure_signal_handler absl::leak_check absl::leak_check_disable absl::stacktrace absl::symbolize absl::flags absl::flags_commandlineflag absl::flags_config absl::flags_marshalling absl::flags_parse absl::flags_reflection absl::flags_usage absl::bind_front absl::function_ref absl::hash absl::hash_testing absl::memory absl::meta absl::type_traits absl::bits absl::int128 absl::numeric absl::numeric_representation absl::exponential_biased absl::periodic_sampler absl::sample_recorder absl::random_bit_gen_ref absl::random_distributions absl::random_mocking_bit_gen absl::random_random absl::random_seed_gen_exception absl::random_seed_sequences absl::status absl::statusor absl::cord absl::cord_test_helpers absl::str_format absl::strings absl::synchronization absl::civil_time absl::time absl::time_zone absl::any absl::bad_any_cast absl::bad_optional_access absl::bad_variant_access absl::compare absl::optional absl::span absl::variant absl::utility PiperOrigin-RevId: 438702788 Change-Id: Icf611c35e88f03cd2493a95f61617605305d4e8e -- a99f60847578e6c0df6befadb29a01c86def0d21 by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 438647928 Change-Id: I141eadd17d6e8607df25ebc893aecefa0239a72f -- b23e77e8f62a77023188594390c9e491c507d22c by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 438628502 Change-Id: I40c4297716c8c1621ba8b02a22393bfcbefb5b5e GitOrigin-RevId: afa44fa0245a1cfb1824ef9697b3fa77fa9615c9
* Replace the implementation of the Mix function in arm64 back to 128bit ↵Gravatar Ren Zibei2022-03-28
| | | | multiplication (#1094)
* Export of internal Abseil changesGravatar Abseil Team2022-03-15
| | | | | | | | | | | | | | | | | | | | | | | | | -- 5dc885f2b62993bccf33a3f3b99f7e460c819c89 by Derek Mauro <dmauro@google.com>: Remove the internal-only ABSL_INTERNAL_ASSUME now that ABSL_ASSUME is available and ABSL_INTERNAL_ASSUME has no more users. Improve the documentation to ABSL_ASSUME somewhat. PiperOrigin-RevId: 434803125 Change-Id: I7c27418463ffc1c7e10ecd50e2d17f348f686af7 -- 4aea19a0ef596228c9136a4c2446e6f25085f23c by Derek Mauro <dmauro@google.com>: Update documentation to warn against using absl::Hash across dynamically loaded libraries Fixes #1128 PiperOrigin-RevId: 434723247 Change-Id: Ib0c7ba03b2cab98b42e19e85be6833192d4b4067 GitOrigin-RevId: 5dc885f2b62993bccf33a3f3b99f7e460c819c89
* Export of internal Abseil changesGravatar Abseil Team2022-03-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- f0b7d230a90c82c6fee7adcb46a213d2582b6a7b by Martijn Vels <mvels@google.com>: Optimize substring logic now that CONCAT is removed This CL adds a static Substring() method to CordRepSubstring, and implements substring logic in cord.cc in terms of the new function. This cleans up various helper functions and logic remaining from previous complex CONCAT logic that is no longer needed. PiperOrigin-RevId: 431756805 Change-Id: I39c875b5af119916780e68598c7fc619fb2e8476 -- fa7d1bedf0e1244303844869a332c2a5dbd9ac0f by Derek Mauro <dmauro@google.com>: Allow macro expansion within ABSL_FLAG and ABSL_DECLARE_FLAG args PiperOrigin-RevId: 431721184 Change-Id: I6e19713fb541205d796f940998db5ee25178d55e -- 1b328badd92304ed1c634f23e1c191be57b7bb15 by Laramie Leavitt <lar@google.com>: Add #include for std:: types PiperOrigin-RevId: 431546757 Change-Id: I75efbcd3c77e6f53e4db66494101d30d670d988e -- e25323b299d4d3840218702860f537cdd2a3926f by Thomas Köppe <tkoeppe@google.com>: Add hashing support for pointers to member. Also add tests for function pointers to the existing "pointer" test. PiperOrigin-RevId: 431067588 Change-Id: I3686010635d9fee34c47a418b72402e10737cdbc -- ab27b012a61cf10109fd51932b3b0b05ee78f32f by Laramie Leavitt <lar@google.com>: Avoid use of std::pow in ChiSquare test. PiperOrigin-RevId: 431015830 Change-Id: Idd767ff2f51009ee171de48757207b38330ffea3 -- 28c359135d89061177958580fe4a7493802499cb by Laramie Leavitt <lar@google.com>: Add #include <type_traits> for std::false_type PiperOrigin-RevId: 431005757 Change-Id: I85a6a918778601e19512aaea744424cf39018521 -- a920730f23669479d92e3a696d65d0bc3a5b1de1 by Laramie Leavitt <lar@google.com>: #include <utility> for std::declval PiperOrigin-RevId: 431004934 Change-Id: I295237b2d44e9a15e4083698ea121b68ce0a1bb7 GitOrigin-RevId: f0b7d230a90c82c6fee7adcb46a213d2582b6a7b
* Export of internal Abseil changesGravatar Abseil Team2022-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 7fbe730c56c0890f27df47f9ad4f0cfa600c6ad9 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 424639048 -- 1825fcf704e45e881cdd1d2fe3eb2226f523f3cd by Derek Mauro <dmauro@google.com>: Disable tests Table.EnsureNonQuadraticTopNXorSeedByProbeSeqLength and Table.EnsureNonQuadraticTopNLinearTransformByProbeSeqLength again as they are (still) flaky PiperOrigin-RevId: 424616745 -- e624119171d9bceec2f6df023b220a6642070cfb by Abseil Team <absl-team@google.com>: Switch from *_TEST_CASE_P to *_TEST_SUITE_P gtest macros. PiperOrigin-RevId: 424404790 -- a110698c10554fb1f640412db8cd7c5a38b7b8e8 by Abseil Team <absl-team@google.com>: Remove extraneous newline in documentation. PiperOrigin-RevId: 424328502 GitOrigin-RevId: 7fbe730c56c0890f27df47f9ad4f0cfa600c6ad9 Change-Id: I56fd8c7cecf65fe37cb4cf2dde70842867d637d7
* Export of internal Abseil changesGravatar Abseil Team2022-01-19
| | | | | | | | | | | | | | | -- 487c7a754a3b93bc0f9de14bdced48007a96ae55 by Greg Falcon <gfalcon@google.com>: Add support for absl::Hash to hash unordered containers. These can now be hashed directly, as well as combined in AbslHashValue implementations. This also adds a new method, `H::combine_unordered()`, to the public AbslHashValue hash state API. This allows users to implement hash specializations for their own unordered collection types. A traits class, `H::is_hashable<T>`, is also added to the hash state API. H::is_hashable<T>::value reflects whether type T is considered hashable by the AbslHashValue framework. This allows users to properly SFINAE templated versions of AbslHashValue. (The AbslHashValue implementation added to raw_hash_set shows an example of its use.) PiperOrigin-RevId: 422856706 GitOrigin-RevId: 487c7a754a3b93bc0f9de14bdced48007a96ae55 Change-Id: Id31fd4ccba282f8c9ae6fcee6ae0ad0f7879f456
* Export of internal Abseil changesGravatar Abseil Team2021-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 2130ba98c8359b08d97fb16d84dfd05687005dcf by Abseil Team <absl-team@google.com>: Tweaking the documentation of c_all_of to state the effect more directly. PiperOrigin-RevId: 410557900 -- 4732289bf4b56123fed113e36be4710b55c6a6c7 by Greg Falcon <gfalcon@google.com>: Improve the quality of absl::Hash<std::vector<bool>>. This previously dispatched to std::hash<vector<bool>>, which suffers from trivial collisions on many platforms. (They often hash the internal words but no size info, so that, e.g., {1, 1} and {1, 1, 0} collide.) Also extended the unit test to exercise this. PiperOrigin-RevId: 410329943 -- 1c5f3934230a7669f74c96b305251786a265e235 by Greg Falcon <gfalcon@google.com>: Add broader testing of absl hash contracts in the hash unit test. In particular, test that the hash erasure mechanism works. PiperOrigin-RevId: 410312738 -- 5e1923f527ed3d02f6752a5b38d5e1c17a4a146f by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 410290663 -- 8c74bc962b3b98a5908017c345efc592393048ea by Martijn Vels <mvels@google.com>: Add Cord::CreateFlat() function PiperOrigin-RevId: 410260776 -- bd0de4e94c85620d3b8dd60fae367b730fc4cb34 by Evan Brown <ezb@google.com>: Rename node_hash_policy to node_slot_policy. Motivation: we can potentially reuse this code for node_btree_*. PiperOrigin-RevId: 410082271 GitOrigin-RevId: 2130ba98c8359b08d97fb16d84dfd05687005dcf Change-Id: Ie052084cf992dee250d8b2f388d39c4de0dcff40
* Remove bazelbuild/rules_cc dependency (#1038)Gravatar Vertexwahn2021-10-14
|
* Fix hashing on big endian platforms (#1028)Gravatar Milad Fa2021-10-06
| | | | | | | | | | | Avoid using libstdc++'s implementation of std::hash<std::bitset> and std::hash<std::vector> on big endian platforms in the implementation of absl::Hash. This is a workaround for a buggy implementation that results in many collisions. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102531 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98731
* Export of internal Abseil changesGravatar Abseil Team2021-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 506fa3e10b3d8399ad937c32ecea26d1ad4e62bb by Abseil Team <absl-team@google.com>: Disable ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE when GCC < 8.2.0 is used with libc++ PiperOrigin-RevId: 399707056 -- 656b7c7cee87f46a4bc7953618796f82da08e62c by Derek Mauro <dmauro@google.com>: Remove the MSVC flag implementation from flag.h to help clarify that methods on absl::Flag<T> are not part of the public API PiperOrigin-RevId: 399584678 -- a92a9bc156303bc663b84c4b704891ec8f67e333 by Abseil Team <absl-team@google.com>: Get rid of MemcpyIfAllowed while continuing to suppress erroneous warnings PiperOrigin-RevId: 399468864 -- 5f9a66895f707ba001fb51b88c0c6025f8c872a3 by Abseil Team <absl-team@google.com>: Use feature testing to check for availability of invoke_result. Feature testing should be available by C++20, which removes invoke_result. https://en.cppreference.com/w/cpp/feature_test PiperOrigin-RevId: 399447373 -- 946c0a502b4499dbfcabf1ab93ddde0048288fb4 by CJ Johnson <johnsoncj@google.com>: Add rvalue-reference qualifier to the Commit method on ConstructionTransaction PiperOrigin-RevId: 399442206 -- 726a4d036eff49aeb6fd0ca2b1775699b6844395 by Greg Falcon <gfalcon@google.com>: Internal change PiperOrigin-RevId: 399441870 -- 1df6d3f659b88dbac13c3d8e13db23bb3844ece2 by Abseil Team <absl-team@google.com>: Clang-format whitespace changes PiperOrigin-RevId: 399281271 -- 4a828cde95a07421d699ebac775b37810624214f by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 399234071 -- e520c72b34ba2f98668c889139001f8276243d31 by Greg Falcon <gfalcon@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 399233662 GitOrigin-RevId: 506fa3e10b3d8399ad937c32ecea26d1ad4e62bb Change-Id: I92b9176d2387c08eb167f9268efa78b55b8e09c2
* Export of internal Abseil changesGravatar Abseil Team2021-08-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 04cb3b22497190170aa5b774e98080c5de2ba60b by Abseil Team <absl-team@google.com>: Alternative bit mixer for LowLevelHash on ARM LowLevelHash's bit-mixer is inefficient on ARM because it calculates a 128-bit product of two 64-bit numbers. On ARM, this requires a sequence of two instructions with a high combined latency and poor throughput. This change provides alternative bit-mixing code for ARM that uses only 64-bit arithmetic (multiplication, xor, and left-shifts) and speeds things up considerably. The bit-mixing code for ARM was inspired by by Woothash[1] and xxh3[1]. Once I landed on a sequence of operations that provided good mixing, I used a test harness to search for the combination of shift / rotate factors that provided the best mixing, as indicated by SMHasher hash quality tests. The new mixing code passes 13 out of 15 of the hash quality test suites in SMHasher, with the two failures being in the noise range: e.g. 1 collision vs. zero expected in a keyset of ~8m keys. [1]: https://github.com/tommyettinger/waterhash/blob/49f5cf0b63b9/woothash.h#L16-L20 [2]: https://github.com/Cyan4973/xxHash/blob/6853ddc36e46/xxhash.h#L3240-L3265 PiperOrigin-RevId: 391833008 -- 17a4de1f9d623155c75b19285d414cd55a487cd6 by Saleem Abdulrasool <abdulras@google.com>: debugging: add support for unwinding on RISCV Linux This adds partial support for unwinding the RISCV call stack. It is largely duplicated from the AArch64 support with alterations for the ELF RISCV psABI. This covers RISCV64 and RISCV32, though not the ILP32E calling convention. PiperOrigin-RevId: 391818522 -- 32c93e449327b2cea32b32f6365e84b420fe1ed3 by Gennadiy Rozental <rogeeff@google.com>: New storage for types smaller than 8 bytes. Also adding new read interface for types smaller than or rqual to 8 bytes to avoid passing the pointer. PiperOrigin-RevId: 391726822 -- e987ac08a7787801cbfc7d7c96649e97fa8cff1a by Abseil Team <absl-team@google.com>: Extern template `find_first_non_full` to reduce linkage size for TU with single not inlined function. PiperOrigin-RevId: 391718862 -- 73af9bfcb5bf045089133e18bbd20eb5bb699172 by Gennadiy Rozental <rogeeff@google.com>: Make most non-mutable most int128 methods and friend free functions constexpr. Some functions are implemented offline (at least in some configurations) and can't be made constexpr. Mutable methods can't be made constexpr until we drop c++11 support. Fixes #978 PiperOrigin-RevId: 391706535 GitOrigin-RevId: 04cb3b22497190170aa5b774e98080c5de2ba60b Change-Id: If051fad5ff004e2e82fa53618fc04a6fe3d2d4be
* Export of internal Abseil changesGravatar Abseil Team2021-08-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb by Derek Mauro <dmauro@google.com>: Use the Bazel @platforms repository for platform constraints Fixes #1000 PiperOrigin-RevId: 390644226 -- b34e4d2f8a86b54bd483ec4c9c3dd781ad2d8b68 by Abseil Team <absl-team@google.com>: debugging: add some handling for RISC-V The RISC-V architecture uses a downward growing stack and can host Linux using ELF files. Adjust a few sites accordingly to indicate how to handle the RISC-V architecture. PiperOrigin-RevId: 390631894 -- 5fa3a0961bf3dd0799c048956a0128f7b8113f1e by Samuel Benzaquen <sbenza@google.com>: Rename the buffer hash function to LowLevelHash. Although it started as wyhash, it will depart from it so it does not make sense to keep the name. PiperOrigin-RevId: 390483506 -- 2e7867a2301d58ad4cd5abcaa5fd6f0db973ae7b by Abseil Team <absl-team@google.com>: This is an internal change. PiperOrigin-RevId: 390349746 GitOrigin-RevId: 3a9b4e8e5ecba532db5cc4ac12d12660307ce9fb Change-Id: I322c3762552a2107e6c6b108c25c01e5efa8aecd
* Export of internal Abseil changesGravatar Abseil Team2021-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 1620e8ffaa93ef24510ca60c7fff2a07248ac9f6 by Abseil Team <absl-team@google.com>: Update comment. PiperOrigin-RevId: 382858259 -- 20db116f28469149d10e0f7f8b976cb903dd4879 by Gennadiy Rozental <rogeeff@google.com>: Add benchmark running on multiple flags. Update size_tester to include cost of absl::GetFlag call. Add size_tester invocation for bool flag. New benchmark better represent GetFlag usage. PiperOrigin-RevId: 382820341 -- 2e097ad3811c4e329f75b98877a5e74c1d3d84fd by Abseil Team <absl-team@google.com>: Avoid 64x64->128 multiplication in absl::Hash's mix on AArch64 On AArch64, calculating a 128-bit product is inefficient, because it requires a sequence of two instructions to calculate the upper and lower halves of the result. So calculate a 64-bit product instead. Making MultType 64-bits means the upper 32 bits of the result do not participate in shift/xor, but the add/multiply gives us sufficient mixing. PiperOrigin-RevId: 382625931 -- f3ae3f32cb53168c8dc91b766f2932dc87cec503 by Abseil Team <absl-team@google.com>: Remove homegrown Round implementation absl/time/duration.cc defined a Round implementation to accommodate old versions of MSVC that lacked std::round(long double). Abseil no longer supports those MSVCs, so we don’t need the homegrown implementation anymore. Remove it, and replace calls to it with std::rint. PiperOrigin-RevId: 382605191 -- a13631c91bf5478289e1a512ce215c85501a26f7 by Martijn Vels <mvels@google.com>: Move the Consume() conversion functions out of cord_rep_ring into cord_rep_consume. This makes these functions generic, so we can repurpose these for the new Btree conversion functions. PiperOrigin-RevId: 382594902 -- 7394c737500c2d8371fcf913b21ad1b321ba499d by Benjamin Barenblat <bbaren@google.com>: Remove homegrown Round implementation absl/time/duration.cc defined a Round implementation to accommodate old versions of MSVC that lacked std::round(long double). Abseil no longer supports those MSVCs, so we don’t need the homegrown implementation anymore. Remove it, and replace calls to it with std::rint. PiperOrigin-RevId: 382569900 -- d72a761f43dc5c9b9510c3a1363177ed26646b5d by Abseil Team <absl-team@google.com>: Prefer `getentropy` for Emscripten. It needs a different header, so I've separated it out from the GLIBC check above. PiperOrigin-RevId: 382332475 -- 74e261dbb467741b2ddd8b490e04c531fdd2f559 by Martijn Vels <mvels@google.com>: Add BTREE tag for CordRepNode implementing a Btree cord. This change only forward declared the CordRepBtree class (not implemented yet) and defines the enum value BTREE. While RING and BTREE should never co-exist, we define a new value for BTREE so as not to make transitioning between RING and BTREE harder than it needs to be. This changes shifts the FLAT value / computation from FLAT = 4 to FLAT =5 PiperOrigin-RevId: 382326710 GitOrigin-RevId: 1620e8ffaa93ef24510ca60c7fff2a07248ac9f6 Change-Id: Ia8f99dde3874808f56062bd37ab3e63764099734
* Export of internal Abseil changesGravatar Abseil Team2021-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 373171b46238585c818cec37af26959f5412f813 by Abseil Team <absl-team@google.com>: Build with -Wl,-no-undefined. PiperOrigin-RevId: 381276748 -- da32624792d2948fe83d0ce58794d505799ab5d0 by Benjamin Barenblat <bbaren@google.com>: s/round/rint/ in exponential_biased `rint` differs from `round` in that it uses the current FPU rounding mode. It’s thus potentially faster, since it doesn’t have to save and restore FPU state. It also is more reflective of developer intent – most developers expect all FPU operations to use the current rounding mode, and having exponential_biased follow that rule seems ideal. PiperOrigin-RevId: 381268264 -- 8f860253a4283d2cc8230fe98d7cdf7bcb3e05f1 by Abseil Team <absl-team@google.com>: Internal change. PiperOrigin-RevId: 381264180 GitOrigin-RevId: 373171b46238585c818cec37af26959f5412f813 Change-Id: Iefe60b15c80318a7707e0c32159ac004bfa26d72
* Export of internal Abseil changesGravatar Abseil Team2021-06-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ca5ce10fa5286f2bfb51890a37b547308b8d6d93 by Benjamin Barenblat <bbaren@google.com>: Skip floating-point edge-case tests when using an x87 32-bit Intel CPUs use 80-bit floats for intermediate values, which can change the results of floating point computations from what we normally expect. Identify tests that are sensitive to the x87, and skip them when we’re on 32-bit Intel. PiperOrigin-RevId: 378722613 -- e5798bb017854e7f3b6d8721fed7dd553642b83d by Abseil Team <absl-team@google.com>: Build without -Wl,-no-undefined. PiperOrigin-RevId: 378690619 -- 3587685a2c932405e401546ec383abcfbf8495c8 by Derek Mauro <dmauro@google.com>: Update CCTZ BUILD file. PiperOrigin-RevId: 378688996 -- 06c7841b2bf8851410b716823b7ff9b42d86085e by Derek Mauro <dmauro@google.com>: Change the CMake install test to use installed version of GoogleTest PiperOrigin-RevId: 378537383 -- eaa8122a7062c56bed80e806344cca0c8325bf6f by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 378525523 -- 381f505cce894b8eec031a541855650c4aa46e64 by Abseil Team <absl-team@google.com>: Mark btree_container::clear() with the ABSL_ATTRIBUTE_REINITIALIZES attribute. This prevents false positives in the clang-tidy check bugprone-use-after-move; it allows clear() to be called on a moved-from btree_container without any warnings, and the btree_container will thereafter be regarded as initialized again. PiperOrigin-RevId: 378472690 GitOrigin-RevId: ca5ce10fa5286f2bfb51890a37b547308b8d6d93 Change-Id: I4267246f418538c5baacb562d1a40213fb13f246
* CMake: add option to use Google Test already installed on system (#969)Gravatar Florin Crișan2021-06-09
| | | As of this change, you can use `-DABSL_USE_EXTERNAL_GOOGLETEST=ON -DABSL_FIND_GOOGLETEST=ON` to have Abseil use the standard CMake find_package(GTest) mechanism.
* Export of internal Abseil changesGravatar Abseil Team2021-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- d74f30ef0da7139c30a24eb6c1776bc0c257e642 by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 375779441 -- 25e33cde30d78dbafcb81ee3ce77c3d70c74db5a by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 375520720 -- 46857d17d4dbc6fbd13a27dd82e14ec814dd117a by Samuel Benzaquen <sbenza@google.com>: Add an explicit template parameter barrier to absl::HashOf. PiperOrigin-RevId: 375103300 -- cf2bf52b9a425b0360ed1f46778f0ef1326a3658 by Abseil Team <absl-team@google.com>: Improve string_view API compliance with C++17 std::basic_string_view. This adds missing overloads, default values, and constexpr specifiers. PiperOrigin-RevId: 374885658 -- 41e55166dc5bd3ed7bce567c400781585d55e1ce by Derek Mauro <dmauro@google.com>: Update CI to GCC 11.1, Bazel 4.0.0, CMake 3.20.2, and LLVM git:7bcc0a1e399d461af7ec013ff33bc330a2de6641 PiperOrigin-RevId: 374858288 GitOrigin-RevId: d74f30ef0da7139c30a24eb6c1776bc0c257e642 Change-Id: I657c815c83522b030495ff54ca327e7012ed151e
* Export of internal Abseil changesGravatar Abseil Team2021-05-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9fc37c11b9e46287acef00ee06ed9adcba54dd13 by Greg Falcon <gfalcon@google.com>: Rename absl::hash_internal::HashState to absl::hash_internal::MixingHashState. Before this change, we had two classes named HashState: absl::HashState, the public API used for type erasure, and absl::hash_internal::HashState, the internal concrete implementation ordinarily used. The internal class used to be named `CityHashState`, but we renamed it to `HashState` it when we changed underlying hash implementation to wyhash. This inadvertent naming conflict made the code much harder to read, and this change intends to undo that. PiperOrigin-RevId: 373481959 -- 4aec55ffddebd085c239352a2e20721091f719a1 by Greg Falcon <gfalcon@google.com>: Introduce absl::HashOf(), a convenience wrapper around absl::Hash that calculates hashes from the values of its arguments. PiperOrigin-RevId: 373461406 -- 86b5fd8db50bbc8bd0aa9258523527381fe0445d by Abseil Team <absl-team@google.com>: Improve speed of BlockingCounter by making its most common path lock free. With the new implementation, the fast path of BlockingCounter::DecrementCount() is only a fetch_sub operation. This is most times much more efficient than the previous implementation (full mutex lock/unlock). As a matter of fact, in most actual usecases in practice, the waiter thread is already waiting on the Wait() call when DecrementCount() is called, which makes Mutex::Unlock() take the slow path as there's a waiter thread that it might need to wake up. PiperOrigin-RevId: 373394164 -- 65c876be5eac0cd32583ff8535ede4109d39cf3f by Martijn Vels <mvels@google.com>: Move the 'sample copied cord' logic into MaybeTrackCord(), This changes move the logic for selecting if a cord should remain being sampled from Cord to CordzInfo::MaybeTrackCord, and updates the documentation for the latter method. PiperOrigin-RevId: 373363168 -- e84410bd0aada293a81dfb82656c952e209e21fb by Martijn Vels <mvels@google.com>: Add check for the first call to cordz_should_profile() for each thread. This prevents the first cord of a newly created thread to be always sampled, which is a 'bad' kind of determinism for sampling. PiperOrigin-RevId: 373229768 -- bf09c589dc099ac8f4af780bf7e609c53c27574c by Samuel Benzaquen <sbenza@google.com>: Refactor the Flags structure into an enum. This gives us more control over the representation and allows for easier merging during parsing. PiperOrigin-RevId: 373163038 -- b947b0c51083b7b6508284b5d31819596c91729e by Derek Mauro <dmauro@google.com>: Fixes warnings about shadowed variables Fixes #956 PiperOrigin-RevId: 373158133 GitOrigin-RevId: 9fc37c11b9e46287acef00ee06ed9adcba54dd13 Change-Id: I91f35699f9bf439d1a870c6493946a310afe088c
* Export of internal Abseil changesGravatar Abseil Team2021-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 6cfac39ea1266f01f195de5eb4c9a6fc9ea9b20a by Matt Kulukundis <kfm@google.com>: Fix a typo PiperOrigin-RevId: 366174890 -- 6ee8c58647aef171d394e59fa06f9bf8cd0306ec by Derek Mauro <dmauro@google.com>: Adds `ABSL_ATTRIBUTE_LIFETIME_BOUND` and applies it to the `const std::string&` constructor of `absl::string_view`. Compilers that support this attribute will emit a warning if the parameter does not have sufficient lifetime. PiperOrigin-RevId: 366027738 -- b944427d96e4b436b8fa0fe396c2a1118dbbbd13 by Abseil Team <absl-team@google.com>: Calls to `ResetToEmpty()` from `ClearSlow` use ~3% of the time in assignment. However, `ClearSlow()` is only used in contexts where `data_` is immediately reassigned. Rename `ClearSlow()` into `UnrefTree()` and remove `data_` resetting. PiperOrigin-RevId: 365977213 -- 7428b3147a5672c8bb55649efa3a1cfe19b52a8b by Abseil Team <absl-team@google.com>: Fix CordRepRing diabolical growth The 'Mutable' function in CordRepRing was over-eager in doubling capacity, which lead to 'ludicrous' growth in the diabolical test case as added to cord_test. This CL fixes the doubling for growing shared reps, and tempers CordRepRing growth for non shared capacity to 1.5 instead of 2, which is more inline with a conservative growth we also have in tree cord. After this change, CordRepRing no longer swamps the heap into the shadow realm, and is in effect reducing the memory used compared to the tree implementation. With a diabolical 5000 bytes growth pattern: Tree cord: 1523520 bytes Ring cord: 274232 bytes PiperOrigin-RevId: 365915857 -- f24d4aee48b03c5a7980664df903f947cbb198e8 by Andy Getzendanner <durandal@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 365873932 GitOrigin-RevId: 6cfac39ea1266f01f195de5eb4c9a6fc9ea9b20a Change-Id: I9737aa215ac732c9785a1d0032c77aba62330f12
* Export of internal Abseil changesGravatar Abseil Team2021-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 4ff721439234e91caf6f7b772e5f554e7dd423c8 by Benjamin Barenblat <bbaren@google.com>: Remove endian-sensitivity from hash slow path Prior to this commit, the Abseil hash fast path was endian-agnostic, but the slow path assumed a little-endian platform. Change the slow path to be endian-correct, ensuring that values produced by the fast and slow paths are equal even on big-endian systems. PiperOrigin-RevId: 355424258 -- 7f4fe1aa4de46ad0a2ef19fa9c061fc12a7391ed by Abseil Team <absl-team@google.com>: Directly store CordzInfo in the InlineData data contents of InlineRep This greatly reduces the cost of coping and moving cords. Especially the move constructor and move assignment are now back to lean loads and stores without needing any CordzInfo lookups for tracked cords. PiperOrigin-RevId: 355409161 -- 3ca4ca84ed6d98f1e383ffd8d12c28876e905bb3 by Abseil Team <absl-team@google.com>: Add #include <unordered_map> PiperOrigin-RevId: 355386114 -- 30b0ffad0621971b3135148fcc9e183b0dd2a6bb by Abseil Team <absl-team@google.com>: Optimize Cord copy constructor This change avoids double stores of the Cord copy constructor from the zero init of the InlineData / InlineRep contents followed by the assignment and inlines the copy constructor. PiperOrigin-RevId: 355287939 -- 0c043fa7b6e41ca7cefc5edc1e17ad46223e4e77 by CJ Johnson <johnsoncj@google.com>: Now that the absl::Cleanup example returns absl::Status, since we decided on absl::FailedPreconditionError, the precondition should be a positive statement and then the check should be failure to adhere to that positive statement PiperOrigin-RevId: 355216923 -- 9ed922ca5d28fe8790ec6bc0837cf39fbcc92896 by Gennadiy Rozental <rogeeff@google.com>: Do not set mvsc linker flags for clang-cl (fixes #874) Import of https://github.com/abseil/abseil-cpp/pull/891 PiperOrigin-RevId: 355199380 GitOrigin-RevId: 4ff721439234e91caf6f7b772e5f554e7dd423c8 Change-Id: I3d9d2383549720d7a91f9108dfcd979ad6632fce
* Export of internal Abseil changesGravatar Abseil Team2021-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- cea62ebc5d31c62aabcb94c066d9be506f34baf6 by Abseil Team <absl-team@google.com>: Fix typo in `Cord::EndsWith()` docs PiperOrigin-RevId: 355023067 -- f89225a55476478ec167be50dea543f5414836f9 by Abseil Team <absl-team@google.com>: Add set_cordz_info() and get_cordz_info() methods to InlineData This change has preparations for future (optional) integration of CordzInfo sampling data into Cord's InlineData for non inlined cords. PiperOrigin-RevId: 354965340 -- 324057574aeb697bd3327cb905eb5bca16ade768 by Abseil Team <absl-team@google.com>: Fix two comment typos. PiperOrigin-RevId: 354952568 -- 5bb93ca3d57ead3633e1efde4aa28718987ef64f by CJ Johnson <johnsoncj@google.com>: Clarify doc comment for absl::Cleanup by using absl::Status return type and clarify the engaged state by surfacing the initial value in the public header. PiperOrigin-RevId: 354935253 -- ec95424594b24a1aec9bf7972b2355f37285506a by Abseil Team <absl-team@google.com>: Remove `preserve_most` attribute from CordRep::Destroy() PiperOrigin-RevId: 354921927 GitOrigin-RevId: cea62ebc5d31c62aabcb94c066d9be506f34baf6 Change-Id: Ibe1d66197db7ce9554594e07b1c6e7c6dea3c9da
* Export of internal Abseil changesGravatar Abseil Team2020-12-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 465461299a9814aca325fee599cefbfe462f12fe by Abseil Team <absl-team@google.com>: Optimize trivially copyable flags with a sequence lock PiperOrigin-RevId: 349602779 -- 73f39f959e21121684a51887243abad0814a335e by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 349590869 -- 6b3106fa66b8f075a39a1a8f3265ae132b7e2c84 by Abseil Team <absl-team@google.com>: Remove ABSL_DLL from `log_prefix_hook` and `abort_hook`. PiperOrigin-RevId: 349560499 -- bb0d295e699a509f3284145e025d00036b70dbb2 by Abseil Team <absl-team@google.com>: Tiny docstring fix A small edit to make "use of this is useful" a little less redundant. :) PiperOrigin-RevId: 349445689 GitOrigin-RevId: 465461299a9814aca325fee599cefbfe462f12fe Change-Id: I08cc4091b8b95b68188cb9168ac622dacc5fa688
* Export of internal Abseil changesGravatar Abseil Team2020-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- ff793052bd01e1e4fcf639f94d7c30c4855a9372 by Evan Brown <ezb@google.com>: Roll forward of btree_iterator refactoring. PiperOrigin-RevId: 346116047 -- 17984679f16e3e2139b0f14fa76f4a6ca16a3ef9 by Chris Kennelly <ckennelly@google.com>: Extend absl::StrContains to accept single character needles. Single characters are more efficient to search for. Extending this API allows the abseil-string-find-str-contains Clang Tidy to include this pattern. The C++ committee has adopted http://wg21.link/P1679 for inclusion in C++23. PiperOrigin-RevId: 346095060 -- ef20b31c501b1dcaa25e244fd8f8aa43dec09bd6 by Jorg Brown <jorg@google.com>: Internal change for cord ring PiperOrigin-RevId: 346087545 -- b70f2c1cb77fc9e733a126e790967d45c5fd1dc7 by Derek Mauro <dmauro@google.com>: Release layout_benchmark PiperOrigin-RevId: 345968909 -- 3a0eda337ee43622f92cfe14c2aa06f72dc71ee5 by Derek Mauro <dmauro@google.com>: Release raw_hash_set_probe_benchmark PiperOrigin-RevId: 345965969 -- abffdb4bb241a2264cb4e73a6262b660bb10447d by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 345733599 -- 7c9e24a71188df945be17fe98f700bdb51f81b16 by Derek Mauro <dmauro@google.com>: Release hash_benchmark PiperOrigin-RevId: 345721635 -- d68f33f17f9a8cd3f6da8eee3870bdb46402cdc8 by Derek Mauro <dmauro@google.com>: Release raw_hash_set_benchmark PiperOrigin-RevId: 345708384 -- 6e6c547d4d1327b226c0ffe8ff34d0aa103ce24b by Abseil Team <absl-team@google.com>: Updates the implementation of InlinedVector to accurately express the value-initialization semantics of the default constructor PiperOrigin-RevId: 345548260 -- 1532424deda97d468444c217cc0fa4614099c7c1 by Evan Brown <ezb@google.com>: Rollback btree_iterator refactoring. PiperOrigin-RevId: 345543900 GitOrigin-RevId: ff793052bd01e1e4fcf639f94d7c30c4855a9372 Change-Id: I719831981fd056de41939f9addfee3d85e3b49b2
* Export of internal Abseil changesGravatar Abseil Team2020-11-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- fcedaa5714efab8738446fa21620b827a40a3458 by Derek Mauro <dmauro@google.com>: Uses Wyhash in the implementation of absl::Hash for hashing sequences of more than 16 bytes on some platforms. Due to the per-process randomization of the seed used by absl::Hash, users should not notice this change, other than possibly getting better performance. This change only affects platforms where absl::uint128 is implemented with an intrinsic (and where sizeof(size_t)==8) since Wyhash relies on fast 128-bit multiplication for speed. PiperOrigin-RevId: 343956735 -- 085e108c760084f19caa21dbeb2118de2be3f8f0 by Abseil Team <absl-team@google.com>: Internal change for cord ring PiperOrigin-RevId: 343919274 -- 4c333278ad14d6692f203074b902506008ad624a by Jorg Brown <jorg@google.com>: Minimize strings_internal::StringConstant further, by removing the need for the compiler to instantiate a compile-time class function. PiperOrigin-RevId: 343878568 -- 71c3c8c7b7821b67997e3d5345aaec67f93f266f by Abseil Team <absl-team@google.com>: Internal change PiperOrigin-RevId: 343838259 GitOrigin-RevId: fcedaa5714efab8738446fa21620b827a40a3458 Change-Id: Ifb91895a82d11e743acd42fe97ab7fb70712b7df
* Export of internal Abseil changesGravatar Abseil Team2020-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 77e2a9c277721f23a8df983c1efc6ed97c167964 by Derek Mauro <dmauro@google.com>: Simplify an internal piece of CityHash to remove the conflicting definition of uint128 PiperOrigin-RevId: 342906008 -- 593dbb6d5fd32cc5d31e3ba1eda02e8ddeaeaaf6 by Gennadiy Rozental <rogeeff@google.com>: Skip retired flags in GetAllFlags output. This is a bug fix. We should not have released this interface producing retired flags. There should be no observable difference for the users who should not care about retired flags. PiperOrigin-RevId: 342889378 -- bb77e07abff4dbd0a9c97eb85ee85cb39b84d04a by Abseil Team <absl-team@google.com>: Extract `find_first_not_full` outside of the raw_hash_set. This function is used in the following scenarios: 0. [relatively hot] insert, when actual new element is added. 1. [relatively cold] resize (explicit or on capacity grow) 2. [relatively cold] copy constructor 3. [cold] rehash on insert/erase (aka cache) use cases Resize typically mitigated by `reserve` in performance critical cases. Rehashing happen relatively rare, when hash table become polluted with deleted slots. We keep `find_first_not_full` in header, so that compiler still can inline it, when necessary (most notably in insert use case). This reduce binary size since only one copy of this function will be present in the binary for all tables where the function is not inlined (at least in one case). PiperOrigin-RevId: 342736300 GitOrigin-RevId: 77e2a9c277721f23a8df983c1efc6ed97c167964 Change-Id: I3fe9d054c66049bb598ea35c45fc800b1cdaa9b6
* Export of internal Abseil changesGravatar Abseil Team2020-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 77c85460dc3c46593b231c5161ac55273bb0c7ef by Abseil Team <absl-team@google.com>: Support int128 in SimpleAtoi. PiperOrigin-RevId: 337946262 -- 0be53049ccf8309650e4e22f23b290e5f75ee828 by Gennadiy Rozental <rogeeff@google.com>: Update build scripts to use --mount instead of --volume to mount the host data into a container. This is somewhat more verbose, but more readable and flexible. More importantly this is what docker documentation is recomending to use now. PiperOrigin-RevId: 337898761 -- 3bc877f1679fdf61ecbf4365287a0403cfc9b53e by Samuel Benzaquen <sbenza@google.com>: Add Cord constructor for constinit instances. PiperOrigin-RevId: 337871148 -- 8b87701892b9c325e78ad4e8e4f16b785a744622 by Chris Kennelly <ckennelly@google.com>: Use the address of kSeed, rather than its value. We initialize kSeed with &kSeed, so these are equivalent, but kSeed requires a load from memory while &kSeed can be formed as a RIP-relative lea. PiperOrigin-RevId: 337868415 GitOrigin-RevId: 77c85460dc3c46593b231c5161ac55273bb0c7ef Change-Id: I3d06c18a123f1be29dad5801e8625952dc41cd95
* Export of internal Abseil changesGravatar Abseil Team2020-10-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- a5af5874c1c5cc02bd2a748d455321f82b6f2a93 by Andy Getzendanner <durandal@google.com>: fix compile fails with asan and -Wredundant-decls Import of https://github.com/abseil/abseil-cpp/pull/801 PiperOrigin-RevId: 336693223 -- ed9df42ab2b742386c6692c2bed015374c919d9c by Derek Mauro <dmauro@google.com>: Fix integer conversion warning Fixes #814 PiperOrigin-RevId: 336651814 -- 0ab4c23884e72dce17b67c1eb520f9dbb802565d by Derek Mauro <dmauro@google.com>: Internal change PiperOrigin-RevId: 336585378 -- eba0e3dccd52a6e91bcff84075bef0affc650b74 by Matt Kulukundis <kfm@google.com>: Add bitset operations to Futex helper. PiperOrigin-RevId: 336409368 -- 8b0709a8b4500bf5f0af4b602d76a298d81645e8 by Abseil Team <absl-team@google.com>: Fix code indentation in a comment. PiperOrigin-RevId: 336368167 -- bc3961c87a7e7760c10319a5b0349c279f7ae3ad by Samuel Benzaquen <sbenza@google.com>: Improve performance of the registry: - Reduce contention - Reduce memory usage for each flag by `6*sizeof(void*)`. - Replace one immortal allocation per-flag with a single one for all the flags - Slightly improve single-threaded performance by avoiding the std::map indirections. PiperOrigin-RevId: 336365904 -- 264ad9f28f935aad8b6b1437f8bf804fa9104346 by Abseil Team <absl-team@google.com>: Fix typo in comment on absl::Condition. PiperOrigin-RevId: 336311680 -- b5b808a8c75ca0df7b09eff9a423ec171d80f771 by Derek Mauro <dmauro@google.com>: Add missing Apache license headers PiperOrigin-RevId: 336294980 -- 89446c3a4793df8b95060385cf3e219357c3db1d by Andy Soffer <asoffer@google.com>: Internal changes PiperOrigin-RevId: 336287465 -- 57c8be4e294881bc79a6a44b8e4bf7ecbb19b9b9 by Matt Kulukundis <kfm@google.com>: Extract Futex from an implementation detail of Wait to a private interface. PiperOrigin-RevId: 336123209 GitOrigin-RevId: a5af5874c1c5cc02bd2a748d455321f82b6f2a93 Change-Id: Ie5a0ebe28e571814e3e11d4c05ca308523ccf311
* Export of internal Abseil changesGravatar Abseil Team2020-08-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9c9eb300c95024ea4242bbb4835595f555cb1eed by Derek Mauro <dmauro@google.com>: Sync string_view comments from the internal copy PiperOrigin-RevId: 328582796 -- c0bc4e77a46889430a1a40d836a5ff426a4a5bc9 by Xiaoyi Zhang <zhangxy@google.com>: Make `absl::allocator_traits` an alias to `std::allocator_traits` for C++17 or above. `std::allocator_traits` should have all its members since C++17 so we don't need a backport. PiperOrigin-RevId: 328258154 -- 5599a3c0f2d865128057b5e267a397011cd032d0 by Derek Mauro <dmauro@google.com>: Fix an #endif comment Reported at https://groups.google.com/g/abseil-io/c/GRUdB0bBrG8/m/852HrgchCQAJ PiperOrigin-RevId: 328247093 -- abd7e98088267f436e6c10779e574153ece015be by Abseil Team <absl-team@google.com>: Don't call win32 APIs for UWP builds symbolize.cc is including symbolize_win32.inc for all Windows builds, including UWP builds. However, UWP doesn't have access to win32 APIs, so it should instead include symbolize_unimplemented.inc. This allows the necessary functions to still exist and be called, but the win32 calls are not made. This is part of the effort to enable Abseil in ANGLE: https://anglebug.com/4873 PiperOrigin-RevId: 328226766 -- f622d3dfb804a6f427c1fd86ee69f47785b49483 by Greg Falcon <gfalcon@google.com>: Remove incorrect claims of HASH_NAMESPACE support in Abseil hash. The documentation presently claims that absl::Hash will look for legacy hashers (e.g, in the __gnu_cxx namespace) as controlled by the HASH_NAMESPACE preprocessor define, but this has never been true. (Vestigial support for this appears in the form `ABSL_INTERNAL_LEGACY_HASH_NAMESPACE`, but this is not a supported extension point, as indicated by the use of `INTERNAL` in the name.) PiperOrigin-RevId: 328154123 -- 32b40a25efe1f7f7da98ce8faf3482c825464ed4 by Abseil Team <absl-team@google.com>: Switch ABSL_INTERNAL_IGNORE_READS_ATTRIBUTE_ENABLED checks to defined(). PiperOrigin-RevId: 328151556 GitOrigin-RevId: 9c9eb300c95024ea4242bbb4835595f555cb1eed Change-Id: Ib0686286f7889a976311e8cd2b35655765a8d033
* Export of internal Abseil changesGravatar Abseil Team2020-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -- 9f746b79e16d36dba908ed9e2a586d890fe54acc by Derek Mauro <dmauro@google.com>: Remove the Bazel mirror URL that we use in our WORKSPACE file This doesn't appear to be supported. We use --distdir caching in our tests. PiperOrigin-RevId: 327634738 -- e1f6f54830c415fc8bb8dc14483fae4cf9713d75 by Abseil Team <absl-team@google.com>: Removing comments following license() rules as they are rarely useful, redundant with LICENSE files, and tend to fall out of date. PiperOrigin-RevId: 327504063 -- b59c076638a57a74a3f8475f1dee8b536e32a15f by Gennadiy Rozental <rogeeff@google.com>: Change GetAllFlags API to return a collection of mutable flag handles. This will make this interface on par with FindCommandLineFlag and allow to call CommandLineFlag::ParseFrom on the handle returned by GetAllFlags. PiperOrigin-RevId: 327499084 -- bbf56b3c4a1d908d95e5a52aba38b1984151efff by Gennadiy Rozental <rogeeff@google.com>: Make raw_hash_set compile when AllocTraits::propagate_on_container_swap is false. PiperOrigin-RevId: 327371107 -- 837f62c85ea65c1d6b847a75816198c625fe62ff by Abseil Team <absl-team@google.com>: On macOS, `mem_alloc` is defined like this: rpc/types.h:86:#define mem_alloc(bsize) calloc(1, bsize) So if that file is included before container_memory.h, the variable mem_alloc may never get defined. This is fixed by using a different name. PiperOrigin-RevId: 327360224 -- aa8f5528382c0d01239ce75b645723aaf7e1ef46 by Gennadiy Rozental <rogeeff@google.com>: Release of absl::GetAllFlags API. PiperOrigin-RevId: 327275943 GitOrigin-RevId: 9f746b79e16d36dba908ed9e2a586d890fe54acc Change-Id: I99c5c87dd1712bf8df9a52397b0c1e400a3c3447