proxygen
|
#include <cstddef>
#include <map>
#include <memory>
#include <stdexcept>
#include <folly/AtomicHashArray.h>
#include <folly/Conv.h>
#include <folly/Memory.h>
#include <folly/hash/Hash.h>
#include <folly/portability/GTest.h>
#include <folly/portability/SysMman.h>
Go to the source code of this file.
Classes | |
class | MmapAllocator< T > |
struct | MmapAllocator< T >::rebind< U > |
struct | EqTraits |
struct | HashTraits |
struct | KeyConvertTraits |
Typedefs | |
typedef AtomicHashArray< char *, int64_t, HashTraits, EqTraits, MmapAllocator< char >, AtomicHashArrayQuadraticProbeFcn, KeyConvertTraits > | AHACstrInt |
using | AHAIntCInt = AtomicHashArray< int64_t, const int32_t > |
Functions | |
template<class KeyT , class ValueT > | |
pair< KeyT, ValueT > | createEntry (int i) |
template<class KeyT , class ValueT , class Allocator = std::allocator<char>, class ProbeFcn = AtomicHashArrayLinearProbeFcn> | |
void | testMap () |
template<class KeyT , class ValueT , class Allocator = std::allocator<char>, class ProbeFcn = AtomicHashArrayLinearProbeFcn> | |
void | testNoncopyableMap () |
TEST (Aha, InsertErase_i32_i32) | |
TEST (Aha, InsertErase_i64_i32) | |
TEST (Aha, InsertErase_i64_i64) | |
TEST (Aha, InsertErase_i32_i64) | |
TEST (Aha, InsertErase_i32_str) | |
TEST (Aha, InsertErase_i64_str) | |
TEST (Aha, Create_cstr_i64) | |
static bool | legalKey (char *a) |
TEST (Aha, LookupAny) | |
TEST (Aha, ConstValue) | |
Variables | |
AHACstrInt::Config | cstrIntCfg |
typedef AtomicHashArray< char*, int64_t, HashTraits, EqTraits, MmapAllocator<char>, AtomicHashArrayQuadraticProbeFcn, KeyConvertTraits> AHACstrInt |
Definition at line 384 of file AtomicHashArrayTest.cpp.
using AHAIntCInt = AtomicHashArray<int64_t, const int32_t> |
Definition at line 432 of file AtomicHashArrayTest.cpp.
Definition at line 98 of file AtomicHashArrayTest.cpp.
References folly::hash::jenkins_rev_mix32().
|
static |
Definition at line 387 of file AtomicHashArrayTest.cpp.
References folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::Config::emptyKey, folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::Config::erasedKey, and folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::Config::lockedKey.
Referenced by EqTraits::operator()(), and TEST().
TEST | ( | Aha | , |
InsertErase_i32_i32 | |||
) |
Definition at line 192 of file AtomicHashArrayTest.cpp.
References int32_t, testMap(), and testNoncopyableMap().
TEST | ( | Aha | , |
InsertErase_i64_i32 | |||
) |
Definition at line 218 of file AtomicHashArrayTest.cpp.
References int32_t, int64_t, testMap(), and testNoncopyableMap().
TEST | ( | Aha | , |
InsertErase_i64_i64 | |||
) |
Definition at line 244 of file AtomicHashArrayTest.cpp.
References int64_t, testMap(), and testNoncopyableMap().
TEST | ( | Aha | , |
InsertErase_i32_i64 | |||
) |
Definition at line 270 of file AtomicHashArrayTest.cpp.
References int32_t, int64_t, testMap(), and testNoncopyableMap().
TEST | ( | Aha | , |
InsertErase_i32_str | |||
) |
Definition at line 296 of file AtomicHashArrayTest.cpp.
References int32_t, string, and testMap().
TEST | ( | Aha | , |
InsertErase_i64_str | |||
) |
Definition at line 310 of file AtomicHashArrayTest.cpp.
References int64_t, string, and testMap().
TEST | ( | Aha | , |
Create_cstr_i64 | |||
) |
Definition at line 325 of file AtomicHashArrayTest.cpp.
References a, and legalKey().
TEST | ( | Aha | , |
LookupAny | |||
) |
Definition at line 392 of file AtomicHashArrayTest.cpp.
References folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::create(), EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, bm::free(), and SCOPE_EXIT.
TEST | ( | Aha | , |
ConstValue | |||
) |
Definition at line 434 of file AtomicHashArrayTest.cpp.
References folly::AtomicHashArray< KeyT, ValueT, HashFcn, EqualFcn, Allocator, ProbeFcn, KeyConvertFcn >::create().
void testMap | ( | ) |
Definition at line 108 of file AtomicHashArrayTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, and i.
Referenced by getBenchPerfectIndexMapUniqueGetsCodeTestMap(), getBenchPerfectIndexMapUniqueGetsOtherStringTestMap(), getBenchUnorderedMapUniqueGetsTestMap(), and TEST().
void testNoncopyableMap | ( | ) |
Definition at line 166 of file AtomicHashArrayTest.cpp.
Referenced by TEST().
AHACstrInt::Config cstrIntCfg |
Definition at line 385 of file AtomicHashArrayTest.cpp.