Ignore:
Timestamp:
Aug 26, 2011, 11:42:51 AM (8 years ago)
Author:
vla24
Message:

Symbol Table: Implemented division by 2 grouping strategy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/SymbolTable/parabix2_symtab_pbs_div.py

    r1232 r1387  
    102102        HexRef_ends = 0
    103103
     104class Hash_data():
     105        Hash_value = 0
     106
    104107class Tag_Callouts():
    105108        ElemName_starts = 0
    106109        ElemName_ends = 0
    107         ElemName_ends_1 = 0
    108         ElemName_ends_2 = 0
    109         ElemName_ends_3 = 0
    110         ElemName_ends_4 = 0
    111         ElemName_ends_5 = 0
    112         ElemName_ends_6 = 0
    113         ElemName_ends_7 = 0
    114         ElemName_ends_8 = 0
    115         ElemName_ends_9 = 0
    116         ElemName_ends_10 = 0
    117         ElemName_ends_11 = 0
    118         ElemName_ends_12 = 0
    119         ElemName_ends_13 = 0
    120         ElemName_ends_14 = 0
    121         ElemName_ends_15 = 0
    122         ElemName_ends_16 = 0
    123         ElemName_ends_17_and_longer = 0
     110        ElemName_ends_1_to_2 = 0
     111        ElemName_ends_3_to_4 = 0
     112        ElemName_ends_5_to_6 = 0
     113        ElemName_ends_7_to_8 = 0
     114        ElemName_ends_9_to_10 = 0
     115        ElemName_ends_11_to_12 = 0
     116        ElemName_ends_13_to_14 = 0
     117        ElemName_ends_15_to_16 = 0
     118        ElemName_remaining_ends = 0
    124119        AttName_starts = 0
    125120        AttName_ends = 0
     
    568563def Form_Length_Group_Bitstreams(tag_Callouts):
    569564
    570     remaining_starts = tag_Callouts.ElemName_starts
    571     remaining_ends = tag_Callouts.ElemName_ends
    572     temp = tag_Callouts.ElemName_starts
    573     temp32 = bitutil.Advance32(temp)
    574 
    575     # Group symbols of length 1
    576     tag_Callouts.ElemName_ends_1 = interpose32(temp, temp32, 1) & remaining_ends
    577     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_1
    578 
    579     # Group symbols of length 2
    580     tag_Callouts.ElemName_ends_2 = interpose32(temp, temp32, 2) & remaining_ends
    581     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_2
    582 
    583     # Group symbols of length 3
    584     tag_Callouts.ElemName_ends_3 = interpose32(temp, temp32, 3) & remaining_ends
    585     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_3
    586 
    587     # Group symbols of length 4
    588     tag_Callouts.ElemName_ends_4 = interpose32(temp, temp32, 4) & remaining_ends
    589     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_4
    590 
    591     # Group symbols of length 5
    592     tag_Callouts.ElemName_ends_5 = interpose32(temp, temp32, 5) & remaining_ends
    593     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_5
    594 
    595     # Group symbols of length 6
    596     tag_Callouts.ElemName_ends_6 = interpose32(temp, temp32, 6) & remaining_ends
    597     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_6
    598 
    599     # Group symbols of length 7
    600     tag_Callouts.ElemName_ends_7 = interpose32(temp, temp32, 7) & remaining_ends
    601     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_7
    602 
    603     # Group symbols of length 8
    604     tag_Callouts.ElemName_ends_8 = interpose32(temp, temp32, 8) & remaining_ends
    605     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_8
    606 
    607     # Group symbols of length 9
    608     tag_Callouts.ElemName_ends_9 = interpose32(temp, temp32, 9) & remaining_ends
    609     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_9
    610 
    611     # Group symbols of length 10
    612     tag_Callouts.ElemName_ends_10 = interpose32(temp, temp32, 10) & remaining_ends
    613     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_10
    614 
    615     # Group symbols of length 11
    616     tag_Callouts.ElemName_ends_11 = interpose32(temp, temp32, 11) & remaining_ends
    617     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_11
    618 
    619     # Group symbols of length 12
    620     tag_Callouts.ElemName_ends_12 = interpose32(temp, temp32, 12) & remaining_ends
    621     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_12
    622 
    623     # Group symbols of length 13
    624     tag_Callouts.ElemName_ends_13 = interpose32(temp, temp32, 13) & remaining_ends
    625     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_13
    626 
    627     # Group symbols of length 14
    628     tag_Callouts.ElemName_ends_14 = interpose32(temp, temp32, 14) & remaining_ends
    629     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_14
    630 
    631     # Group symbols of length 15
    632     temp15 = interpose32(temp, temp32, 15)
    633     tag_Callouts.ElemName_ends_15 = temp15 & remaining_ends
    634     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_15
    635 
    636     # Group symbols of length 16
    637     temp = bitutil.Advance(temp15)
    638     tag_Callouts.ElemName_ends_16 = temp & remaining_ends
    639     remaining_ends = remaining_ends & ~tag_Callouts.ElemName_ends_16
     565    starts = tag_Callouts.ElemName_starts
     566    ends = tag_Callouts.ElemName_ends
     567
     568    temp = ends | bitutil.Advance(ends)
     569
     570    # Group symbols of length 1 and 2
     571    start_2 = bitutil.Advance(bitutil.Advance(starts))
     572    tag_Callouts.ElemName_ends_1_to_2 =  start_2 & temp
     573
     574    # Group symbols of length 3 and 4
     575    start_4 = bitutil.Advance(bitutil.Advance(start_2 & ~temp))
     576    tag_Callouts.ElemName_ends_3_to_4 =  start_4 & temp
     577
     578    # Group symbols of length 5 and 6
     579    start_6 = bitutil.Advance(bitutil.Advance(start_4 & ~temp))
     580    tag_Callouts.ElemName_ends_5_to_6 =  start_6 & temp
     581
     582    # Group symbols of length 7 and 8
     583    start_8 = bitutil.Advance(bitutil.Advance(start_6 & ~temp))
     584    tag_Callouts.ElemName_ends_7_to_8 =  start_8 & temp
     585
     586    # Group symbols of length 9 and 10
     587    start_10 = bitutil.Advance(bitutil.Advance(start_8 & ~temp))
     588    tag_Callouts.ElemName_ends_9_to_10 =  start_10 & temp
     589
     590    # Group symbols of length 11 and 12
     591    start_12 = bitutil.Advance(bitutil.Advance(start_10 & ~temp))
     592    tag_Callouts.ElemName_ends_11_to_12 =  start_12 & temp
     593
     594    # Group symbols of length 13 and 14
     595    start_14 = bitutil.Advance(bitutil.Advance(start_12 & ~temp))
     596    tag_Callouts.ElemName_ends_13_to_14 =  start_14 & temp
     597
     598    # Group symbols of length 15 and 16
     599    start_16 = bitutil.Advance(bitutil.Advance(start_14 & ~temp))
     600    tag_Callouts.ElemName_ends_15_to_16 =  start_16 & temp
    640601
    641602    # Group symbols of length 17 and longer
    642     tag_Callouts.ElemName_ends_17_and_longer = remaining_ends
     603    tag_Callouts.ElemName_remaining_ends = start_16 & ~tag_Callouts.ElemName_ends_15_to_16
    643604
    644605
Note: See TracChangeset for help on using the changeset viewer.