Changeset 1995 for trunk


Ignore:
Timestamp:
Apr 4, 2012, 3:47:11 PM (7 years ago)
Author:
ksherdy
Message:

"Rolled back dynamic memory allocation.
Added 'SYMBOL' template class parameter.
Began basic scaffolding for both AoS and SoA symbol representations."

Location:
trunk/symbol_table
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/main_template.cpp

    r1993 r1995  
    6060
    6161// Target symbol type must inherit from AoS_symbol
    62 class Symbol: public AoS_symbol
     62class MySymbol: public AoS_symbol
    6363{
    6464public:
    65     bool parameter_1;
     65    bool param_1;
    6666};
    6767
     
    132132    // Symbol Table
    133133    const uint32_t SYMBOL_COUNT = LOOKBACK_SIZE + SEGMENT_SIZE;
    134     Symbol * symbol_ary[SYMBOL_COUNT];
    135 
    136     // TODO - DESTROY
    137     for(int i =0;i<SYMBOL_COUNT;i++) {
    138         symbol_ary[i] = new Symbol();
    139     }
    140 
    141 
    142     id_symbol_table<fast_pool_allocator<1024> > symbol_table;
     134    //AoS_symbol symbol_ary[SYMBOL_COUNT];
     135    MySymbol symbol_ary[SYMBOL_COUNT];
     136    id_symbol_table<MySymbol, fast_pool_allocator<1024> > symbol_table;
    143137
    144138    is.read ((char *)raw_buffer, SEGMENT_SIZE);
     
    170164
    171165      PERF_SEC_START(parser_timer);
    172       symbol_table.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, SEGMENT_BLOCKS, (AoS_symbol **) symbol_ary/*, SYMBOL_COUNT*/);
     166      symbol_table.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, SEGMENT_BLOCKS, symbol_ary /*, SYMBOL_COUNT*/);
    173167      PERF_SEC_END(parser_timer, SEGMENT_SIZE);
    174168
     
    196190          while(!fscanner.is_done()) {
    197191              idx = LOOKBACK_SIZE + blk_base + fscanner.get_pos();
    198               cout <<"[" << idx << "]" << "=" << "(" << symbol_ary[idx]->gid << "," << symbol_ary[idx]->lgth << ")" << endl;
     192              cout <<"[" << idx << "]" << "=" << "(" << symbol_ary[idx].gid << "," << symbol_ary[idx].lgth << ")" << endl;
    199193              fscanner.scan_to_next();
    200194          }
     
    243237
    244238    //PERF_SEC_START(parser_timer);
    245     symbol_table.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, blk, (AoS_symbol **) symbol_ary/*, SYMBOL_COUNT*/);
     239    symbol_table.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, blk, symbol_ary/*, SYMBOL_COUNT*/);
    246240    //PERF_SEC_END(parser_timer, chars_avail+1);
    247241
     
    255249        while(!fscanner.is_done()) {
    256250            idx = LOOKBACK_SIZE + blk_base + fscanner.get_pos();
    257             cout <<"[" << idx << "]" << "=" << "(" << symbol_ary[idx]->gid << "," << symbol_ary[idx]->lgth << ")" << endl;
     251            cout <<"[" << idx << "]" << "=" << "(" << symbol_ary[idx].gid << "," << symbol_ary[idx].lgth << ")" << endl;
    258252            fscanner.scan_to_next();
    259253        }
  • trunk/symbol_table/src/id_symbol_table.hpp

    r1992 r1995  
    3434#include <cstdlib>
    3535
    36 template<class ALLOCATOR>
    37 class id_symbol_table:public symbol_table {
     36template<class SYMBOL, class ALLOCATOR>
     37class id_symbol_table: public symbol_table<SYMBOL> {
    3838public:
    3939    id_symbol_table()/*:hash_table_1(256)*/{}
     
    8181    // Groups & groups
    8282    void resolve(uint8_t buffer [], Groups groups [],  BitBlock starts [], BitBlock ends_gte_17 [],
    83                  BitBlock h0 [], BitBlock h1 [], uint32_t blocks, AoS_symbol ** aos/*, const uint32_t symbols*/) {
     83                 BitBlock h0 [], BitBlock h1 [], uint32_t blocks, SYMBOL * aos/*, const uint32_t symbols*/) {
    8484
    8585
     
    9494        ///////////////////////////////////////////////////////////////////////////////
    9595        if(bitblock::any(groups[blk].ends_1)) {
    96         do_block<hash_table <identity_strategy_t<uint8_t,1>, hash_strategy_t<1>, ALLOCATOR> >(hash_table_1, groups[blk].ends_1, &buffer[blk_base], 1, &buffer[blk_base], &buffer[blk_base], bytes2bits(1), BLOCK_SIZE, aos, blk_base);
     96        do_block<SYMBOL, hash_table <identity_strategy_t<uint8_t,1>, hash_strategy_t<1>, ALLOCATOR> >(hash_table_1, groups[blk].ends_1, &buffer[blk_base], 1, &buffer[blk_base], &buffer[blk_base], bytes2bits(1), BLOCK_SIZE, aos, blk_base);
    9797        }
    9898        if(bitblock::any(groups[blk].ends_2)) {
    99         do_block<hash_table <identity_strategy_t<uint16_t,2>, hash_strategy_t<2>, ALLOCATOR> >(hash_table_2, groups[blk].ends_2, &buffer[blk_base], 2, &buffer[blk_base], &buffer[blk_base], bytes2bits(2), BLOCK_SIZE, aos, blk_base);
     99        do_block<SYMBOL, hash_table <identity_strategy_t<uint16_t,2>, hash_strategy_t<2>, ALLOCATOR> >(hash_table_2, groups[blk].ends_2, &buffer[blk_base], 2, &buffer[blk_base], &buffer[blk_base], bytes2bits(2), BLOCK_SIZE, aos, blk_base);
    100100        }
    101101        if(bitblock::any(groups[blk].ends_3)) {
    102         do_block<hash_table <identity_strategy_t<uint16_t,3>, hash_strategy_t<3>, ALLOCATOR> >(hash_table_3, groups[blk].ends_3, &buffer[blk_base], 3, &buffer[blk_base], &buffer[blk_base], bytes2bits(3), BLOCK_SIZE, aos, blk_base);
     102        do_block<SYMBOL, hash_table <identity_strategy_t<uint16_t,3>, hash_strategy_t<3>, ALLOCATOR> >(hash_table_3, groups[blk].ends_3, &buffer[blk_base], 3, &buffer[blk_base], &buffer[blk_base], bytes2bits(3), BLOCK_SIZE, aos, blk_base);
    103103        }
    104104        if(bitblock::any(groups[blk].ends_4)) {
    105         do_block<hash_table <identity_strategy_t<uint32_t,4>, hash_strategy_t<4>, ALLOCATOR> >(hash_table_4, groups[blk].ends_4, &buffer[blk_base], 4, &buffer[blk_base], &buffer[blk_base], bytes2bits(4), BLOCK_SIZE, aos, blk_base);
     105        do_block<SYMBOL, hash_table <identity_strategy_t<uint32_t,4>, hash_strategy_t<4>, ALLOCATOR> >(hash_table_4, groups[blk].ends_4, &buffer[blk_base], 4, &buffer[blk_base], &buffer[blk_base], bytes2bits(4), BLOCK_SIZE, aos, blk_base);
    106106        }
    107107        if(bitblock::any(groups[blk].ends_5)) {
    108         do_block<hash_table <identity_strategy_t<uint32_t,5>, hash_strategy_t<5>, ALLOCATOR> >(hash_table_5, groups[blk].ends_5, &buffer[blk_base], 5, &buffer[blk_base], &buffer[blk_base], bytes2bits(5), BLOCK_SIZE, aos, blk_base);
     108        do_block<SYMBOL, hash_table <identity_strategy_t<uint32_t,5>, hash_strategy_t<5>, ALLOCATOR> >(hash_table_5, groups[blk].ends_5, &buffer[blk_base], 5, &buffer[blk_base], &buffer[blk_base], bytes2bits(5), BLOCK_SIZE, aos, blk_base);
    109109        }
    110110        if(bitblock::any(groups[blk].ends_6)) {
    111         do_block<hash_table <identity_strategy_t<uint32_t,6>, hash_strategy_t<6>, ALLOCATOR> >(hash_table_6, groups[blk].ends_6, &buffer[blk_base], 6, &buffer[blk_base], &buffer[blk_base], bytes2bits(6), BLOCK_SIZE, aos, blk_base);
     111        do_block<SYMBOL, hash_table <identity_strategy_t<uint32_t,6>, hash_strategy_t<6>, ALLOCATOR> >(hash_table_6, groups[blk].ends_6, &buffer[blk_base], 6, &buffer[blk_base], &buffer[blk_base], bytes2bits(6), BLOCK_SIZE, aos, blk_base);
    112112        }
    113113        if(bitblock::any(groups[blk].ends_7)) {
    114         do_block<hash_table <identity_strategy_t<uint32_t,7>, hash_strategy_t<7>, ALLOCATOR> >(hash_table_7, groups[blk].ends_7, &buffer[blk_base], 7, &buffer[blk_base], &buffer[blk_base], bytes2bits(7), BLOCK_SIZE, aos, blk_base);
     114        do_block<SYMBOL, hash_table <identity_strategy_t<uint32_t,7>, hash_strategy_t<7>, ALLOCATOR> >(hash_table_7, groups[blk].ends_7, &buffer[blk_base], 7, &buffer[blk_base], &buffer[blk_base], bytes2bits(7), BLOCK_SIZE, aos, blk_base);
    115115        }
    116116        ///////////////////////////////////////////////////////////////////////////////
     
    118118        ///////////////////////////////////////////////////////////////////////////////
    119119        if(bitblock::any(groups[blk].ends_8)) {
    120         do_block<hash_table <identity_strategy_t<uint64_t,8>, hash_strategy_d, ALLOCATOR> >(hash_table_8, groups[blk].ends_8, &buffer[blk_base], 8, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 8, BLOCK_SIZE/8, aos, blk_base);
     120        do_block<SYMBOL, hash_table <identity_strategy_t<uint64_t,8>, hash_strategy_d, ALLOCATOR> >(hash_table_8, groups[blk].ends_8, &buffer[blk_base], 8, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 8, BLOCK_SIZE/8, aos, blk_base);
    121121        }
    122122        if(bitblock::any(groups[blk].ends_9)) {
    123         do_block<hash_table<identity_strategy_t<uint64_t,9>, hash_strategy_d, ALLOCATOR> >(hash_table_9, groups[blk].ends_9, &buffer[blk_base], 9, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 9, BLOCK_SIZE/8, aos, blk_base);
     123        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,9>, hash_strategy_d, ALLOCATOR> >(hash_table_9, groups[blk].ends_9, &buffer[blk_base], 9, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 9, BLOCK_SIZE/8, aos, blk_base);
    124124        }
    125125        if(bitblock::any(groups[blk].ends_10)) {
    126         do_block<hash_table<identity_strategy_t<uint64_t,10>, hash_strategy_d, ALLOCATOR> >(hash_table_10, groups[blk].ends_10, &buffer[blk_base], 10, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 10, BLOCK_SIZE/8, aos, blk_base);
     126        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,10>, hash_strategy_d, ALLOCATOR> >(hash_table_10, groups[blk].ends_10, &buffer[blk_base], 10, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 10, BLOCK_SIZE/8, aos, blk_base);
    127127        }
    128128        if(bitblock::any(groups[blk].ends_11)) {
    129         do_block<hash_table<identity_strategy_t<uint64_t,11>, hash_strategy_d, ALLOCATOR> >(hash_table_11, groups[blk].ends_11, &buffer[blk_base], 11, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 11, BLOCK_SIZE/8, aos, blk_base);
     129        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,11>, hash_strategy_d, ALLOCATOR> >(hash_table_11, groups[blk].ends_11, &buffer[blk_base], 11, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 11, BLOCK_SIZE/8, aos, blk_base);
    130130        }
    131131        if(bitblock::any(groups[blk].ends_12)) {
    132         do_block<hash_table<identity_strategy_t<uint64_t,12>, hash_strategy_d, ALLOCATOR> >(hash_table_12, groups[blk].ends_12, &buffer[blk_base], 12, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 12, BLOCK_SIZE/8, aos, blk_base);
     132        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,12>, hash_strategy_d, ALLOCATOR> >(hash_table_12, groups[blk].ends_12, &buffer[blk_base], 12, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 12, BLOCK_SIZE/8, aos, blk_base);
    133133        }
    134134        if(bitblock::any(groups[blk].ends_13)) {
    135         do_block<hash_table<identity_strategy_t<uint64_t,13>, hash_strategy_d, ALLOCATOR> >(hash_table_13, groups[blk].ends_13, &buffer[blk_base], 13, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 13, BLOCK_SIZE/8, aos, blk_base);
     135        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,13>, hash_strategy_d, ALLOCATOR> >(hash_table_13, groups[blk].ends_13, &buffer[blk_base], 13, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 13, BLOCK_SIZE/8, aos, blk_base);
    136136        }
    137137        if(bitblock::any(groups[blk].ends_14)) {
    138         do_block<hash_table<identity_strategy_t<uint64_t,14>, hash_strategy_d, ALLOCATOR> >(hash_table_14, groups[blk].ends_14, &buffer[blk_base], 14, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 14, BLOCK_SIZE/8, aos, blk_base);
     138        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,14>, hash_strategy_d, ALLOCATOR> >(hash_table_14, groups[blk].ends_14, &buffer[blk_base], 14, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 14, BLOCK_SIZE/8, aos, blk_base);
    139139        }
    140140        if(bitblock::any(groups[blk].ends_15)) {
    141         do_block<hash_table<identity_strategy_t<uint64_t,15>, hash_strategy_d, ALLOCATOR> >(hash_table_15, groups[blk].ends_15, &buffer[blk_base], 15, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 15, BLOCK_SIZE/8, aos, blk_base);
     141        do_block<SYMBOL, hash_table<identity_strategy_t<uint64_t,15>, hash_strategy_d, ALLOCATOR> >(hash_table_15, groups[blk].ends_15, &buffer[blk_base], 15, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 15, BLOCK_SIZE/8, aos, blk_base);
    142142        }
    143143        if(bitblock::any(groups[blk].ends_16)) {
    144         do_block<hash_table<identity_strategy_t<BitBlock,16>, hash_strategy_d, ALLOCATOR> >(hash_table_16, groups[blk].ends_16, &buffer[blk_base], 16, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 16, BLOCK_SIZE/8, aos, blk_base);
     144        do_block<SYMBOL, hash_table<identity_strategy_t<BitBlock,16>, hash_strategy_d, ALLOCATOR> >(hash_table_16, groups[blk].ends_16, &buffer[blk_base], 16, (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], 16, BLOCK_SIZE/8, aos, blk_base);
    145145        }
    146146        if(bitblock::any(ends_gte_17[blk])) {
    147         do_block<hash_table<identity_strategy_d, hash_strategy_d, ALLOCATOR> >(hash_table_gte_17, &starts[blk], &ends_gte_17[blk], &buffer[blk_base], (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], BLOCK_SIZE/8, aos, blk_base);
     147        do_block<SYMBOL, hash_table<identity_strategy_d, hash_strategy_d, ALLOCATOR> >(hash_table_gte_17, &starts[blk], &ends_gte_17[blk], &buffer[blk_base], (uint8_t *)&h0[blk], (uint8_t *)&h1[blk], BLOCK_SIZE/8, aos, blk_base);
    148148        }
    149149
     
    181181
    182182// Fixed Lengths - REVERSE SCAN LOGIC - Scan each BLOCK MSB to LSB (high to low memory address)
    183 template<class HASH_TABLE>
     183template<class SYMBOL, class HASH_TABLE>
    184184IDISA_ALWAYS_INLINE void do_block(HASH_TABLE & h_table, BitBlock ends, uint8_t buffer [], const uint32_t lgth,
    185185                                  uint8_t h0 [], uint8_t h1 [], const uint32_t h_lgth, const uint32_t h_block_size,
    186                                   AoS_symbol ** aos , const int32_t block_base){
     186                                  SYMBOL * aos , const int32_t block_base){
    187187
    188188    int32_t spos;
     
    195195
    196196        // Comment out LOOKBACK_SIZE . Nigel's code *should* not produce this case.
    197         aos[LOOKBACK_SIZE + block_base + spos]->gid = h_table.lookup_or_insert(buffer, spos, lgth, h0, h1, h_lgth);
    198         aos[LOOKBACK_SIZE + block_base + spos]->lgth = lgth;
     197        aos[LOOKBACK_SIZE + block_base + spos].gid = h_table.lookup_or_insert(buffer, spos, lgth, h0, h1, h_lgth);
     198        aos[LOOKBACK_SIZE + block_base + spos].lgth = lgth;
    199199
    200200#ifdef ID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
     
    223223
    224224        // Comment out LOOKBACK_SIZE . Nigel's code *should* not produce this case.
    225         aos[LOOKBACK_SIZE + block_base + lb_spos]->gid = h_table.lookup_or_insert(lb_buffer, lb_spos, lgth, lb_h0, lb_h1, h_lgth);
    226         aos[LOOKBACK_SIZE + block_base + lb_spos]->lgth = lgth;
     225        aos[LOOKBACK_SIZE + block_base + lb_spos].gid = h_table.lookup_or_insert(lb_buffer, lb_spos, lgth, lb_h0, lb_h1, h_lgth);
     226        aos[LOOKBACK_SIZE + block_base + lb_spos].lgth = lgth;
    227227
    228228#ifdef ID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
     
    234234
    235235// Variable Lengths - REVERSE SCAN LOGIC - Scan each BLOCK MSB to LSB (high to low memory address)
    236 template<class HASH_TABLE>
     236template<class SYMBOL, class HASH_TABLE>
    237237IDISA_ALWAYS_INLINE void do_block(HASH_TABLE & h_table, BitBlock starts [], BitBlock ends [], uint8_t buffer [],
    238238                                  uint8_t h0 [], uint8_t h1 [], const uint32_t h_block_size,
    239                                   AoS_symbol ** aos, const uint32_t block_base) {
     239                                  SYMBOL * aos, const uint32_t block_base) {
    240240
    241241    int32_t spos;
     
    255255        lgth = ends_rscanner.get_pos() - spos;
    256256        // Comment out LOOKBACK_SIZE . Nigel's code *should* not produce this case.
    257         aos[LOOKBACK_SIZE + block_base + spos]->gid = h_table.lookup_or_insert(buffer, spos, lgth, h0, h1, lgth);
    258         aos[LOOKBACK_SIZE + block_base + spos]->lgth = lgth;
     257        aos[LOOKBACK_SIZE + block_base + spos].gid = h_table.lookup_or_insert(buffer, spos, lgth, h0, h1, lgth);
     258        aos[LOOKBACK_SIZE + block_base + spos].lgth = lgth;
    259259
    260260#ifdef ID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
     
    304304
    305305        // Comment out LOOKBACK_SIZE. Nigel's code *should* not produce this case.
    306         aos[LOOKBACK_SIZE + block_base + lb_spos]->gid = h_table.lookup_or_insert(lb_buffer, lb_spos, lgth, lb_h0, lb_h1, lgth);
    307         aos[LOOKBACK_SIZE + block_base + lb_spos]->lgth = lgth;
     306        aos[LOOKBACK_SIZE + block_base + lb_spos].gid = h_table.lookup_or_insert(lb_buffer, lb_spos, lgth, lb_h0, lb_h1, lgth);
     307        aos[LOOKBACK_SIZE + block_base + lb_spos].lgth = lgth;
    308308
    309309        if((lb_spos) < 0) {
     
    312312        }
    313313
    314         aos[block_base + lb_spos]->lgth = lgth;
     314        //aos[block_base + lb_spos]->lgth = lgth;
    315315
    316316#ifdef ID_SYMBOL_TABLE_TEMPLATE_HPP_DEBUG
  • trunk/symbol_table/src/symbol_table.hpp

    r1992 r1995  
    1717typedef uint32_t gid_type;
    1818
    19 class AoS_symbol { // Xerces
     19///////////////////////////////////////////////////////////////////////////
     20// Symbol Type Definitions - Warning: No bounds checks.
     21///////////////////////////////////////////////////////////////////////////
     22class Symbol {
    2023public:
     24//    IDISA_ALWAYS_INLINE void add_symbol(gid_type gid, uint8_t * raw_data, uint32_t lgth, uint32_t idx=0);
     25//    IDISA_ALWAYS_INLINE gid_type get_gid(uint32_t idx=0) const;
     26//    IDISA_ALWAYS_INLINE uint8_t * get_raw_data(uint32_t idx=0) const;
     27//    IDISA_ALWAYS_INLINE uint32_t get_lgth(uint32_t idx=0) const;
     28};
     29
     30class AoS_symbol: public Symbol { // Xerces
     31public:
     32
     33//    IDISA_ALWAYS_INLINE void add_symbol(gid_type gid, uint8_t * raw_data, uint32_t lgth, uint32_t idx=0) {
     34//      this->gid = gid;
     35//      this->raw_data = raw_data;
     36//      this->lgth = lgth;
     37//    }
     38
     39//    IDISA_ALWAYS_INLINE gid_type get_gid(uint32_t idx=0) const { return gid; }
     40//    IDISA_ALWAYS_INLINE uint8_t * get_raw_data(uint32_t idx=0) const { return raw_data; }
     41//    IDISA_ALWAYS_INLINE uint32_t get_lgth(uint32_t idx=0) const { return lgth; }
     42
     43//private:
    2144    gid_type gid;
    22     //uint8_t * raw_data;
     45    uint8_t * raw_data;
    2346    uint32_t lgth;
    2447};
    2548
    26 class SoA_symbol { // Regex
    27 public:
    28     gid_type * gids;
    29     uint8_t * raw_data;
    30     uint32_t * lgth;
    31 };
     49//class SoA_symbol: public Symbol { // Regex
     50//public:
    3251
    33 class symbol_table {
     52//    IDISA_ALWAYS_INLINE void add_symbol(gid_type gid, uint8_t * raw_data, uint32_t lgth, uint32_t idx=0) {
     53//      this->gid[idx] = gid;
     54//      this->raw_data[idx] = raw_data;
     55//      this->lgth[idx] = lgth;
     56//    }
     57
     58//    IDISA_ALWAYS_INLINE gid_type get_gid(uint32_t idx=0) const { return this->gid[idx]; }
     59//    IDISA_ALWAYS_INLINE uint8_t * get_raw_data(uint32_t idx=0) const { return this->raw_data[idx]; }
     60//    IDISA_ALWAYS_INLINE uint32_t get_lgth(uint32_t idx=0) const { return this->lgth[idx]; }
     61
     62//private:
     63//    gid_type * gid;
     64//    uint8_t ** raw_data;
     65//    uint32_t * lgth;
     66//};
     67
     68///////////////////////////////////////////////////////////////////////////
     69// Symbol Table Definition
     70///////////////////////////////////////////////////////////////////////////
     71
     72template <class SYMBOL> class symbol_table{
    3473public:
    3574    void resolve(uint8_t buffer [], Groups groups [],  BitBlock starts [], BitBlock ends_gte_17 [],
    36                  BitBlock h0 [], BitBlock h1 [], uint32_t blocks, AoS_symbol * aos []/*, const uint32_t symbols*/);
     75                 BitBlock h0 [], BitBlock h1 [], uint32_t blocks, SYMBOL * aos /*, const uint32_t symbols*/);
    3776
    3877    //void resolve(uint8_t buffer [], Groups groups [],  BitBlock starts [], BitBlock ends_gte_17 [],
Note: See TracChangeset for help on using the changeset viewer.