Blender
V3.3
|
#include "BLI_ressource_strings.h"
#include "testing/testing.h"
#include "MEM_guardedalloc.h"
#include "BLI_ghash.h"
#include "BLI_rand.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "PIL_time_utildefines.h"
Go to the source code of this file.
Macros | |
#define | GHASH_INTERNAL_API |
#define | TESTCASE_SIZE_SMALL 17 |
#define | PRINTF_GHASH_STATS(_gh) |
Functions | |
static void | str_ghash_tests (GHash *ghash, const char *id) |
TEST (ghash, TextGHash) | |
TEST (ghash, TextMurmur2a) | |
static void | int_ghash_tests (GHash *ghash, const char *id, const unsigned int count) |
TEST (ghash, IntGHash12000) | |
TEST (ghash, IntMurmur2a12000) | |
static void | randint_ghash_tests (GHash *ghash, const char *id, const unsigned int count) |
TEST (ghash, IntRandGHash12000) | |
TEST (ghash, IntRandMurmur2a12000) | |
static unsigned int | ghashutil_tests_nohash_p (const void *p) |
static bool | ghashutil_tests_cmp_p (const void *a, const void *b) |
TEST (ghash, Int4NoHash12000) | |
static void | int4_ghash_tests (GHash *ghash, const char *id, const unsigned int count) |
TEST (ghash, Int4GHash2000) | |
TEST (ghash, Int4Murmur2a2000) | |
TEST (ghash, Int2NoHash12000) | |
static void | multi_small_ghash_tests_one (GHash *ghash, RNG *rng, const unsigned int count) |
static void | multi_small_ghash_tests (GHash *ghash, const char *id, const unsigned int count) |
TEST (ghash, MultiRandIntGHash2000) | |
TEST (ghash, MultiRandIntGHash200000) | |
TEST (ghash, MultiRandIntMurmur2a2000) | |
TEST (ghash, MultiRandIntMurmur2a200000) | |
#define GHASH_INTERNAL_API |
Definition at line 6 of file BLI_ghash_performance_test.cc.
#define PRINTF_GHASH_STATS | ( | _gh | ) |
Definition at line 33 of file BLI_ghash_performance_test.cc.
#define TESTCASE_SIZE_SMALL 17 |
Definition at line 31 of file BLI_ghash_performance_test.cc.
Definition at line 355 of file BLI_ghash_performance_test.cc.
References Freestyle::a, and usdtokens::b().
Referenced by TEST().
|
static |
Definition at line 350 of file BLI_ghash_performance_test.cc.
References POINTER_AS_UINT.
Referenced by TEST().
Definition at line 378 of file BLI_ghash_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(), MEM_freeN, MEM_mallocN, POINTER_AS_UINT, POINTER_FROM_UINT, PRINTF_GHASH_STATS, TIMEIT_END, TIMEIT_START, and v.
Referenced by TEST().
Definition at line 180 of file BLI_ghash_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, PRINTF_GHASH_STATS, TIMEIT_END, TIMEIT_START, and v.
Referenced by TEST().
|
static |
Definition at line 513 of file BLI_ghash_performance_test.cc.
References BLI_ghash_free(), BLI_rng_free(), BLI_rng_get_int(), BLI_rng_new(), count, multi_small_ghash_tests_one(), TESTCASE_SIZE_SMALL, TIMEIT_END, and TIMEIT_START.
Referenced by TEST().
|
static |
Definition at line 486 of file BLI_ghash_performance_test.cc.
References BLI_ghash_clear(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_rng_get_uint(), count, data, EXPECT_EQ(), MEM_freeN, MEM_mallocN, POINTER_AS_UINT, POINTER_FROM_UINT, and v.
Referenced by multi_small_ghash_tests().
Definition at line 269 of file BLI_ghash_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(), MEM_freeN, MEM_mallocN, POINTER_AS_UINT, POINTER_FROM_UINT, PRINTF_GHASH_STATS, TIMEIT_END, TIMEIT_START, and v.
Referenced by TEST().
Definition at line 55 of file BLI_ghash_performance_test.cc.
References BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_reserve(), BLI_strdup(), Freestyle::c, data, EXPECT_EQ(), MEM_freeN, MEM_mallocN, POINTER_AS_INT, POINTER_FROM_INT, PRINTF_GHASH_STATS, usdtokens::st(), TIMEIT_END, TIMEIT_START, v, w(), and words10k.
Referenced by TEST().
TEST | ( | ghash | , |
Int2NoHash12000 | |||
) |
Definition at line 467 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), ghashutil_tests_cmp_p(), ghashutil_tests_nohash_p(), and randint_ghash_tests().
TEST | ( | ghash | , |
Int4GHash2000 | |||
) |
Definition at line 430 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p, and int4_ghash_tests().
TEST | ( | ghash | , |
Int4Murmur2a2000 | |||
) |
Definition at line 448 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_uinthash_v4_cmp(), BLI_ghashutil_uinthash_v4_p_murmur, and int4_ghash_tests().
TEST | ( | ghash | , |
Int4NoHash12000 | |||
) |
Definition at line 360 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), ghashutil_tests_cmp_p(), ghashutil_tests_nohash_p(), and randint_ghash_tests().
TEST | ( | ghash | , |
IntGHash12000 | |||
) |
Definition at line 235 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and int_ghash_tests().
TEST | ( | ghash | , |
IntMurmur2a12000 | |||
) |
Definition at line 251 of file BLI_ghash_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 318 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p(), and randint_ghash_tests().
TEST | ( | ghash | , |
IntRandMurmur2a12000 | |||
) |
Definition at line 334 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_intcmp(), BLI_ghashutil_inthash_p_murmur(), and randint_ghash_tests().
TEST | ( | ghash | , |
MultiRandIntGHash2000 | |||
) |
Definition at line 547 of file BLI_ghash_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 554 of file BLI_ghash_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 561 of file BLI_ghash_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 568 of file BLI_ghash_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 164 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p(), and str_ghash_tests().
TEST | ( | ghash | , |
TextMurmur2a | |||
) |
Definition at line 171 of file BLI_ghash_performance_test.cc.
References BLI_ghash_new(), BLI_ghashutil_strcmp(), BLI_ghashutil_strhash_p_murmur(), and str_ghash_tests().