Changeset 2185 for trunk


Ignore:
Timestamp:
May 29, 2012, 4:10:00 PM (7 years ago)
Author:
ksherdy
Message:

Fixed template glue.

Location:
trunk/symbol_table
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/pablo/bit_byte_group_strms.py

    r2174 r2185  
    88        follows_0 = 0 # byte
    99
    10 def Gen_lgth_groups(groups):
     10def Gen_lgth_groups(markers, groups):
     11
     12        groups.starts = markers.starts
     13        groups.follows = markers.follows
    1114
    1215        # Groups symbols of length 1 to length 7
    13 
    1416        follows_gt_0 = groups.follows
    1517
     
    3436
    3537
    36 def Main(groups):
    37         Gen_lgth_groups(groups)
     38def Main(markers, groups):
     39        Gen_lgth_groups(markers, groups)
    3840
  • trunk/symbol_table/pablo/demo_strms.py

    r2174 r2185  
    2626
    2727    groups = div2_group_strms.Groups()
    28     groups.starts = markers.starts
    29     groups.follows = markers.follows
    30     div2_group_strms.Gen_lgth_groups(groups)
     28    div2_group_strms.Gen_lgth_groups(markers, groups)
    3129
    3230    print_aligned_streams([('Input Data', u8data),
     
    5553
    5654    groups = logbase2_group_strms.Groups()
    57     groups.starts = markers.starts
    58     groups.follows = markers.follows
    59     logbase2_group_strms.Gen_lgth_groups(groups)
     55    logbase2_group_strms.Gen_lgth_groups(markers, groups)
    6056
    6157    print_aligned_streams([('Input Data', u8data),
     
    8177
    8278    groups = div2_logbase2_group_strms.Groups()
    83     groups.starts = markers.starts
    84     groups.follows = markers.follows
    85     div2_logbase2_group_strms.Gen_lgth_groups(groups)
     79    div2_logbase2_group_strms.Gen_lgth_groups(markers, groups)
    8680
    8781    print_aligned_streams([('Input Data', u8data),
     
    107101
    108102    groups = bit_byte_group_strms.Groups()
    109     groups.starts = markers.starts
    110     groups.follows = markers.follows
    111     bit_byte_group_strms.Gen_lgth_groups(groups)
     103    bit_byte_group_strms.Gen_lgth_groups(markers, groups)
    112104
    113105    print_aligned_streams([('Input Data', u8data),
     
    142134    # Demo_div2(u8data, basis_bits)
    143135    # Demo_logbase2(u8data, basis_bits)
    144     # Demo_div2_logbase2(u8data, basis_bits)
    145     Demo_bit_byte(u8data, basis_bits)
     136    Demo_div2_logbase2(u8data, basis_bits)
     137    # Demo_bit_byte(u8data, basis_bits)
    146138
  • trunk/symbol_table/pablo/div2_group_strms.py

    r2174 r2185  
    1515        follows_0 = 0
    1616
    17 def Gen_lgth_groups(groups):
     17def Gen_lgth_groups(markers, groups):
     18
     19        groups.starts = markers.starts
     20        groups.follows = markers.follows
    1821
    1922        ### Div2 Strategy ###
     
    5861        groups.follows_0 = follows_gt_16
    5962
    60 def Main(groups):
    61         Gen_lgth_groups(groups)
     63def Main(markers, groups):
     64        Gen_lgth_groups(markers, groups)
  • trunk/symbol_table/pablo/div2_logbase2_group_strms.py

    r2174 r2185  
    1111        follows_0 = 0
    1212
    13 def Gen_lgth_groups(groups):
     13def Gen_lgth_groups(markers, groups):
     14
     15        groups.starts = markers.starts
     16        groups.follows = markers.follows
    1417
    1518        ### Div2 Strategy ###
     
    5356        groups.follows_0 = follows_gt_16
    5457
    55 def Main(groups):
    56         Gen_lgth_groups(groups)
     58def Main(markers, groups):
     59        Gen_lgth_groups(markers, groups)
  • trunk/symbol_table/pablo/id_group_strms.py

    r2174 r2185  
    2323        follows_0 = 0
    2424
    25 def Gen_lgth_groups(groups):
     25def Gen_lgth_groups(markers, groups):
     26
     27        groups.starts = markers.starts
     28        groups.follows = markers.follows
    2629
    2730        cursor = groups.starts
     
    111114        groups.follows_0 = temp
    112115
    113 def Main(groups):
    114         Gen_lgth_groups(groups)
     116def Main(markers, groups):
     117        Gen_lgth_groups(markers, groups)
    115118
  • trunk/symbol_table/pablo/logbase2_group_strms.py

    r2174 r2185  
    1111        follows_0 = 0
    1212
    13 def Gen_lgth_groups(groups):
     13def Gen_lgth_groups(markers, groups):
    1414
    15     starts = groups.starts
    16     remaining_follows = groups.follows
     15                groups.starts = markers.starts
     16                groups.follows = markers.follows
    1717
    18     # Group symbols of length 1
    19     starts_1 = pablo.Advance(starts)
    20     groups.follows_1 = starts_1 & remaining_follows
    21     remaining_follows = remaining_follows & ~groups.follows_1
     18                starts = groups.starts
     19                remaining_follows = groups.follows
    2220
    23     # Group symbols of length 2
    24     starts_2 = pablo.Advance(starts_1)
    25     groups.follows_2 = starts_2 & remaining_follows
    26     remaining_follows = remaining_follows & ~groups.follows_2
     21                # Group symbols of length 1
     22                starts_1 = pablo.Advance(starts)
     23                groups.follows_1 = starts_1 & remaining_follows
     24                remaining_follows = remaining_follows & ~groups.follows_1
    2725
    28     # Group symbols of length 3 to 4
    29     temp = starts_1 | starts_2
    30     temp32 = pablo.Advance32(temp)
    31     #starts_3_to_4 = pablo.Advance(pablo.Advance(temp))
    32     starts_3_to_4 = interpose32 (temp, temp32, 2)
    33     groups.follows_4 = starts_3_to_4 & remaining_follows
    34     remaining_follows = remaining_follows & ~groups.follows_4
     26                # Group symbols of length 2
     27                starts_2 = pablo.Advance(starts_1)
     28                groups.follows_2 = starts_2 & remaining_follows
     29                remaining_follows = remaining_follows & ~groups.follows_2
    3530
    36     # Group symbols of length 5 to 8
    37     temp = temp | starts_3_to_4
    38     temp32 = pablo.Advance32(temp)
    39     #starts_5_to_8 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp))))
    40     starts_5_to_8 = interpose32 (temp, temp32, 4)
    41     groups.follows_8 = starts_5_to_8 & remaining_follows
    42     remaining_follows = remaining_follows & ~groups.follows_8
     31                # Group symbols of length 3 to 4
     32                temp = starts_1 | starts_2
     33                temp32 = pablo.Advance32(temp)
     34                #starts_3_to_4 = pablo.Advance(pablo.Advance(temp))
     35                starts_3_to_4 = interpose32 (temp, temp32, 2)
     36                groups.follows_4 = starts_3_to_4 & remaining_follows
     37                remaining_follows = remaining_follows & ~groups.follows_4
    4338
    44     # Group symbols of length 9 to 16
    45     temp = temp | starts_5_to_8
    46     temp32 = pablo.Advance32 (temp)
    47     #starts_9_16 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp))))))))
    48     starts_9_16 = interpose32 (temp, temp32, 8)
    49     groups.follows_16 = starts_9_16 & remaining_follows
    50     remaining_follows = remaining_follows & ~groups.follows_16
     39                # Group symbols of length 5 to 8
     40                temp = temp | starts_3_to_4
     41                temp32 = pablo.Advance32(temp)
     42                #starts_5_to_8 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp))))
     43                starts_5_to_8 = interpose32 (temp, temp32, 4)
     44                groups.follows_8 = starts_5_to_8 & remaining_follows
     45                remaining_follows = remaining_follows & ~groups.follows_8
    5146
    52     # Group symbols of length 17 and longer
    53     groups.follows_0 = remaining_follows
     47                # Group symbols of length 9 to 16
     48                temp = temp | starts_5_to_8
     49                temp32 = pablo.Advance32 (temp)
     50                #starts_9_16 = pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(pablo.Advance(temp))))))))
     51                starts_9_16 = interpose32 (temp, temp32, 8)
     52                groups.follows_16 = starts_9_16 & remaining_follows
     53                remaining_follows = remaining_follows & ~groups.follows_16
    5454
    55 def Main(groups):
    56         Gen_lgth_groups(groups)
     55                # Group symbols of length 17 and longer
     56                groups.follows_0 = remaining_follows
     57
     58def Main(markers, groups):
     59                Gen_lgth_groups(markers, groups)
  • trunk/symbol_table/templates/group_strms_template.hpp

    r2182 r2185  
    1111
    1212static IDISA_ALWAYS_INLINE void identity_group_do_block(Markers & markers, Groups & groups) {
    13         groups.starts = markers.starts;
    14         groups.follows = markers.follows;
     13        // groups.starts = markers.starts;
     14        // groups.follows = markers.follows;
    1515        // GENERATED
    1616        @group_strms_block_stmts
     
    1818
    1919static IDISA_ALWAYS_INLINE void identity_group_do_final_block(Markers & markers, Groups & groups, BitBlock & EOF_mask) {
    20         groups.starts = markers.starts;
    21         groups.follows = markers.follows;
     20        // groups.starts = markers.starts;
     21        // groups.follows = markers.follows;
    2222        // GENERATED
    2323        @group_strms_final_block_stmts
Note: See TracChangeset for help on using the changeset viewer.