|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "common/pg_prng.h"#include "fmgr.h"#include "lib/rbtree.h"#include "utils/memutils.h"
Go to the source code of this file.
Data Structures | |
| struct | IntRBTreeNode |
Typedefs | |
| typedef struct IntRBTreeNode | IntRBTreeNode |
Functions | |
| static int | irbt_cmp (const RBTNode *a, const RBTNode *b, void *arg) |
| static void | irbt_combine (RBTNode *existing, const RBTNode *newdata, void *arg) |
| static RBTNode * | irbt_alloc (void *arg) |
| static void | irbt_free (RBTNode *node, void *arg) |
| static RBTree * | create_int_rbtree (void) |
| static int * | GetPermutation (int size) |
| static void | rbt_populate (RBTree *tree, int size, int step) |
| static void | testleftright (int size) |
| static void | testrightleft (int size) |
| static void | testfind (int size) |
| static void | testfindltgt (int size) |
| static void | testleftmost (int size) |
| static void | testdelete (int size, int delsize) |
| PG_FUNCTION_INFO_V1 (test_rb_tree) | |
| Datum | test_rb_tree (PG_FUNCTION_ARGS) |
Variables | |
| PG_MODULE_MAGIC | |
Definition at line 80 of file test_rbtree.c.
References fb(), irbt_alloc(), irbt_cmp(), irbt_combine(), irbt_free(), and rbt_create().
Referenced by testdelete(), testfind(), testfindltgt(), testleftmost(), testleftright(), and testrightleft().
Definition at line 94 of file test_rbtree.c.
References fb(), i, j, palloc(), pg_global_prng_state, and pg_prng_uint64_range().
Referenced by rbt_populate().
Definition at line 64 of file test_rbtree.c.
References palloc().
Referenced by create_int_rbtree().
Definition at line 39 of file test_rbtree.c.
References a, b, fb(), and IntRBTreeNode::key.
Referenced by create_int_rbtree().
Definition at line 52 of file test_rbtree.c.
References elog, ERROR, and fb().
Referenced by create_int_rbtree().
| PG_FUNCTION_INFO_V1 | ( | test_rb_tree | ) |
Definition at line 127 of file test_rbtree.c.
References elog, ERROR, fb(), GetPermutation(), i, IntRBTreeNode::key, pfree(), rbt_insert(), and tree.
Referenced by testdelete(), testfind(), testfindltgt(), testleftmost(), testleftright(), and testrightleft().
| Datum test_rb_tree | ( | PG_FUNCTION_ARGS | ) |
Definition at line 503 of file test_rbtree.c.
References elog, ERROR, fb(), Max, MaxAllocSize, PG_GETARG_INT32, PG_RETURN_VOID, testdelete(), testfind(), testfindltgt(), testleftmost(), testleftright(), and testrightleft().
Definition at line 409 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), find(), i, IntRBTreeNode::key, palloc(), palloc0(), pfree(), pg_global_prng_state, pg_prng_uint64_range(), rbt_delete(), rbt_find(), rbt_leftmost(), rbt_populate(), and tree.
Referenced by test_rb_tree().
Definition at line 243 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), i, IntRBTreeNode::key, rbt_find(), rbt_populate(), and tree.
Referenced by test_rb_tree().
Definition at line 287 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), IntRBTreeNode::key, pg_global_prng_state, pg_prng_uint64_range(), rbt_delete(), rbt_find_great(), rbt_find_less(), rbt_populate(), and tree.
Referenced by test_rb_tree().
Definition at line 387 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), IntRBTreeNode::key, rbt_leftmost(), rbt_populate(), and tree.
Referenced by test_rb_tree().
Definition at line 164 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), IntRBTreeNode::key, LeftRightWalk, rbt_begin_iterate(), rbt_iterate(), rbt_populate(), and tree.
Referenced by test_rb_tree().
Definition at line 204 of file test_rbtree.c.
References create_int_rbtree(), elog, ERROR, fb(), IntRBTreeNode::key, rbt_begin_iterate(), rbt_iterate(), rbt_populate(), RightLeftWalk, and tree.
Referenced by test_rb_tree().
| PG_MODULE_MAGIC |
Definition at line 21 of file test_rbtree.c.