2019-05-04 François Dumont <fdumont@gcc.gnu.org> * include/bits/hashtable.h (_Hashtable<>::rehash): Review comment. * include/bits/hashtable_policy.h (_Prime_rehash_policy::_M_bkt_for_elements): Use __builtin_ceill. (_Power2_rehash_policy::_M_bkt_for_elements): Likewise. (_Power2_rehash_policy::_M_next_bkt): Enforce returning a result not smaller than input value rather than always greater. Preserve _M_next_resize if called with 0 input. Use __builtin_floorl. (_Power2_rehash_policy::_M_need_rehash): Rehash only if number of elements + number of insertions is greater than _M_next_resize. Start with 11 buckets if not told otherwise. Use __builtin_floorl. (_Rehash_base<>::reserve): Use rehash policy _M_bkt_for_elements. * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy::_M_next_bkt): Preserve _M_next_resize if called with 0 input. Use __builtin_floorl. (_Prime_rehash_policy::_M_need_rehash): Start with 11 buckets if not told otherwise. Use __builtin_floorl. * testsuite/23_containers/unordered_set/hash_policy/71181.cc: Adapt test to also validate _Power2_rehash_policy. * testsuite/23_containers/unordered_set/hash_policy/power2_rehash.cc: Adapt. From-SVN: r270868
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| allocator | Loading commit data... | |
| buckets | Loading commit data... | |
| cons | Loading commit data... | |
| debug | Loading commit data... | |
| erase | Loading commit data... | |
| hash_policy | Loading commit data... | |
| insert | Loading commit data... | |
| max_load_factor | Loading commit data... | |
| modifiers | Loading commit data... | |
| operations | Loading commit data... | |
| operators | Loading commit data... | |
| requirements | Loading commit data... | |
| 48101-2_neg.cc | Loading commit data... | |
| 48101_neg.cc | Loading commit data... | |
| 55043.cc | Loading commit data... | |
| 56267-2.cc | Loading commit data... | |
| 56267.cc | Loading commit data... | |
| 56278.cc | Loading commit data... | |
| 61143.cc | Loading commit data... | |
| 63456.cc | Loading commit data... | |
| 85965.cc | Loading commit data... | |
| erasure.cc | Loading commit data... | |
| final_hash.cc | Loading commit data... | |
| init-list.cc | Loading commit data... | |
| instantiation_neg.cc | Loading commit data... | |
| observers.cc | Loading commit data... | |
| pmr_typedefs.cc | Loading commit data... | |
| pmr_typedefs_debug.cc | Loading commit data... | |
| range_access.cc | Loading commit data... |