Fix formatting.

This commit is contained in:
levlam 2022-02-12 00:48:35 +03:00
parent a11d37dd4c
commit 512c0cd3c2
4 changed files with 15 additions and 14 deletions

View File

@ -7,6 +7,7 @@
#include "td/utils/FlatHashMap.h"
#include <absl/container/flat_hash_map.h>
#include <array>
#include <folly/container/F14Map.h>
#include <map>
#include <unordered_map>

View File

@ -14,7 +14,6 @@
#include <initializer_list>
#include <iterator>
#include <new>
#include <unordered_map>
#include <utility>
namespace td {
@ -585,10 +584,8 @@ using FlatHashSetImpl = FlatHashTable<SetNode<KeyT>, HashT, EqT>;
template <class KeyT, class ValueT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
using FlatHashMap = FlatHashMapImpl<KeyT, ValueT, HashT, EqT>;
//using FlatHashMap = std::unordered_map<KeyT, ValueT, HashT, EqT>;
template <class KeyT, class HashT = std::hash<KeyT>, class EqT = std::equal_to<KeyT>>
using FlatHashSet = FlatHashSetImpl<KeyT, HashT, EqT>;
//using FlatHashSet = std::unordered_set<KeyT, HashT, EqT>;
} // namespace td

View File

@ -383,7 +383,10 @@ static void BM_remove_if_slow(benchmark::State &state) {
auto first_key = table.begin()->first;
{
size_t cnt = 0;
td::table_remove_if(table, [&cnt](auto &) { cnt += 2; return cnt <= N; });
td::table_remove_if(table, [&cnt](auto &) {
cnt += 2;
return cnt <= N;
});
}
while (state.KeepRunningBatch(BATCH_SIZE)) {
for (size_t i = 0; i < BATCH_SIZE; i++) {