Changeset 2096


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

Renamed log2 logbase2

Location:
trunk/symbol_table
Files:
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/symbol_table/Makefile

    r2092 r2096  
    2828ID_GROUP_STRMS = id_group_strms.py
    2929DIV2_GROUP_STRMS = div2_group_strms.py
    30 LOG2_GROUP_STRMS = log2_group_strms.py
     30LOGBASE2_GROUP_STRMS = logbase2_group_strms.py
    3131
    3232GROUP_PREFIX=@group_strms_
     
    6060        python $(PABLO_COMPILER) $(DIV2_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG)
    6161
    62 logbase2_group: log2_group_strms.py group_strms_template.hpp main_template.cpp
    63         python $(PABLO_COMPILER) $(LOG2_GROUP_STRMS) -t $(GROUP_TEMPLATE) -l $(GROUP_PREFIX) -o $(GROUP_OUTFILE) $(PABLO_ADD_DEBUG)
    64         python $(PABLO_COMPILER) $(LOG2_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG)
     62logbase2_group: logbase2_group_strms.py group_strms_template.hpp main_template.cpp
     63        python $(PABLO_COMPILER) $(LOGBASE2_GROUP_STRMS) -t $(GROUP_TEMPLATE) -l $(GROUP_PREFIX) -o $(GROUP_OUTFILE) $(PABLO_ADD_DEBUG)
     64        python $(PABLO_COMPILER) $(LOGBASE2_GROUP_STRMS) -t $(MAIN_TEMPLATE) -l $(GROUP_PREFIX) -o $(MAIN_OUTFILE) $(PABLO_ADD_DEBUG)
    6565
    6666clean:
  • trunk/symbol_table/demo_strms.py

    r2065 r2096  
    22import marker_strms
    33import div2_group_strms
    4 import log2_group_strms
     4import logbase2_group_strms
    55import sys
    66
     
    4444        ('groups.ends_gte_17', bitstream2string(groups.ends_gte_17, lgth))])
    4545
    46 def Demo_log2(u8data, basis_bits):
     46def Demo_logbase2(u8data, basis_bits):
    4747
    4848    lgth = len(u8data)
     
    5252    marker_strms.Generate_markers(markers)
    5353
    54     groups = log2_group_strms.Groups()
     54    groups = logbase2_group_strms.Groups()
    5555    groups.starts = markers.starts
    5656    groups.ends = markers.ends
    57     log2_group_strms.Gen_lgth_groups(groups)
     57    logbase2_group_strms.Gen_lgth_groups(groups)
    5858
    5959    print_aligned_streams([('Input Data', u8data),
     
    6666        ('groups.ends_2', bitstream2string(groups.ends_2, lgth)),
    6767        ('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))])
     71
     72def Demo_div2_logbase2(u8data, basis_bits):
     73
     74    lgth = len(u8data)
     75
     76    markers = marker_strms.Markers()
     77    marker_strms.Classify_markers(basis_bits, markers)
     78    marker_strms.Generate_markers(markers)
     79
     80    groups = div2_logbase2_group_strms.Groups()
     81    groups.starts = markers.starts
     82    groups.ends = markers.ends
     83    div2_logbase2_group_strms.Gen_lgth_groups(groups)
     84
     85    print_aligned_streams([('Input Data', u8data),
     86        ('markers.spans', bitstream2string(markers.spans, lgth)),
     87        ('markers.starts', bitstream2string(markers.starts, lgth)),
     88        ('markers.ends', bitstream2string(markers.ends, lgth)),
     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)),
    6894        ('groups.ends_8', bitstream2string(groups.ends_8, lgth)),
    6995        ('groups.ends_16', bitstream2string(groups.ends_16, lgth)),
     
    91117
    92118    # Demo_div2(u8data, basis_bits)
    93     Demo_log2(u8data, basis_bits)
     119    Demo_logbase2(u8data, basis_bits)
    94120
  • trunk/symbol_table/symbol_table.pro

    r2095 r2096  
    5050    bitutil.py \
    5151    pablo.py \
    52     log2_group_strms.py \
    5352    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 \
    5453    test/run_tests.py \
    5554    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
     55    test/gen_test_file.py \
     56    logbase2_group_strms.py
    5757HEADERS += marker_strms_template.hpp \
    5858    marker_strms.hpp \
Note: See TracChangeset for help on using the changeset viewer.