|
Blender V4.3
|
#include "BLI_ressource_strings.h"#include "testing/testing.h"#include "MEM_guardedalloc.h"#include "BLI_fileops.h"#include "BLI_ghash.h"#include "BLI_map.hh"#include "BLI_math_vector_types.hh"#include "BLI_rand.h"#include "BLI_string.h"#include "BLI_timeit.hh"#include "BLI_utildefines.h"Go to the source code of this file.
Macros | |
| #define | GHASH_INTERNAL_API |
Functions | |
| static void | print_ghash_stats (GHash *gh) |
| static char * | read_text_corpus () |
| static void | str_ghash_tests (GHash *ghash, const char *id) |
| template<typename MapType > | |
| static void | str_map_tests (MapType &map, const char *id) |
| TEST (ghash, TextGHash) | |
| TEST (ghash, TextMurmur2a) | |
| TEST (ghash, TextMap) | |
| static void | int_ghash_tests (GHash *ghash, const char *id, const uint count) |
| template<typename MapType > | |
| static void | int_map_tests (MapType &map, const char *id, const uint count) |
| TEST (ghash, IntGHash12000) | |
| TEST (ghash, IntMurmur2a12000) | |
| TEST (ghash, IntMap12000) | |
| static void | randint_ghash_tests (GHash *ghash, const char *id, const uint count) |
| template<typename MapType > | |
| static void | randint_map_tests (MapType &map, const char *id, const uint count) |
| TEST (ghash, IntRandGHash12000) | |
| TEST (ghash, IntRandMurmur2a12000) | |
| TEST (ghash, IntRandMap12000) | |
| static uint | ghashutil_tests_nohash_p (const void *p) |
| static bool | ghashutil_tests_cmp_p (const void *a, const void *b) |
| TEST (ghash, IntRandNoHash12000) | |
| static void | int4_ghash_tests (GHash *ghash, const char *id, const uint count) |
| template<typename MapType > | |
| static void | int4_map_tests (MapType &map, const char *id, const uint count) |
| TEST (ghash, Int4GHash2000) | |
| TEST (ghash, Int4Murmur2a2000) | |
| TEST (ghash, Int4Map2000) | |
| static void | multi_small_ghash_tests_one (GHash *ghash, RNG *rng, const uint count) |
| static void | multi_small_ghash_tests (GHash *ghash, const char *id, const uint count) |
| TEST (ghash, MultiRandIntGHash2000) | |
| TEST (ghash, MultiRandIntGHash200000) | |
| TEST (ghash, MultiRandIntMurmur2a2000) | |
| TEST (ghash, MultiRandIntMurmur2a200000) | |
Variables | |
| static constexpr bool | USE_RESERVE_COUNT = false |
| static constexpr size_t | TESTCASE_SIZE_SMALL = 17 |
| #define GHASH_INTERNAL_API |
Definition at line 8 of file BLI_map_performance_test.cc.
|
static |
|
static |
Definition at line 508 of file BLI_map_performance_test.cc.
References POINTER_AS_UINT.
Referenced by TEST().
Definition at line 536 of file BLI_map_performance_test.cc.
References BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), count, data, EXPECT_EQ(), POINTER_AS_UINT, POINTER_FROM_UINT, print_ghash_stats(), printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
|
static |
Definition at line 580 of file BLI_map_performance_test.cc.
References BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), count, data, EXPECT_EQ(), POINTER_AS_UINT, printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
Referenced by TEST().
Definition at line 248 of file BLI_map_performance_test.cc.
References BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_len(), BLI_ghash_lookup(), BLI_ghash_pop(), BLI_ghash_reserve(), count, EXPECT_EQ(), POINTER_AS_UINT, POINTER_FROM_UINT, print_ghash_stats(), printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
|
static |
Definition at line 294 of file BLI_map_performance_test.cc.
References count, EXPECT_EQ(), printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
Referenced by TEST().
Definition at line 701 of file BLI_map_performance_test.cc.
References BLI_ghash_free(), BLI_rng_free(), BLI_rng_get_int(), BLI_rng_new(), count, multi_small_ghash_tests_one(), printf, SCOPED_TIMER, and TESTCASE_SIZE_SMALL.
Definition at line 674 of file BLI_map_performance_test.cc.
References BLI_ghash_clear(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_rng_get_uint(), count, EXPECT_EQ(), MEM_freeN(), MEM_mallocN, POINTER_AS_UINT, POINTER_FROM_UINT, USE_RESERVE_COUNT, and v.
Referenced by multi_small_ghash_tests().
|
static |
Definition at line 40 of file BLI_map_performance_test.cc.
References BLI_ghash_calc_quality_ex(), BLI_ghash_len(), and printf.
Referenced by int4_ghash_tests(), int_ghash_tests(), randint_ghash_tests(), and str_ghash_tests().
Definition at line 383 of file BLI_map_performance_test.cc.
References BLI_ghash_free(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), count, data, EXPECT_EQ(), POINTER_AS_UINT, POINTER_FROM_UINT, print_ghash_stats(), printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
|
static |
Definition at line 424 of file BLI_map_performance_test.cc.
References BLI_rng_free(), BLI_rng_get_uint(), BLI_rng_new(), count, data, EXPECT_EQ(), printf, SCOPED_TIMER, USE_RESERVE_COUNT, and v.
Referenced by TEST().
|
static |
Definition at line 61 of file BLI_map_performance_test.cc.
References BLI_file_read_text_as_mem(), BLI_strdup(), data, and words10k.
Referenced by str_ghash_tests(), and str_map_tests().
|
static |
Definition at line 79 of file BLI_map_performance_test.cc.
References BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_strdup(), EXPECT_EQ(), MEM_freeN(), POINTER_AS_INT, POINTER_FROM_INT, print_ghash_stats(), printf, read_text_corpus(), SCOPED_TIMER, USE_RESERVE_COUNT, v, and w().
|
static |
Definition at line 156 of file BLI_map_performance_test.cc.
References BLI_strdup(), EXPECT_EQ(), MEM_freeN(), printf, read_text_corpus(), SCOPED_TIMER, USE_RESERVE_COUNT, v, and w().
Referenced by TEST().
| TEST | ( | ghash | , |
| Int4GHash2000 | ) |
Definition at line 621 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p, and int4_ghash_tests().
| TEST | ( | ghash | , |
| Int4Map2000 | ) |
Definition at line 657 of file BLI_map_performance_test.cc.
References int4_map_tests().
| TEST | ( | ghash | , |
| Int4Murmur2a2000 | ) |
Definition at line 639 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p_murmur, and int4_ghash_tests().
| TEST | ( | ghash | , |
| IntGHash12000 | ) |
Definition at line 335 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and int_ghash_tests().
| TEST | ( | ghash | , |
| IntMap12000 | ) |
Definition at line 367 of file BLI_map_performance_test.cc.
References int_map_tests().
| TEST | ( | ghash | , |
| IntMurmur2a12000 | ) |
Definition at line 351 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p_murmur(), and int_ghash_tests().
| TEST | ( | ghash | , |
| IntRandGHash12000 | ) |
Definition at line 462 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and randint_ghash_tests().
| TEST | ( | ghash | , |
| IntRandMap12000 | ) |
Definition at line 494 of file BLI_map_performance_test.cc.
References randint_map_tests().
| TEST | ( | ghash | , |
| IntRandMurmur2a12000 | ) |
Definition at line 478 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p_murmur(), and randint_ghash_tests().
| TEST | ( | ghash | , |
| IntRandNoHash12000 | ) |
Definition at line 518 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), ghashutil_tests_cmp_p(), ghashutil_tests_nohash_p(), and randint_ghash_tests().
| TEST | ( | ghash | , |
| MultiRandIntGHash2000 | ) |
Definition at line 732 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and multi_small_ghash_tests().
| TEST | ( | ghash | , |
| MultiRandIntGHash200000 | ) |
Definition at line 739 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and multi_small_ghash_tests().
| TEST | ( | ghash | , |
| MultiRandIntMurmur2a2000 | ) |
Definition at line 746 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p_murmur(), and multi_small_ghash_tests().
| TEST | ( | ghash | , |
| MultiRandIntMurmur2a200000 | ) |
Definition at line 753 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p_murmur(), and multi_small_ghash_tests().
| TEST | ( | ghash | , |
| TextGHash | ) |
Definition at line 226 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), and str_ghash_tests().
| TEST | ( | ghash | , |
| TextMap | ) |
Definition at line 240 of file BLI_map_performance_test.cc.
References str_map_tests().
| TEST | ( | ghash | , |
| TextMurmur2a | ) |
Definition at line 233 of file BLI_map_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p_murmur(), and str_ghash_tests().
|
staticconstexpr |
Definition at line 38 of file BLI_map_performance_test.cc.
Referenced by multi_small_ghash_tests().
|
staticconstexpr |
Definition at line 32 of file BLI_map_performance_test.cc.
Referenced by int4_ghash_tests(), int4_map_tests(), int_ghash_tests(), int_map_tests(), multi_small_ghash_tests_one(), randint_ghash_tests(), randint_map_tests(), str_ghash_tests(), and str_map_tests().