HPCToolkit
BalancedTree.h File Reference
#include <stddef.h>
#include <stdbool.h>
#include <include/uint.h>
#include "pfq-rwlock.h"
#include "spinlock.h"
Include dependency graph for BalancedTree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BalancedTreeNode
 
struct  BalancedTree
 

Typedefs

typedef void *(* BalancedTree_alloc_fn_t) (size_t)
 
typedef struct BalancedTreeNode BalancedTreeNode_t
 
typedef struct BalancedTree BalancedTree_t
 

Enumerations

enum  BalancedTreeColor_t { BalancedTreeColor_RED, BalancedTreeColor_BLACK }
 

Functions

static BalancedTreeNode_tBalancedTreeNode_alloc (BalancedTree_alloc_fn_t alloc, size_t dataSz)
 
void BalancedTreeNode_init (BalancedTreeNode_t *x, void *key, BalancedTreeNode_t *parent)
 
void BalancedTree_init (BalancedTree_t *tree, BalancedTree_alloc_fn_t allocFn, size_t nodeDataSz)
 
static uint BalancedTree_size (BalancedTree_t *tree)
 
static BalancedTreeNode_tBalancedTree_find (BalancedTree_t *tree, void *key)
 
BalancedTreeNode_tBalancedTree_insert (BalancedTree_t *tree, void *key)
 

Typedef Documentation

◆ BalancedTree_alloc_fn_t

typedef void*(* BalancedTree_alloc_fn_t) (size_t)

Definition at line 88 of file BalancedTree.h.

◆ BalancedTree_t

typedef struct BalancedTree BalancedTree_t

◆ BalancedTreeNode_t

Enumeration Type Documentation

◆ BalancedTreeColor_t

Enumerator
BalancedTreeColor_RED 
BalancedTreeColor_BLACK 

Definition at line 90 of file BalancedTree.h.

Function Documentation

◆ BalancedTree_find()

static BalancedTreeNode_t* BalancedTree_find ( BalancedTree_t tree,
void *  key 
)
inlinestatic

Definition at line 159 of file BalancedTree.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BalancedTree_init()

void BalancedTree_init ( BalancedTree_t tree,
BalancedTree_alloc_fn_t  allocFn,
size_t  nodeDataSz 
)

Definition at line 103 of file BalancedTree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BalancedTree_insert()

BalancedTreeNode_t* BalancedTree_insert ( BalancedTree_t tree,
void *  key 
)

Definition at line 118 of file BalancedTree.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BalancedTree_size()

static uint BalancedTree_size ( BalancedTree_t tree)
inlinestatic

Definition at line 152 of file BalancedTree.h.

◆ BalancedTreeNode_alloc()

static BalancedTreeNode_t* BalancedTreeNode_alloc ( BalancedTree_alloc_fn_t  alloc,
size_t  dataSz 
)
inlinestatic

Definition at line 115 of file BalancedTree.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ BalancedTreeNode_init()

void BalancedTreeNode_init ( BalancedTreeNode_t x,
void *  key,
BalancedTreeNode_t parent 
)

Definition at line 85 of file BalancedTree.c.

Here is the caller graph for this function: