llvm/polly/lib/External/isl/isl_hash.c

/*
 * Copyright 2008-2009 Katholieke Universiteit Leuven
 *
 * Use of this software is governed by the MIT license
 *
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
 */

#include <stdlib.h>
#include <isl_hash_private.h>
#include <isl/ctx.h>
#include "isl_config.h"

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)
{}

/* Dummy comparison function that always returns false.
 */
static isl_bool no(const void *entry, const void *val)
{}

/* Extend "table" to twice its size.
 * Return 0 on success and -1 on error.
 *
 * We reuse isl_hash_table_find to create entries in the extended table.
 * Since all entries in the original table are assumed to be different,
 * there is no need to compare them against each other.
 */
static int grow_table(struct isl_ctx *ctx, struct isl_hash_table *table)
{}

struct isl_hash_table *isl_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)
{}

/* A dummy entry that is used by isl_hash_table_find
 * to make a distinction between a missing entry and an error condition.
 */
static struct isl_hash_table_entry none =;
struct isl_hash_table_entry *isl_hash_table_entry_none =;

struct isl_hash_table_entry *isl_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)
{}

/* Return the first entry containing data in "table".
 * Return isl_hash_table_entry_none is there is no such entry and
 * NULL on error.
 */
struct isl_hash_table_entry *isl_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)
{}

/* Does "test" succeed on every (non-empty) entry of "table"?
 */
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)
{}