diff options
| author | redbrain <redbrain@crules.org> | 2010-07-08 18:27:23 +0100 |
|---|---|---|
| committer | redbrain <redbrain@crules.org> | 2010-07-08 18:27:23 +0100 |
| commit | 338a9b0aa530351ef3ba9166a0e17d2fa98ab2ee (patch) | |
| tree | d0e313a764ba7a3e640476b858a799ccad114eb1 /libgpython/include/gpython/vectors.h | |
| parent | 602933fa35af029c29e1ea57c7d8ca8754c03d16 (diff) | |
| download | gcc-338a9b0aa530351ef3ba9166a0e17d2fa98ab2ee.tar.gz | |
adding some vector op code
Diffstat (limited to 'libgpython/include/gpython/vectors.h')
| -rw-r--r-- | libgpython/include/gpython/vectors.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/libgpython/include/gpython/vectors.h b/libgpython/include/gpython/vectors.h new file mode 100644 index 00000000000..19fea8caa9d --- /dev/null +++ b/libgpython/include/gpython/vectors.h @@ -0,0 +1,49 @@ +/* This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +<http://www.gnu.org/licenses/>. */ + +#ifndef __GCC_VECTORS_H__ +#define __GCC_VECTORS_H__ + +#define gpy_threshold_alloc(x) (((x)+16)*3/2) + +typedef struct gpy_vector_t { + void ** vector; + signed long size, length; +} gpy_ident_vector_t; + +typedef unsigned long gpy_hashval_t; + +typedef struct gpy_hash_entry { + gpy_hashval_t hash; + void * data; +} gpy_hash_entry_t ; + +typedef struct gpy_hash_table_t { + unsigned int size, length; + gpy_hash_entry_t * array; +} gpy_hash_tab_t ; + +extern gpy_hashval_t gpy_dd_hash_string( const char * ); + +extern gpy_hash_entry_t * gpy_dd_hash_lookup_table( gpy_hash_tab_t *, gpy_hashval_t ); + +extern void ** gpy_dd_hash_insert( gpy_hashval_t, void *, gpy_hash_tab_t * ); + +extern void gpy_dd_hash_grow_table( gpy_hash_tab_t * ); + +extern void gpy_dd_hash_init_table( gpy_hash_tab_t ** ); + +#endif //__GCC_VECTORS_H__ |
