Polly 20.0.0git
Functions | Variables
isl_hash.c File Reference
#include <stdlib.h>
#include <isl_hash_private.h>
#include <isl/ctx.h>
#include "isl_config.h"

Go to the source code of this file.

Functions

uint32_t isl_hash_string (uint32_t hash, const char *s)
 
uint32_t isl_hash_mem (uint32_t hash, const void *p, size_t len)
 
static unsigned int round_up (unsigned int v)
 
int isl_hash_table_init (struct isl_ctx *ctx, struct isl_hash_table *table, int min_size)
 
static isl_bool no (const void *entry, const void *val)
 
static int grow_table (struct isl_ctx *ctx, struct isl_hash_table *table)
 
struct isl_hash_tableisl_hash_table_alloc (struct isl_ctx *ctx, int min_size)
 
void isl_hash_table_clear (struct isl_hash_table *table)
 
void isl_hash_table_free (struct isl_ctx *ctx, struct isl_hash_table *table)
 
struct isl_hash_table_entryisl_hash_table_find (struct isl_ctx *ctx, struct isl_hash_table *table, uint32_t key_hash, isl_bool(*eq)(const void *entry, const void *val), const void *val, int reserve)
 
struct isl_hash_table_entryisl_hash_table_first (struct isl_hash_table *table)
 
isl_stat isl_hash_table_foreach (isl_ctx *ctx, struct isl_hash_table *table, isl_stat(*fn)(void **entry, void *user), void *user)
 
isl_bool isl_hash_table_every (isl_ctx *ctx, struct isl_hash_table *table, isl_bool(*test)(void **entry, void *user), void *user)
 
void isl_hash_table_remove (struct isl_ctx *ctx, struct isl_hash_table *table, struct isl_hash_table_entry *entry)
 

Variables

static struct isl_hash_table_entry none = { 0, NULL }
 
struct isl_hash_table_entryisl_hash_table_entry_none = &none
 

Function Documentation

◆ grow_table()

static int grow_table ( struct isl_ctx ctx,
struct isl_hash_table table 
)
static

◆ isl_hash_mem()

uint32_t isl_hash_mem ( uint32_t  hash,
const void *  p,
size_t  len 
)

Definition at line 22 of file isl_hash.c.

References isl_hash_byte, and p.

◆ isl_hash_string()

uint32_t isl_hash_string ( uint32_t  hash,
const char *  s 
)

Definition at line 15 of file isl_hash.c.

References isl_hash_byte.

Referenced by check_keywords(), id_alloc(), isl_id_alloc(), and isl_stream_register_keyword().

◆ isl_hash_table_alloc()

struct isl_hash_table * isl_hash_table_alloc ( struct isl_ctx ctx,
int  min_size 
)

◆ isl_hash_table_clear()

void isl_hash_table_clear ( struct isl_hash_table table)

◆ isl_hash_table_every()

isl_bool isl_hash_table_every ( isl_ctx ctx,
struct isl_hash_table table,
isl_bool(*)(void **entry, void *user test,
void *  user 
)

◆ isl_hash_table_find()

struct isl_hash_table_entry * isl_hash_table_find ( struct isl_ctx ctx,
struct isl_hash_table table,
uint32_t  key_hash,
isl_bool(*)(const void *entry, const void *val eq,
const void *  val,
int  reserve 
)

◆ isl_hash_table_first()

struct isl_hash_table_entry * isl_hash_table_first ( struct isl_hash_table table)

◆ isl_hash_table_foreach()

isl_stat isl_hash_table_foreach ( isl_ctx ctx,
struct isl_hash_table table,
isl_stat(*)(void **entry, void *user fn,
void *  user 
)

◆ isl_hash_table_free()

void isl_hash_table_free ( struct isl_ctx ctx,
struct isl_hash_table table 
)

◆ isl_hash_table_init()

int isl_hash_table_init ( struct isl_ctx ctx,
struct isl_hash_table table,
int  min_size 
)

◆ isl_hash_table_remove()

void isl_hash_table_remove ( struct isl_ctx ctx,
struct isl_hash_table table,
struct isl_hash_table_entry entry 
)

◆ no()

static isl_bool no ( const void *  entry,
const void *  val 
)
static

Definition at line 66 of file isl_hash.c.

References isl_bool_false.

Referenced by grow_table(), print_arg_help(), and print_bool_help().

◆ round_up()

static unsigned int round_up ( unsigned int  v)
static

Definition at line 31 of file isl_hash.c.

Referenced by isl_hash_table_init().

Variable Documentation

◆ isl_hash_table_entry_none

struct isl_hash_table_entry* isl_hash_table_entry_none = &none

◆ none

struct isl_hash_table_entry none = { 0, NULL }
static

Definition at line 154 of file isl_hash.c.

Referenced by graph_find_edge().