Changeset 2097 for trunk/symbol_table
- Timestamp:
- May 10, 2012, 12:15:52 PM (7 years ago)
- Location:
- trunk/symbol_table
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/symbol_table/demo_strms.py
r2096 r2097 25 25 groups = div2_group_strms.Groups() 26 26 groups.starts = markers.starts 27 groups. ends = markers.ends27 groups.follows = markers.follows 28 28 div2_group_strms.Gen_lgth_groups(groups) 29 29 … … 31 31 ('markers.spans', bitstream2string(markers.spans, lgth)), 32 32 ('markers.starts', bitstream2string(markers.starts, lgth)), 33 ('markers. ends', bitstream2string(markers.ends, lgth)),33 ('markers.follows', bitstream2string(markers.follows, lgth)), 34 34 ('groups.starts', bitstream2string(groups.starts, lgth)), 35 ('groups. ends', bitstream2string(groups.ends, lgth)),36 ('groups. ends_2', bitstream2string(groups.ends_2, lgth)),37 ('groups. ends_4', bitstream2string(groups.ends_4, lgth)),38 ('groups. ends_6', bitstream2string(groups.ends_6, lgth)),39 ('groups. ends_8', bitstream2string(groups.ends_8, lgth)),40 ('groups. ends_10', bitstream2string(groups.ends_10, lgth)),41 ('groups. ends_12', bitstream2string(groups.ends_12, lgth)),42 ('groups. ends_14', bitstream2string(groups.ends_14, lgth)),43 ('groups. ends_16', bitstream2string(groups.ends_16, lgth)),44 ('groups. ends_gte_17', bitstream2string(groups.ends_gte_17, lgth))])35 ('groups.follows', bitstream2string(groups.follows, lgth)), 36 ('groups.follows_2', bitstream2string(groups.follows_2, lgth)), 37 ('groups.follows_4', bitstream2string(groups.follows_4, lgth)), 38 ('groups.follows_6', bitstream2string(groups.follows_6, lgth)), 39 ('groups.follows_8', bitstream2string(groups.follows_8, lgth)), 40 ('groups.follows_10', bitstream2string(groups.follows_10, lgth)), 41 ('groups.follows_12', bitstream2string(groups.follows_12, lgth)), 42 ('groups.follows_14', bitstream2string(groups.follows_14, lgth)), 43 ('groups.follows_16', bitstream2string(groups.follows_16, lgth)), 44 ('groups.follows_gte_17', bitstream2string(groups.follows_gte_17, lgth))]) 45 45 46 46 def Demo_logbase2(u8data, basis_bits): … … 54 54 groups = logbase2_group_strms.Groups() 55 55 groups.starts = markers.starts 56 groups. ends = markers.ends56 groups.follows = markers.follows 57 57 logbase2_group_strms.Gen_lgth_groups(groups) 58 58 … … 60 60 ('markers.spans', bitstream2string(markers.spans, lgth)), 61 61 ('markers.starts', bitstream2string(markers.starts, lgth)), 62 ('markers. ends', bitstream2string(markers.ends, lgth)),62 ('markers.follows', bitstream2string(markers.follows, lgth)), 63 63 ('groups.starts', bitstream2string(groups.starts, lgth)), 64 ('groups. ends', bitstream2string(groups.ends, lgth)),65 ('groups. ends_1', bitstream2string(groups.ends_1, lgth)),66 ('groups. ends_2', bitstream2string(groups.ends_2, lgth)),67 ('groups. ends_4', bitstream2string(groups.ends_4, lgth)),68 ('groups. ends_8', bitstream2string(groups.ends_8, lgth)),69 ('groups. ends_16', bitstream2string(groups.ends_16, lgth)),70 ('groups. ends_gte_17', bitstream2string(groups.ends_gte_17, lgth))])64 ('groups.follows', bitstream2string(groups.follows, lgth)), 65 ('groups.follows_1', bitstream2string(groups.follows_1, lgth)), 66 ('groups.follows_2', bitstream2string(groups.follows_2, lgth)), 67 ('groups.follows_4', bitstream2string(groups.follows_4, lgth)), 68 ('groups.follows_8', bitstream2string(groups.follows_8, lgth)), 69 ('groups.follows_16', bitstream2string(groups.follows_16, lgth)), 70 ('groups.follows_gte_17', bitstream2string(groups.follows_gte_17, lgth))]) 71 71 72 72 def Demo_div2_logbase2(u8data, basis_bits): … … 80 80 groups = div2_logbase2_group_strms.Groups() 81 81 groups.starts = markers.starts 82 groups. ends = markers.ends82 groups.follows = markers.follows 83 83 div2_logbase2_group_strms.Gen_lgth_groups(groups) 84 84 … … 86 86 ('markers.spans', bitstream2string(markers.spans, lgth)), 87 87 ('markers.starts', bitstream2string(markers.starts, lgth)), 88 ('markers. ends', bitstream2string(markers.ends, lgth)),88 ('markers.follows', bitstream2string(markers.follows, lgth)), 89 89 ('groups.starts', bitstream2string(groups.starts, lgth)), 90 ('groups. ends', bitstream2string(groups.ends, lgth)),91 ('groups. ends_2', bitstream2string(groups.ends_2, lgth)),92 ('groups. ends_4', bitstream2string(groups.ends_4, lgth)),93 ('groups. ends_6', bitstream2string(groups.ends_6, lgth)),94 ('groups. ends_8', bitstream2string(groups.ends_8, lgth)),95 ('groups. ends_16', bitstream2string(groups.ends_16, lgth)),96 ('groups. ends_gte_17', bitstream2string(groups.ends_gte_17, lgth))])90 ('groups.follows', bitstream2string(groups.follows, lgth)), 91 ('groups.follows_2', bitstream2string(groups.follows_2, lgth)), 92 ('groups.follows_4', bitstream2string(groups.follows_4, lgth)), 93 ('groups.follows_6', bitstream2string(groups.follows_6, lgth)), 94 ('groups.follows_8', bitstream2string(groups.follows_8, lgth)), 95 ('groups.follows_16', bitstream2string(groups.follows_16, lgth)), 96 ('groups.follows_gte_17', bitstream2string(groups.follows_gte_17, lgth))]) 97 97 98 98 if __name__ == "__main__": -
trunk/symbol_table/div2_group_strms.py
r2065 r2097 4 4 class Groups(): 5 5 starts = 0 6 ends = 07 ends_2 = 08 ends_4 = 09 ends_6 = 010 ends_8 = 011 ends_10 = 012 ends_12 = 013 ends_14 = 014 ends_16 = 015 ends_gte_17 = 06 follows = 0 7 follows_2 = 0 8 follows_4 = 0 9 follows_6 = 0 10 follows_8 = 0 11 follows_10 = 0 12 follows_12 = 0 13 follows_14 = 0 14 follows_16 = 0 15 follows_gte_17 = 0 16 16 17 17 def Gen_lgth_groups(groups): 18 18 19 shift_or_ ends = (groups.ends | pablo.Advance(groups.ends))20 ends = groups.ends19 shift_or_follows = (groups.follows | pablo.Advance(groups.follows)) 20 follows = groups.follows 21 21 22 22 # Group symbols of length 1 and length 2 23 23 cursor = pablo.Advance(pablo.Advance(groups.starts)) 24 groups. ends_2 = cursor & (shift_or_ends)24 groups.follows_2 = cursor & (shift_or_follows) 25 25 26 26 mask = pablo.Advance(groups.starts) | pablo.Advance(pablo.Advance(groups.starts)) 27 ends = ends &~ mask27 follows = follows &~ mask 28 28 29 29 # Group symbols of length 3 and length 4 30 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))31 groups. ends_4 = cursor & (shift_or_ends)30 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 31 groups.follows_4 = cursor & (shift_or_follows) 32 32 33 33 mask = pablo.Advance(pablo.Advance(mask)) 34 ends = ends &~ mask34 follows = follows &~ mask 35 35 36 36 ## Group symbols of length 5 and length 6 37 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))38 groups. ends_6 = cursor & (shift_or_ends)37 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 38 groups.follows_6 = cursor & (shift_or_follows) 39 39 40 40 mask = pablo.Advance(pablo.Advance(mask)) 41 ends = ends &~ mask41 follows = follows &~ mask 42 42 43 43 ## Group symbols of length 7 and length 8 44 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))45 groups. ends_8 = cursor & (shift_or_ends)44 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 45 groups.follows_8 = cursor & (shift_or_follows) 46 46 47 47 mask = pablo.Advance(pablo.Advance(mask)) 48 ends = ends &~ mask48 follows = follows &~ mask 49 49 50 50 ## Group symbols of length 9 and length 10 51 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))52 groups. ends_10 = cursor & (shift_or_ends)51 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 52 groups.follows_10 = cursor & (shift_or_follows) 53 53 54 54 mask = pablo.Advance(pablo.Advance(mask)) 55 ends = ends &~ mask55 follows = follows &~ mask 56 56 57 57 ## Group symbols of length 11 and length 12 58 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))59 groups. ends_12 = cursor & (shift_or_ends)58 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 59 groups.follows_12 = cursor & (shift_or_follows) 60 60 61 61 mask = pablo.Advance(pablo.Advance(mask)) 62 ends = ends &~ mask62 follows = follows &~ mask 63 63 64 64 ## Group symbols of length 13 and length 14 65 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))66 groups. ends_14 = cursor & (shift_or_ends)65 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 66 groups.follows_14 = cursor & (shift_or_follows) 67 67 68 68 mask = pablo.Advance(pablo.Advance(mask)) 69 ends = ends &~ mask69 follows = follows &~ mask 70 70 71 71 ## Group symbols of length 15 and length 16 72 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_ ends))73 groups. ends_16 = cursor & (shift_or_ends)72 cursor = pablo.Advance(pablo.Advance(cursor &~ shift_or_follows)) 73 groups.follows_16 = cursor & (shift_or_follows) 74 74 75 75 mask = pablo.Advance(pablo.Advance(mask)) 76 ends = ends &~ mask76 follows = follows &~ mask 77 77 78 78 ## Group symbols of length greater than equal to 17 79 groups. ends_gte_17 = ends79 groups.follows_gte_17 = follows 80 80 81 81 def Main(groups): -
trunk/symbol_table/group_strms_template.hpp
r2054 r2097 12 12 static IDISA_ALWAYS_INLINE void identity_group_do_block(Markers & markers, Groups & groups) { 13 13 groups.starts = markers.starts; 14 groups. ends = markers.ends;14 groups.follows = markers.follows; 15 15 // GENERATED 16 16 @group_strms_block_stmts … … 19 19 static IDISA_ALWAYS_INLINE void identity_group_do_final_block(Markers & markers, Groups & groups, BitBlock & EOF_mask) { 20 20 groups.starts = markers.starts; 21 groups. ends = markers.ends;21 groups.follows = markers.follows; 22 22 // GENERATED 23 23 @group_strms_final_block_stmts -
trunk/symbol_table/id_group_strms.py
r2065 r2097 4 4 class Groups(): 5 5 starts = 0 6 ends = 07 ends_1 = 08 ends_2 = 09 ends_3 = 010 ends_4 = 011 ends_5 = 012 ends_6 = 013 ends_7 = 014 ends_8 = 015 ends_9 = 016 ends_10 = 017 ends_11 = 018 ends_12 = 019 ends_13 = 020 ends_14 = 021 ends_15 = 022 ends_16 = 023 ends_gte_17 = 06 follows = 0 7 follows_1 = 0 8 follows_2 = 0 9 follows_3 = 0 10 follows_4 = 0 11 follows_5 = 0 12 follows_6 = 0 13 follows_7 = 0 14 follows_8 = 0 15 follows_9 = 0 16 follows_10 = 0 17 follows_11 = 0 18 follows_12 = 0 19 follows_13 = 0 20 follows_14 = 0 21 follows_15 = 0 22 follows_16 = 0 23 follows_gte_17 = 0 24 24 25 25 def Gen_lgth_groups(groups): 26 26 27 27 cursor = groups.starts 28 temp = groups. ends28 temp = groups.follows 29 29 30 30 # Group symbols of length 1 31 31 cursor = pablo.Advance(cursor) 32 groups. ends_1 = cursor & temp33 temp = temp & ~groups. ends_132 groups.follows_1 = cursor & temp 33 temp = temp & ~groups.follows_1 34 34 35 35 # Group symbols of length 2 36 36 cursor = pablo.Advance(cursor) 37 groups. ends_2 = cursor & temp38 temp = temp & ~groups. ends_237 groups.follows_2 = cursor & temp 38 temp = temp & ~groups.follows_2 39 39 40 40 # Group symbols of length 3 41 41 cursor = pablo.Advance(cursor) 42 groups. ends_3 = cursor & temp43 temp = temp & ~groups. ends_342 groups.follows_3 = cursor & temp 43 temp = temp & ~groups.follows_3 44 44 45 45 # Group symbols of length 4 46 46 cursor = pablo.Advance(cursor) 47 groups. ends_4 = cursor & temp48 temp = temp & ~groups. ends_447 groups.follows_4 = cursor & temp 48 temp = temp & ~groups.follows_4 49 49 50 50 # Group symbols of length 5 51 51 cursor = pablo.Advance(cursor) 52 groups. ends_5 = cursor & temp53 temp = temp & ~groups. ends_552 groups.follows_5 = cursor & temp 53 temp = temp & ~groups.follows_5 54 54 55 55 # Group symbols of length 6 56 56 cursor = pablo.Advance(cursor) 57 groups. ends_6 = cursor & temp58 temp = temp & ~groups. ends_657 groups.follows_6 = cursor & temp 58 temp = temp & ~groups.follows_6 59 59 60 60 # Group symbols of length 7 61 61 cursor = pablo.Advance(cursor) 62 groups. ends_7 = cursor & temp63 temp = temp & ~groups. ends_762 groups.follows_7 = cursor & temp 63 temp = temp & ~groups.follows_7 64 64 65 65 # Group symbols of length 8 66 66 cursor = pablo.Advance(cursor) 67 groups. ends_8 = cursor & temp68 temp = temp & ~groups. ends_867 groups.follows_8 = cursor & temp 68 temp = temp & ~groups.follows_8 69 69 70 70 # Group symbols of length 9 71 71 cursor = pablo.Advance(cursor) 72 groups. ends_9 = cursor & temp73 temp = temp & ~groups. ends_972 groups.follows_9 = cursor & temp 73 temp = temp & ~groups.follows_9 74 74 75 75 # Group symbols of length 10 76 76 cursor = pablo.Advance(cursor) 77 groups. ends_10 = cursor & temp78 temp = temp & ~groups. ends_1077 groups.follows_10 = cursor & temp 78 temp = temp & ~groups.follows_10 79 79 80 80 # Group symbols of length 11 81 81 cursor = pablo.Advance(cursor) 82 groups. ends_11 = cursor & temp83 temp = temp & ~groups. ends_1182 groups.follows_11 = cursor & temp 83 temp = temp & ~groups.follows_11 84 84 85 85 # Group symbols of length 12 86 86 cursor = pablo.Advance(cursor) 87 groups. ends_12 = cursor & temp88 temp = temp & ~groups. ends_1287 groups.follows_12 = cursor & temp 88 temp = temp & ~groups.follows_12 89 89 90 90 # Group symbols of length 13 91 91 cursor = pablo.Advance(cursor) 92 groups. ends_13 = cursor & temp93 temp = temp & ~groups. ends_1392 groups.follows_13 = cursor & temp 93 temp = temp & ~groups.follows_13 94 94 95 95 # Group symbols of length 14 96 96 cursor = pablo.Advance(cursor) 97 groups. ends_14 = cursor & temp98 temp = temp & ~groups. ends_1497 groups.follows_14 = cursor & temp 98 temp = temp & ~groups.follows_14 99 99 100 100 # Group symbols of length 15 101 101 cursor = pablo.Advance(cursor) 102 groups. ends_15 = cursor & temp103 temp = temp & ~groups. ends_15102 groups.follows_15 = cursor & temp 103 temp = temp & ~groups.follows_15 104 104 105 105 # Group symbols of length 16 106 106 cursor = pablo.Advance(cursor) 107 groups. ends_16 = cursor & temp108 temp = temp & ~groups. ends_16107 groups.follows_16 = cursor & temp 108 temp = temp & ~groups.follows_16 109 109 110 110 # Group symbols of length greater than 16 111 groups. ends_gte_17 = temp111 groups.follows_gte_17 = temp 112 112 113 113 def Main(groups): -
trunk/symbol_table/logbase2_group_strms.py
r2096 r2097 3 3 class Groups(): 4 4 starts = 0 5 ends = 06 ends_1 = 07 ends_2 = 08 ends_4 = 09 ends_8 = 010 ends_16 = 011 ends_gte_17 = 05 follows = 0 6 follows_1 = 0 7 follows_2 = 0 8 follows_4 = 0 9 follows_8 = 0 10 follows_16 = 0 11 follows_gte_17 = 0 12 12 13 13 def Gen_lgth_groups(groups): 14 14 15 15 starts = groups.starts 16 remaining_ ends = groups.ends16 remaining_follows = groups.follows 17 17 18 18 # Group symbols of length 1 19 19 starts_1 = pablo.Advance(starts) 20 groups. ends_1 = starts_1 & remaining_ends21 remaining_ ends = remaining_ends & ~groups.ends_120 groups.follows_1 = starts_1 & remaining_follows 21 remaining_follows = remaining_follows & ~groups.follows_1 22 22 23 23 # Group symbols of length 2 24 24 starts_2 = pablo.Advance(starts_1) 25 groups. ends_2 = starts_2 & remaining_ends26 remaining_ ends = remaining_ends & ~groups.ends_225 groups.follows_2 = starts_2 & remaining_follows 26 remaining_follows = remaining_follows & ~groups.follows_2 27 27 28 28 # Group symbols of length 3 to 4 … … 31 31 starts_3_to_4 = pablo.Advance(pablo.Advance(temp)) 32 32 #starts_3_to_4 = interpose32 (temp, temp32, 2) 33 groups. ends_4 = starts_3_to_4 & remaining_ends34 remaining_ ends = remaining_ends & ~groups.ends_433 groups.follows_4 = starts_3_to_4 & remaining_follows 34 remaining_follows = remaining_follows & ~groups.follows_4 35 35 36 36 # Group symbols of length 5 to 8 … … 39 39 starts_5_to_8 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp)))) 40 40 #starts_5_to_8 = interpose32 (temp, temp32, 4) 41 groups. ends_8 = starts_5_to_8 & remaining_ends42 remaining_ ends = remaining_ends & ~groups.ends_841 groups.follows_8 = starts_5_to_8 & remaining_follows 42 remaining_follows = remaining_follows & ~groups.follows_8 43 43 44 44 # Group symbols of length 9 to 16 … … 47 47 starts_9_16 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp)))))))) 48 48 #starts_9_16 = interpose32 (temp, temp32, 8) 49 groups. ends_16 = starts_9_16 & remaining_ends50 remaining_ ends = remaining_ends & ~groups.ends_1649 groups.follows_16 = starts_9_16 & remaining_follows 50 remaining_follows = remaining_follows & ~groups.follows_16 51 51 52 52 # Group symbols of length 17 and longer 53 groups. ends_gte_17 = remaining_ends53 groups.follows_gte_17 = remaining_follows 54 54 55 55 def Main(groups): -
trunk/symbol_table/main_template.cpp
r2095 r2097 111 111 BitBlock * starts = &lookback_starts[LOOKBACK_SIZE/BLOCK_SIZE]; 112 112 113 // ends_gte_17114 BitBlock aligned_ ends_gte_17[SEGMENT_ALLOC_SIZE/8];115 BitBlock * lookback_ ends_gte_17 = (BitBlock *) aligned_ends_gte_17;116 memset(lookback_ ends_gte_17,0,LOOKBACK_SIZE/BLOCK_SIZE);117 BitBlock * ends_gte_17 = &lookback_ends_gte_17[LOOKBACK_SIZE/BLOCK_SIZE];113 // follows_gte_17 114 BitBlock aligned_follows_gte_17[SEGMENT_ALLOC_SIZE/8]; 115 BitBlock * lookback_follows_gte_17 = (BitBlock *) aligned_follows_gte_17; 116 memset(lookback_follows_gte_17,0,LOOKBACK_SIZE/BLOCK_SIZE); 117 BitBlock * follows_gte_17 = &lookback_follows_gte_17[LOOKBACK_SIZE/BLOCK_SIZE]; 118 118 119 119 // BitSteams - Without lookback … … 146 146 h1[blk] = hash[blk].h1; 147 147 starts[blk] = groups[blk].starts; 148 ends_gte_17[blk] = groups[blk].ends_gte_17;148 follows_gte_17[blk] = groups[blk].follows_gte_17; 149 149 } 150 150 151 151 PERF_SEC_START(parser_timer); 152 st.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, SEGMENT_BLOCKS, gids);152 st.resolve(raw_buffer, groups, starts, follows_gte_17, h0, h1, SEGMENT_BLOCKS, gids); 153 153 PERF_SEC_END(parser_timer, SEGMENT_SIZE); 154 154 … … 160 160 161 161 memmove(lookback_starts,&((uint8_t *)starts)[(SEGMENT_SIZE-LOOKBACK_SIZE)/8],LOOKBACK_SIZE/8); 162 memmove(lookback_ ends_gte_17,&((uint8_t *)ends_gte_17)[(SEGMENT_SIZE-LOOKBACK_SIZE)/8],LOOKBACK_SIZE/8);162 memmove(lookback_follows_gte_17,&((uint8_t *)follows_gte_17)[(SEGMENT_SIZE-LOOKBACK_SIZE)/8],LOOKBACK_SIZE/8); 163 163 164 164 //lookback_h0[0] = h0[SEGMENT_BLOCKS-1]; … … 218 218 h1[blk] = hash[blk].h1; 219 219 starts[blk] = groups[blk].starts; 220 ends_gte_17[blk] = groups[blk].ends_gte_17;220 follows_gte_17[blk] = groups[blk].follows_gte_17; 221 221 } 222 222 223 223 PERF_SEC_START(parser_timer); 224 st.resolve(raw_buffer, groups, starts, ends_gte_17, h0, h1, segment_blocks, gids);224 st.resolve(raw_buffer, groups, starts, follows_gte_17, h0, h1, segment_blocks, gids); 225 225 PERF_SEC_END(parser_timer, chars_avail+1); 226 226 -
trunk/symbol_table/marker_strms.py
r2043 r2097 4 4 spans = 0 5 5 starts = 0 6 ends = 06 follows = 0 7 7 8 8 # Calculate Symbol spans … … 51 51 markers.spans = (temp37 | temp40) 52 52 53 # Determine Symbol starts, ends53 # Determine Symbol starts, follows 54 54 def Generate_markers(markers): 55 55 markers.starts = markers.spans &~ Advance(markers.spans) 56 markers. ends = ~markers.spans & Advance(markers.spans)56 markers.follows = ~markers.spans & Advance(markers.spans) 57 57 #ScanThru(markers.starts, markers.spans) 58 #markers. ends = ScanThru(markers.starts, markers.spans)58 #markers.follows = ScanThru(markers.starts, markers.spans) 59 59 60 60 def Main(markers): -
trunk/symbol_table/marker_strms_template.hpp
r1960 r2097 9 9 @marker_strms_stream_stmts 10 10 11 static IDISA_ALWAYS_INLINE void markers_do_block(Basis_bits & basis_bits, Markers & markers) {//BitBlock & starts, BitBlock & ends) {11 static IDISA_ALWAYS_INLINE void markers_do_block(Basis_bits & basis_bits, Markers & markers) {//BitBlock & starts, BitBlock & follows) { 12 12 // GENERATED 13 13 @marker_strms_block_stmts 14 14 } 15 15 16 static IDISA_ALWAYS_INLINE void markers_do_final_block(Basis_bits & basis_bits, Markers & markers, BitBlock & EOF_mask) { // BitBlock & starts, BitBlock & ends, BitBlock & EOF_mask) {16 static IDISA_ALWAYS_INLINE void markers_do_final_block(Basis_bits & basis_bits, Markers & markers, BitBlock & EOF_mask) { // BitBlock & starts, BitBlock & follows, BitBlock & EOF_mask) { 17 17 // GENERATED 18 18 @marker_strms_final_block_stmts -
trunk/symbol_table/src/symbol_table.hpp
r2092 r2097 44 44 void do_block(uint32_t blk_offset, 45 45 HASH_TABLE & h_table, 46 BitBlock ends,46 BitBlock follows, 47 47 uint8_t buffer [], const uint32_t lgth, 48 48 uint8_t h0 [], uint8_t h1 [], const uint32_t h_block_size, … … 52 52 void do_block(uint32_t blk_offset, 53 53 HASH_TABLE & h_table, 54 BitBlock starts [], BitBlock ends [],54 BitBlock starts [], BitBlock follows [], 55 55 uint8_t buffer [], 56 56 uint8_t h0 [], uint8_t h1 [], const uint32_t h_block_size, … … 113 113 114 114 // Groups & groups 115 void resolve(uint8_t buffer [], Groups groups [], BitBlock starts [], BitBlock ends_gte_17 [],115 void resolve(uint8_t buffer [], Groups groups [], BitBlock starts [], BitBlock follows_gte_17 [], 116 116 BitBlock h0 [], BitBlock h1 [], uint32_t segment_blocks, GIDS & gids) { 117 117 … … 130 130 /////////////////////////////////////////////////////////////////////////////// 131 131 #define BYTE_HASH_FIXED(GROUP_STRATEGY, HASH_STRATEGY, LGTH) \ 132 if(bitblock::any(groups. ends_##LGTH)) { \132 if(bitblock::any(groups.follows_##LGTH)) { \ 133 133 do_block<GIDS, GROUP_STRATEGY##_hash_table <LGTH, GROUP_STRATEGY, HASH_STRATEGY, ALLOCATOR> > \ 134 134 (blk_offset, \ 135 135 hash_table_##LGTH, \ 136 groups. ends_##LGTH, \136 groups.follows_##LGTH, \ 137 137 buffer, LGTH, /* buffer, symbol length */ \ 138 138 buffer, buffer, BLOCK_SIZE, /* h0, h1, hash block size (bits) */ \ … … 144 144 /////////////////////////////////////////////////////////////////////////////// 145 145 #define BYTE_HASH_VARIABLE(GROUP_STRATEGY, HASH_STRATEGY, LGTH) \ 146 if(bitblock::any(groups. ends_##LGTH)) { \146 if(bitblock::any(groups.follows_##LGTH)) { \ 147 147 do_block<GIDS, GROUP_STRATEGY##_hash_table <LGTH, GROUP_STRATEGY, HASH_STRATEGY, ALLOCATOR> > \ 148 148 (blk_offset, \ 149 149 hash_table_##LGTH, \ 150 150 starts, \ 151 &groups. ends_##LGTH, \151 &groups.follows_##LGTH, \ 152 152 buffer, \ 153 153 buffer, buffer, BLOCK_SIZE, /* h0, h1, hash block size (bits) */ \ … … 160 160 /////////////////////////////////////////////////////////////////////////////// 161 161 #define BIT_HASH_FIXED(GROUP_STRATEGY, HASH_STRATEGY, LGTH) \ 162 if(bitblock::any(groups. ends_##LGTH)) { \162 if(bitblock::any(groups.follows_##LGTH)) { \ 163 163 do_block<GIDS, GROUP_STRATEGY##_hash_table <LGTH, GROUP_STRATEGY, HASH_STRATEGY, ALLOCATOR> > \ 164 164 (blk_offset, \ 165 165 hash_table_##LGTH, \ 166 groups. ends_##LGTH, \166 groups.follows_##LGTH, \ 167 167 buffer, LGTH, \ 168 168 (uint8_t *)h0, (uint8_t *)h1, (BLOCK_SIZE / 8), \ … … 174 174 /////////////////////////////////////////////////////////////////////////////// 175 175 #define BIT_HASH_VARIABLE(GROUP_STRATEGY, HASH_STRATEGY, LGTH) \ 176 if(bitblock::any(groups. ends_##LGTH)) { \176 if(bitblock::any(groups.follows_##LGTH)) { \ 177 177 do_block<GIDS, GROUP_STRATEGY##_hash_table <LGTH, GROUP_STRATEGY, HASH_STRATEGY, ALLOCATOR> > \ 178 178 (blk_offset, \ 179 179 hash_table_##LGTH, \ 180 180 starts, \ 181 &groups. ends_##LGTH, \181 &groups.follows_##LGTH, \ 182 182 buffer, \ 183 183 (uint8_t *)h0, (uint8_t *)h1, (BLOCK_SIZE / 8), /* h0, h1, hash block size (bits) */ \ … … 228 228 #undef BIT_HASH_VARIABLE 229 229 230 if(bitblock::any(groups. ends_gte_17)) {230 if(bitblock::any(groups.follows_gte_17)) { 231 231 do_block<GIDS, id_hash_table<0, id, bit, ALLOCATOR> > 232 232 (blk_offset, 233 233 hash_table_gte_17, 234 starts, &groups. ends_gte_17,234 starts, &groups.follows_gte_17, 235 235 buffer, 236 236 (uint8_t *)h0, (uint8_t *)h1, BLOCK_SIZE/8, … … 295 295 void do_block(uint32_t blk_offset, 296 296 HASH_TABLE & h_table, 297 BitBlock ends,297 BitBlock follows, 298 298 uint8_t buffer [], const uint32_t lgth, 299 299 uint8_t h0 [], uint8_t h1 [], const uint32_t h_block_size, … … 309 309 uint32_t blk_count; 310 310 311 ReverseScanner<BitBlock, scanword_t> rscanner(& ends);311 ReverseScanner<BitBlock, scanword_t> rscanner(&follows); 312 312 313 313 rscanner.scan_to_next(); … … 351 351 void do_block(uint32_t blk_offset, 352 352 HASH_TABLE & h_table, 353 BitBlock starts [], BitBlock ends [],353 BitBlock starts [], BitBlock follows [], 354 354 uint8_t buffer [], 355 355 uint8_t h0 [], uint8_t h1 [], const uint32_t h_block_size, … … 367 367 uint32_t blk_count = 0; 368 368 369 ReverseScanner<BitBlock, scanword_t> ends_rscanner(ends);369 ReverseScanner<BitBlock, scanword_t> follows_rscanner(follows); 370 370 ReverseScanner<BitBlock, scanword_t> starts_rscanner(starts); 371 371 372 ends_rscanner.scan_to_next();373 epos = ends_rscanner.get_pos();374 375 while(! ends_rscanner.is_done()) {372 follows_rscanner.scan_to_next(); 373 epos = follows_rscanner.get_pos(); 374 375 while(!follows_rscanner.is_done()) { 376 376 377 377 starts_rscanner.move_to(epos); … … 412 412 #endif 413 413 414 ends_rscanner.scan_to_next();415 epos = ends_rscanner.get_pos();414 follows_rscanner.scan_to_next(); 415 epos = follows_rscanner.get_pos(); 416 416 } 417 417 } … … 423 423 void do_block(uint32_t blk_offset, 424 424 HASH_TABLE & h_table, 425 BitBlock ends,425 BitBlock follows, 426 426 uint8_t buffer [], const uint32_t lgth, 427 427 uint8_t h0 [], uint8_t h1 [], const uint32_t h_lgth, const uint32_t h_block_size, … … 431 431 int32_t spos; 432 432 int32_t epos; 433 ForwardScanner<BitBlock, scanword_t> fscanner(& ends);433 ForwardScanner<BitBlock, scanword_t> fscanner(&follows); 434 434 435 435 fscanner.scan_to_next();
Note: See TracChangeset
for help on using the changeset viewer.