Changeset 3190


Ignore:
Timestamp:
May 26, 2013, 11:22:58 AM (6 years ago)
Author:
cameron
Message:

Update to use new BitBlockScanner?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/util/post_process.hpp

    r3139 r3190  
    1717static inline int AttRef_check(char * source, int pos);
    1818
    19 static inline void validate_block(BitBlockForwardScanner & start, char * source, int block_base, int is_valid(char*, int), LineColTracker & tracker);
    20 static inline void validate_block(BitBlockForwardScanner & start, char * source, int block_base, int is_valid(char*, int,int), LineColTracker & tracker);
     19
     20
     21static inline void validate_block(BitBlockScanner<BitBlock, ScanWord> & start, char * source, int block_base, int is_valid(char*, int), LineColTracker & tracker);
     22static inline void validate_block(BitBlockScanner<BitBlock, ScanWord> & start, char * source, int block_base, int is_valid(char*, int,int), LineColTracker & tracker);
    2123
    2224static inline void postprocess_do_block(Lex & lex, CtCDPI_Callouts & ctCDPI_Callouts, Ref_Callouts & ref_Callouts, Check_streams & check_streams,
     
    128130}
    129131
    130 static inline void validate_block(BitBlockForwardScanner & s, char * source, int block_base, int is_valid(char *, int), LineColTracker & tracker) {
     132static inline void validate_block(BitBlockScanner<BitBlock, ScanWord> &s, char * source, int block_base, int is_valid(char *, int), LineColTracker & tracker) {
    131133
    132134    int pos, block_pos;
    133     s.scan_to_next();
    134     while(!s.is_done()) {
    135 
    136         block_pos = block_base + s.get_pos();
     135    while(s.has_next()) {
     136
     137        block_pos = block_base + s.scan_to_next();
    137138        int rv = is_valid(source, block_pos);
    138139
     
    143144            exit(-1);
    144145        }
    145         s.scan_to_next();
    146     }
    147 }
    148 
    149 static inline void validate_block(BitBlockForwardScanner & s, char * source, int block_base, int buffer_base, int is_valid(char *, int, int), LineColTracker & tracker) {
     146    }
     147}
     148
     149static inline void validate_block(BitBlockScanner<BitBlock, ScanWord>  &s, char * source, int block_base, int buffer_base, int is_valid(char *, int, int), LineColTracker & tracker) {
    150150
    151151    int pos, block_pos, file_pos;
    152     s.scan_to_next();
    153     while(!s.is_done()) {
    154 
    155         block_pos = block_base + s.get_pos();
     152    while(s.has_next()) {
     153
     154        block_pos = block_base + s.scan_to_next();
    156155        file_pos = block_pos+buffer_base;
    157156
     
    165164            exit(-1);
    166165        }
    167         s.scan_to_next();
    168166    }
    169167}
     
    173171                                        char * source, int buffer_base, int block_base, int chars_avail,
    174172                                        LineColTracker & tracker ) {
    175     BitBlockForwardScanner iter;
    176 
     173
     174    BitBlockScanner<BitBlock, ScanWord> iter;
    177175    if (bitblock::any(simd_or(check_streams.non_ascii_name_starts, check_streams.non_ascii_names))) {
    178176            iter.init(&check_streams.non_ascii_name_starts);
Note: See TracChangeset for help on using the changeset viewer.