Changeset 1302 for docs/EuroPar2011


Ignore:
Timestamp:
Aug 8, 2011, 4:43:21 PM (8 years ago)
Author:
lindanl
Message:

Create a directory for HPCA

Location:
docs/EuroPar2011
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • docs/EuroPar2011/Demo/europar.py

    r1189 r1302  
    5858                              ('$M_0 + D$',  bitutil.bitstream2stringLE(temp, lgth, zero_ch)),
    5959                              ('$M_1 = (M_0 + D) \\wedge \\neg D$', bitutil.bitstream2stringLE(cursor2, lgth, zero_ch))])
     60
     61def latex_csv_parse(chardata):
     62        lgth = len(chardata)
     63        (bit, EOF_mask) = bitutil.transpose_streams(chardata)
     64        (u8, control, lex) = byteclass.classify_bytes(bit)
     65        p2 = lex.DQuote^(lex.DQuote<<1);
     66        p4 = p2^(p2<<2);
     67        p8 = p4^(p4<<4);
     68        p16 = p8^(p8<<8);
     69        p32 = p16^(p16<<16);
     70        p64 = p32^(p32<<32);
     71        quote_mask = p64^(p64<<64);
     72        return bitutil.latex_streams([('source', chardata[::-1]),
     73                                ('Quote', bitutil.bitstream2stringLE(lex.DQuote, lgth, zero_ch)),
     74                                ('LF', bitutil.bitstream2stringLE(control.LF, lgth, zero_ch)),
     75                                ('p2=DQuote^(DQuote<<1)', bitutil.bitstream2stringLE(p2, lgth, zero_ch)),
     76                                ('p4=p2^(p2<<2)', bitutil.bitstream2stringLE(p4, lgth, zero_ch)),
     77                                ('p8=p4^(p4<<4)', bitutil.bitstream2stringLE(p8, lgth, zero_ch)),
     78                                ('p16=p8^(p8<<8)', bitutil.bitstream2stringLE(p16, lgth, zero_ch)),
     79                                ('p32=p16^(p16<<16)', bitutil.bitstream2stringLE(p32, lgth, zero_ch)),
     80                                ('p64=p32^(p32<<32)', bitutil.bitstream2stringLE(p64, lgth, zero_ch)),
     81                                ('quote mask', bitutil.bitstream2stringLE(quote_mask, lgth, zero_ch)),
     82                                ('new line', bitutil.bitstream2stringLE(control.LF&~quote_mask, lgth, zero_ch))])
     83
    6084
    6185def europar1():
     
    471495
    472496if __name__ == "__main__":
    473         print demo_transpose_ascii('xmlwf')
    474 
     497        print latex_csv_parse('1996,"Jeep","Grand","SELL!\nair"\n')
     498
     499
     500
     501
     502
     503
     504
     505
     506
     507
     508
     509
     510
     511
     512
     513
     514
  • docs/EuroPar2011/europar-cameron.tex

    r1186 r1302  
    187187
    188188A bitstream is simply a sequence of $0$s and $1$s, where there is one such bit in the bitstream for each character in a source data stream.
    189 For parsing, and other text processing tasks, we need to consider multiple properties of characters at different stages during the parsing process. A bitstream can be associated with each of these properties, and hence there will be multiple (parallel) bitstreams associated with a source data stream of characters.
     189For parsing, and other text processing tasks, we need to consider multiple properties of characters at different stages during the parsing process.
     190A bitstream can be associated with each of these properties, and hence there will be multiple (parallel) bitstreams associated with a source data stream of characters.
    190191
    191192The starting point for bitstream methods are \emph{basis} bitstreams
Note: See TracChangeset for help on using the changeset viewer.