Changeset 1787


Ignore:
Timestamp:
Dec 15, 2011, 3:11:16 AM (8 years ago)
Author:
vla24
Message:

Added a blank file for wcd. This file is used to measure fixed costs in various symtab impl.

Location:
proto/SymbolTable
Files:
1 added
1 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • proto/SymbolTable/build_wcd.sh

    r1777 r1787  
    1 cd src && make wcd && python run_wcd.py ../test/test_files/test_dictionary.txt ../test/test_files/wcd_a_sailor_of_king_george.txt && cd ..
     1cd src && make wcd && python run_wcd.py ../test/test_files/blank ../test/test_files/wcd_tale_of_two_cities.txt && cd ..
  • proto/SymbolTable/common_definitions.h

    r1786 r1787  
    99#define DEBUG 0
    1010#define PRINT_SYMBOL_DISTRIBUTION 0
    11 #define PRINT_DICTIONARY_INFO 1
     11#define PRINT_DICTIONARY_INFO 0
    1212#define SEGMENT_BLOCKS 12
    1313#define BUFFER_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS)
  • proto/SymbolTable/src/perf_script_wcd.py

    r1722 r1787  
    77programs = ['wcd']
    88#TODO: Change the testfiles
    9 dictionaryfiles = ['test_dictionary.txt', 'test_dictionary.txt']
    10 testfiles = ['test_text.txt', 'dict_bezier.txt']
     9dictionaryfiles = ['test_dictionary.txt', 'test_dictionary.txt', 'test_dictionary.txt']
     10testfiles = ['blank', 'test_text.txt', 'dict_bezier.txt']
    1111
    1212def run_test():     
  • proto/SymbolTable/symbol_stat_gatherer.h

    r1786 r1787  
    1414    void store_symbol_length(int L);
    1515    void store_symbol_gid(int GID);
     16    void clear_all();
    1617
    1718private:
     
    2728    double average(vector<int>v);
    2829};
     30
     31void SymbolStatGatherer::clear_all()
     32{
     33    symbol_lgth.clear();
     34    density_starts.clear();
     35    density_ends.clear();
     36    gids.clear();
     37}
    2938
    3039void SymbolStatGatherer::store_symbol_density(int symbol_start, int symbol_end)
  • proto/SymbolTable/wcd_symbol_stat_gather.cpp

    r1769 r1787  
    5151    int greatest_GID_in_dictionary;
    5252    populateDictionary(dictionaryfile, outfile, gids, greatest_GID_in_dictionary);
     53    symbol_stat.clear_all();
    5354
    5455//      PERF_SEC_BIND(1);
Note: See TracChangeset for help on using the changeset viewer.