|
PostgreSQL Source Code git master
|

Go to the source code of this file.
Data Structures | |
| struct | binaryheap |
Macros | |
| #define | binaryheap_empty(h) ((h)->bh_size == 0) |
| #define | binaryheap_size(h) ((h)->bh_size) |
| #define | binaryheap_get_node(h, n) ((h)->bh_nodes[n]) |
Typedefs | |
| typedef Datum | bh_node_type |
| typedef int(* | binaryheap_comparator) (bh_node_type a, bh_node_type b, void *arg) |
| typedef struct binaryheap | binaryheap |
Functions | |
| binaryheap * | binaryheap_allocate (int capacity, binaryheap_comparator compare, void *arg) |
| void | binaryheap_reset (binaryheap *heap) |
| void | binaryheap_free (binaryheap *heap) |
| void | binaryheap_add_unordered (binaryheap *heap, bh_node_type d) |
| void | binaryheap_build (binaryheap *heap) |
| void | binaryheap_add (binaryheap *heap, bh_node_type d) |
| bh_node_type | binaryheap_first (binaryheap *heap) |
| bh_node_type | binaryheap_remove_first (binaryheap *heap) |
| void | binaryheap_remove_node (binaryheap *heap, int n) |
| void | binaryheap_replace_first (binaryheap *heap, bh_node_type d) |
| #define binaryheap_empty | ( | h | ) | ((h)->bh_size == 0) |
Definition at line 65 of file binaryheap.h.
| #define binaryheap_get_node | ( | h, | |
| n | |||
| ) | ((h)->bh_nodes[n]) |
Definition at line 67 of file binaryheap.h.
| #define binaryheap_size | ( | h | ) | ((h)->bh_size) |
Definition at line 66 of file binaryheap.h.
Definition at line 23 of file binaryheap.h.
| typedef int(* binaryheap_comparator) (bh_node_type a, bh_node_type b, void *arg) |
Definition at line 30 of file binaryheap.h.
|
extern |
Definition at line 152 of file binaryheap.c.
References binaryheap::bh_nodes, binaryheap::bh_size, binaryheap::bh_space, elog, ERROR, pg_fatal, and sift_up().
Referenced by move_to_ready_heap(), pgarch_readyXlog(), reduce_dependencies(), test_basic(), test_duplicates(), test_remove_node(), test_replace_first(), test_reset(), and TopoSort().
|
extern |
Definition at line 114 of file binaryheap.c.
References binaryheap::bh_has_heap_property, binaryheap::bh_nodes, binaryheap::bh_size, binaryheap::bh_space, elog, ERROR, and pg_fatal.
Referenced by BufferSync(), ExecMergeAppend(), gather_merge_init(), pgarch_readyXlog(), ReorderBufferIterTXNInit(), test_build(), and TopoSort().
|
extern |
Definition at line 37 of file binaryheap.c.
References arg, binaryheap::bh_arg, binaryheap::bh_compare, binaryheap::bh_has_heap_property, binaryheap::bh_size, binaryheap::bh_space, compare(), fb(), and palloc().
Referenced by BufferSync(), ExecInitMergeAppend(), gather_merge_setup(), PgArchiverMain(), ReorderBufferIterTXNInit(), restore_toc_entries_parallel(), test_basic(), test_build(), test_duplicates(), test_remove_node(), test_replace_first(), test_reset(), and TopoSort().
|
extern |
Definition at line 136 of file binaryheap.c.
References binaryheap::bh_has_heap_property, binaryheap::bh_size, i, parent_offset(), and sift_down().
Referenced by BufferSync(), ExecMergeAppend(), gather_merge_init(), pgarch_readyXlog(), ReorderBufferIterTXNInit(), test_build(), and TopoSort().
|
extern |
Definition at line 175 of file binaryheap.c.
References Assert, binaryheap::bh_has_heap_property, binaryheap::bh_nodes, and binaryheap_empty.
Referenced by BufferSync(), ExecMergeAppend(), gather_merge_getnext(), pgarch_readyXlog(), ReorderBufferIterTXNNext(), and test_basic().
|
extern |
Definition at line 73 of file binaryheap.c.
References pfree().
Referenced by BufferSync(), ReorderBufferIterTXNFinish(), restore_toc_entries_parallel(), and TopoSort().
|
extern |
Definition at line 190 of file binaryheap.c.
References Assert, binaryheap::bh_has_heap_property, binaryheap::bh_nodes, binaryheap::bh_size, binaryheap_empty, and sift_down().
Referenced by BufferSync(), ExecMergeAppend(), gather_merge_getnext(), pgarch_readyXlog(), ReorderBufferIterTXNNext(), test_basic(), test_duplicates(), and TopoSort().
|
extern |
Definition at line 223 of file binaryheap.c.
References Assert, binaryheap::bh_arg, binaryheap::bh_compare, binaryheap::bh_has_heap_property, binaryheap::bh_nodes, binaryheap::bh_size, binaryheap_empty, cmp(), fb(), sift_down(), and sift_up().
Referenced by pop_next_work_item(), and test_remove_node().
|
extern |
Definition at line 253 of file binaryheap.c.
References Assert, binaryheap::bh_has_heap_property, binaryheap::bh_nodes, binaryheap::bh_size, binaryheap_empty, and sift_down().
Referenced by BufferSync(), ExecMergeAppend(), gather_merge_getnext(), ReorderBufferIterTXNNext(), and test_replace_first().
|
extern |
Definition at line 61 of file binaryheap.c.
References binaryheap::bh_has_heap_property, and binaryheap::bh_size.
Referenced by ExecReScanMergeAppend(), gather_merge_init(), pgarch_readyXlog(), and test_reset().