Changeset 1989 for trunk/symbol_table


Ignore:
Timestamp:
Mar 31, 2012, 2:09:17 PM (7 years ago)
Author:
ksherdy
Message:

Minor fix. Update default hash table size to 1024.

Location:
trunk/symbol_table/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/src/Makefile

    r1988 r1989  
    1414
    1515all: basis_bits.hpp buffer.hpp byte_pool.hpp  hash_strms.hpp  hash_table.hpp  id_group_strms.hpp  id_symbol_table.hpp  main.cpp  Makefile  marker_strms.hpp  symbol_table.hpp  transpose.hpp
    16         $(CC) -o main main.cpp $(AFLAGS) -DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG -DHASH_TABLE_HPP_DEBUG # -DBUFFER_PROFILING
     16        $(CC) -o main main.cpp $(AFLAGS) -DHASH_TABLE_HPP_DEBUG # -DBUFFER_PROFILING -DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
    1717
    1818clean:
  • trunk/symbol_table/src/hash_table.hpp

    r1988 r1989  
    2020#define MAX(a, b) ((a > b) ? a : b)
    2121#define MAX_TABLE_SIZE 65536 * 4
    22 #define MAX_HASH_BITS 17    /* WARNING - Length dependent. */
     22#define MAX_HASH_BITS 17   
    2323
    2424#include "../lib/bitblock.hpp"
     
    6161public:
    6262
    63     hash_table(const uint32_t table_size=4096, const uint32_t load_factor=2) {
     63    hash_table(const uint32_t table_size=1024, const uint32_t load_factor=2) {
    6464        #ifdef HASH_TABLE_HPP_DEBUG
    6565            lookups = 0;
  • trunk/symbol_table/src/id_symbol_table.hpp

    r1988 r1989  
    3737class id_symbol_table:public symbol_table {
    3838public:
    39     id_symbol_table():hash_table_1(256){}
     39    id_symbol_table()/*:hash_table_1(256)*/{}
    4040    ~id_symbol_table() {
    41 #ifdef ID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
    4241//      hash_table_1.print_table();
    4342//      hash_table_2.print_table();
     
    5655//      hash_table_15.print_table();
    5756//      hash_table_16.print_table();
    58         hash_table_gte_17.print_table();
     57//      hash_table_gte_17.print_table();
     58#ifdef HASH_TABLE_HPP_DEBUG
    5959        hash_table_1.print_diagnostics();
    6060        hash_table_2.print_diagnostics();
     
    6565        hash_table_7.print_diagnostics();
    6666        hash_table_8.print_diagnostics();
     67
    6768        hash_table_9.print_diagnostics();
    6869        hash_table_10.print_diagnostics();
     
    111112        ///////////////////////////////////////////////////////////////////////////////
    112113        if(bitblock::any(groups[blk].ends_8)) {
    113         do_block<hash_table <identity_strategy_t<uint64_t,8>, hash_strategy_t<8>, ALLOCATOR> >(hash_table_8, groups[blk].ends_8, &buffer[blk*BLOCK_SIZE], 8, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 8, BLOCK_SIZE/8);
     114        do_block<hash_table <identity_strategy_t<uint64_t,8>, hash_strategy_d, ALLOCATOR> >(hash_table_8, groups[blk].ends_8, &buffer[blk*BLOCK_SIZE], 8, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 8, BLOCK_SIZE/8);
    114115        }
    115116        if(bitblock::any(groups[blk].ends_9)) {
     
    158159    // Bit Space Hash
    159160    ///////////////////////////////////////////////////////////////////////////////
    160     hash_table<identity_strategy_t<uint64_t,8>, hash_strategy_t<8>, ALLOCATOR> hash_table_8;
     161    hash_table<identity_strategy_t<uint64_t,8>, hash_strategy_d, ALLOCATOR> hash_table_8;
    161162    hash_table<identity_strategy_t<uint64_t,9>, hash_strategy_d, ALLOCATOR> hash_table_9;
    162163    hash_table<identity_strategy_t<uint64_t,10>, hash_strategy_d, ALLOCATOR> hash_table_10;
Note: See TracChangeset for help on using the changeset viewer.