Polly 22.0.0git
hash.h File Reference
#include <stdlib.h>
#include <isl/stdint.h>
#include <isl/ctx.h>

Go to the source code of this file.

Classes

struct  isl_hash_table_entry
struct  isl_hash_table

Macros

#define isl_hash_init()
#define isl_hash_byte(h, b)
#define isl_hash_hash(h, h2)
#define isl_hash_bits(h, bits)
#define isl_hash_builtin(h, l)

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)
struct isl_hash_tableisl_hash_table_alloc (struct isl_ctx *ctx, int min_size)
void isl_hash_table_free (struct isl_ctx *ctx, struct isl_hash_table *table)
int isl_hash_table_init (struct isl_ctx *ctx, struct isl_hash_table *table, int min_size)
void isl_hash_table_clear (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)
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

struct isl_hash_table_entryisl_hash_table_entry_none

Macro Definition Documentation

◆ isl_hash_bits

#define isl_hash_bits ( h,
bits )
Value:
((bits) == 32) ? (h) : \
((bits) >= 16) ? \
((h) >> (bits)) ^ ((h) & (((uint32_t)1 << (bits)) - 1)) : \
(((h) >> (bits)) ^ (h)) & (((uint32_t)1 << (bits)) - 1)

Definition at line 33 of file hash.h.

Referenced by isl_hash_table_find(), isl_hash_table_remove(), and isl_seq_get_hash_bits().

◆ isl_hash_builtin

#define isl_hash_builtin ( h,
l )
Value:
isl_hash_mem(h, &l, sizeof(l))
uint32_t isl_hash_mem(uint32_t hash, const void *p, size_t len)
Definition isl_hash.c:22

Definition at line 42 of file hash.h.

Referenced by graph_edge_table_add(), graph_find_edge_entry(), id_alloc(), isl_id_alloc(), and isl_scc_graph_find_edge().

◆ isl_hash_byte

#define isl_hash_byte ( h,
b )

◆ isl_hash_hash

#define isl_hash_hash ( h,
h2 )
Value:
do { \
isl_hash_byte(h, (h2) & 0xFF); \
isl_hash_byte(h, ((h2) >> 8) & 0xFF); \
isl_hash_byte(h, ((h2) >> 16) & 0xFF); \
isl_hash_byte(h, ((h2) >> 24) & 0xFF); \
} while(0)

Definition at line 26 of file hash.h.

Referenced by add_hash(), FN(), FN(), isl_aff_get_hash(), isl_basic_map_get_hash(), isl_hash_id(), isl_local_space_get_hash(), isl_map_get_hash(), and isl_mat_get_hash().

◆ isl_hash_init

Function Documentation

◆ 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()

◆ 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(* test )(void **entry, void *user),
void * user )

◆ isl_hash_table_find()

◆ isl_hash_table_foreach()

◆ 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()

Variable Documentation

◆ isl_hash_table_entry_none