Changeset 2095 for trunk/symbol_table


Ignore:
Timestamp:
May 10, 2012, 11:53:07 AM (7 years ago)
Author:
ksherdy
Message:

Added perf support.

Location:
trunk/symbol_table
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/log2_group_strms.py

    r2067 r2095  
    1 # demo
    21import bitutil as pablo
    32
  • trunk/symbol_table/main_template.cpp

    r2092 r2095  
    221221    }
    222222
    223     //PERF_SEC_START(parser_timer);
     223    PERF_SEC_START(parser_timer);
    224224    st.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, segment_blocks, gids);
    225     //PERF_SEC_END(parser_timer, chars_avail+1);
     225    PERF_SEC_END(parser_timer, chars_avail+1);
    226226
    227227    #ifdef IDENTITY_TEST
  • trunk/symbol_table/src/Makefile

    r2092 r2095  
    1 CC= g++ $(CFLAGS) # -g # -O3
     1CC= g++ $(CFLAGS) -O3 # -g
    22SSE=-msse2 #-mssse3 #-msse4.2
    33CFLAGS= $(SSE)
     
    1414
    1515TEST_SCRIPT = ../test/run_tests.py
    16 TEST_PRGM = main
    1716TEST_SRC_DIR = ../test/in
    1817TEST_DST_DIR = ../test/out
    1918
    2019id: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
    21         $(CC) -o main main.cpp $(AFLAGS) -DID_STRATEGY -DGID_TEST #-DIDENTITY_TEST  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG -DHASH_TABLE_HPP_DEBUG # -DBUFFER_PROFILING
     20        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG #-DHASH_TABLE_HPP_DEBUG
    2221
    2322div2: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
    24         $(CC) -o main main.cpp $(AFLAGS) -DDIV2_STRATEGY -DGID_TEST #-DIDENTITY_TEST #-DHASH_TABLE_HPP_DEBUG #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG -DBUFFER_PROFILING
     23        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DBUFFER_PROFILING #-DHASH_TABLE_HPP_DEBUG #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
    2524
    2625logbase2: basis_bits.hpp buffer.hpp byte_pool.hpp hash_strms.hpp  hash_table.hpp ../lib/hash.hpp  group_strms.hpp  symbol_table.hpp  main.cpp  marker_strms.hpp symbol_table.hpp transpose.hpp
    27         $(CC) -o main main.cpp $(AFLAGS) -DLOG2_STRATEGY  -DIDENTITY_TEST #-DGID_TEST  #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG # -DBUFFER_PROFILING
     26        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOG2_STRATEGY -DBUFFER_PROFILING #-DID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG  #-DHASH_TABLE_HPP_DEBUG
    2827
    29 diff_test: main
    30         python $(TEST_SCRIPT) $(TEST_PRGM) -d
     28id_diff_test: id
     29        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DIDENTITY_TEST
     30        python $(TEST_SCRIPT) id -d
    3131        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
    3232
    33 gid_test:
    34         python $(TEST_SCRIPT) $(TEST_PRGM) -g
     33div2_diff_test: div2
     34        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DIDENTITY_TEST
     35        python $(TEST_SCRIPT) div2 -d
     36        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
     37
     38logbase2_diff_test: logbase2
     39        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOG2_STRATEGY -DIDENTITY_TEST
     40        python $(TEST_SCRIPT) logbase2 -d
     41        diff -rq --exclude=".svn" $(TEST_SRC_DIR) $(TEST_DST_DIR) || exit 0
     42
     43id_gid_test:
     44        $(CC) -o id main.cpp $(AFLAGS) -DID_STRATEGY -DGID_TEST
     45        python $(TEST_SCRIPT) id -g
     46
     47div2_gid_test:
     48        $(CC) -o div2 main.cpp $(AFLAGS) -DDIV2_STRATEGY -DGID_TEST
     49        python $(TEST_SCRIPT) div2 -g
     50
     51logbase2_gid_test:
     52        $(CC) -o logbase2 main.cpp $(AFLAGS) -DLOG2_STRATEGY -DGID_TEST
     53        python $(TEST_SCRIPT) logbase2 -g
    3554
    3655clean:
    37         rm -Rf main $(TEST_DST_DIR)
     56        rm -Rf id div2 logbase2 $(TEST_DST_DIR)
    3857
  • trunk/symbol_table/src/buffer.hpp

    r2062 r2095  
    99#define LOOKBACK_BLOCKS 1
    1010#define LOOKBACK_SIZE BLOCK_SIZE * LOOKBACK_BLOCKS
    11 #define SEGMENT_BLOCKS 1000                                             // No COPY BACK for test, starts within segment
     11#define SEGMENT_BLOCKS 5000                                             // No COPY BACK for test, starts within segment
    1212#define SEGMENT_SIZE BLOCK_SIZE * (SEGMENT_BLOCKS)      // (bytes) a multiple of BLOCK_SIZE
    1313#define SEGMENT_ALLOC_SIZE (LOOKBACK_SIZE + SEGMENT_SIZE + PADDING_SIZE) / sizeof(BitBlock) // (bytes)
  • trunk/symbol_table/src/compare_strategy.hpp

    r2092 r2095  
    148148};
    149149
     150///////////////////////////////////////////////////////////////////////////////
     151// Log base 2 specialized
     152///////////////////////////////////////////////////////////////////////////////
    150153template<> class compare_strategy_t<1,logbase2> {
    151154public:
    152155    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    153         //return mem_compare(x,y,lgth); // TODO review
    154156        return overlap_compare<uint8_t>(x,y,lgth);
    155157    }
     
    159161public:
    160162    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    161         //return mem_compare(x,y,lgth); // TODO review
    162163        return overlap_compare<uint8_t>(x,y,lgth);
    163164    }
     
    167168public:
    168169    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    169         //return mem_compare(x,y,lgth); // TODO review
    170170        return overlap_compare<uint16_t>(x,y,lgth);
    171171    }
     
    175175public:
    176176    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    177         //return mem_compare(x,y,lgth); // TODO review
    178177        return overlap_compare<uint32_t>(x,y,lgth);
    179178    }
     
    183182public:
    184183    static IDISA_ALWAYS_INLINE bool compare(uint8_t * x, uint8_t * y, const uint32_t lgth) {
    185         //return mem_compare(x,y,lgth); // TODO review
    186184        return overlap_compare<uint64_t>(x,y,lgth);
    187185    }
  • trunk/symbol_table/symbol_table.pro

    r2092 r2095  
    5353    test/uniform/st_test_UNIFORM_(5_1_1)_(6_1_1)_(7_1_1)_(8_1_1)_(9_1_1)_(10_1_1)_1_1 \
    5454    test/run_tests.py \
    55     test/uniform/[1_100_10][2_100_10][3_100_10][4_100_10][5_100_10][6_100_10][7_100_10][8_100_10][9_100_10][10_100_10][11_100_10][12_100_10][13_100_10][14_100_10][15_100_10][16_100_10][17_100_10][18_100_10][19_100_10]_1_1.test
     55    test/uniform/[1_100_10][2_100_10][3_100_10][4_100_10][5_100_10][6_100_10][7_100_10][8_100_10][9_100_10][10_100_10][11_100_10][12_100_10][13_100_10][14_100_10][15_100_10][16_100_10][17_100_10][18_100_10][19_100_10]_1_1.test \
     56    test/gen_test_file.py
    5657HEADERS += marker_strms_template.hpp \
    5758    marker_strms.hpp \
     
    8485    lib/bitblock128.hpp \
    8586    lib/bitblock.hpp \
    86     src/types.hpp
     87    src/types.hpp \
     88    lib/debug.hpp \
     89    lib/bitblock_align.hpp
  • trunk/symbol_table/test/st_test_file_generator.py

    r2092 r2095  
    229229        base_filename = ""
    230230        for lst in symbol_specs:
    231             base_filename += "(" + str(lst[0]) + "_" + str(lst[1]) + "_" + str(lst[2]) + ")"
    232         base_filename += "_" + str(arguments[num_args-2]) + "_" + str(arguments[num_args-1])
     231            base_filename += "(" + str(lst[0]) + "_" + str(lst[1]) + "_" + str(lst[2]) + ")_"
     232        base_filename += str(arguments[num_args-2]) + "_" + str(arguments[num_args-1])
    233233
    234234        # calculate total symbol count
Note: See TracChangeset for help on using the changeset viewer.