Changeset 2569 for proto/PDF


Ignore:
Timestamp:
Oct 26, 2012, 4:35:15 PM (6 years ago)
Author:
ksherdy
Message:

Updated compilable.

Location:
proto/PDF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/PDF/pablo_template_pdf.cpp

    r2568 r2569  
    5555// Buffer Management
    5656//////////////////////////////////////////////////////////////////////////////////////////
    57 #define PADDING_BLOCKS 0
     57#define PADDING_BLOCKS 1
    5858#define PADDING_SIZE (BLOCK_SIZE * PADDING_BLOCKS)
    5959#define COPYBACK_BLOCKS 0
     
    6161#define LOOKAHEAD_BLOCKS 1
    6262#define LOOKAHEAD_SIZE (BLOCK_SIZE * LOOKAHEAD_BLOCKS)
    63 #define SEGMENT_BLOCKS  1
     63#define SEGMENT_BLOCKS  4
    6464#define SEGMENT_SIZE (BLOCK_SIZE * SEGMENT_BLOCKS)
    6565#define BUFFER_SIZE (COPYBACK_SIZE + SEGMENT_SIZE + LOOKAHEAD_SIZE + PADDING_SIZE)
     
    152152        chars_read = fread((void *)src_buffer, 1, SEGMENT_SIZE + LOOKAHEAD_SIZE, infile);
    153153        remaining = chars_read;
    154         chars_avail = chars_read;
    155 
    156         //////////////////////////////////////////////////////////////////////////////////////////
    157         // Read OVERLAP bytes to support post processing validation lookahead.
    158         //
    159         // For example, true, false, null marked that overlap end of the segment.
    160         //
    161         //////////////////////////////////////////////////////////////////////////////////////////
    162        
     154        chars_avail = chars_read;       
    163155        padding_read = chars_read - SEGMENT_SIZE;
    164 
    165         cout << "padding_read: " << padding_read << endl;
    166        
    167 
    168 //      remaining += padding_read;
    169 //      chars_avail += padding_read;
    170156
    171157        if (chars_avail >= SEGMENT_SIZE) chars_avail = SEGMENT_SIZE;
     
    183169
    184170                        #ifdef PDF_DEBUG
    185                         //cout << endl << "SEGMENTS" << endl;
    186171                        for (int i = 0; i < BLOCK_SIZE; i++) {
    187172                                cout << src_buffer[block_base + i];
     
    225210       
    226211                        #ifdef PDF_DEBUG
    227                         //cout << endl << "FULL BLOCK" << endl;
    228212                        for(int i = 0; i < BLOCK_SIZE; i++) {
    229213                                cout << src_buffer[block_base + i];
  • proto/PDF/pdf.py

    r2568 r2569  
    11import sys
    22import pablo
    3 
    43
    54class Basis_bits():     
     
    166165
    167166
    168 def simd_const_4(hexdigit, EOF_mask):
    169         lgth = pablo.count_leading_zeroes(~EOF_mask)/4
    170         return int(hexdigit*(lgth+1),16)&EOF_mask
     167#def simd_const_4(hexdigit, EOF_mask):
     168#       lgth = pablo.count_leading_zeroes(~EOF_mask)/4
     169#       return int(hexdigit*(lgth+1),16)&EOF_mask
    171170
    172171
    173172def Parse_Escaped(lex, escaped_Callouts):
    174173
    175         odd = simd_const_4('a',pablo.EOF_mask) 
    176         even = simd_const_4('5',pablo.EOF_mask)
     174  #odd = simd_const_4('a',pablo.EOF_mask) 
     175        #even = simd_const_4('5',pablo.EOF_mask)
    177176
    178177        start = lex.Backslash &~ pablo.Advance(lex.Backslash)
     
    188187        escaped_Callouts.UELParen = lex.LParen &~ escape
    189188        escaped_Callouts.UERParen = lex.RParen &~ escape
    190 
    191 def inc() :
    192         global depth
    193         depth+=1
    194 
    195 def dec() :
    196         global depth
    197         depth-=1
    198 
    199 def lt_zero() :
    200         global depth
    201         return depth < 0
    202 
    203 def gt_zero() :
    204         global depth
    205         return depth > 0
    206 
    207 def is_zero() :
    208         global depth
    209         return depth==0
    210189               
    211190# Parallel version
Note: See TracChangeset for help on using the changeset viewer.