Changeset 3139 for proto/parabix2


Ignore:
Timestamp:
May 14, 2013, 4:35:53 PM (6 years ago)
Author:
cameron
Message:

Replace BitBlockForwardIterator? with BitBlockForwardScanner?

File:
1 edited

Legend:

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

    r3092 r3139  
    1717static inline int AttRef_check(char * source, int pos);
    1818
    19 static inline void validate_block(BitBlockForwardIterator & start, char * source, int block_base, int is_valid(char*, int), LineColTracker & tracker);
    20 static inline void validate_block(BitBlockForwardIterator & start, char * source, int block_base, int is_valid(char*, int,int), LineColTracker & tracker);
     19static inline void validate_block(BitBlockForwardScanner & start, char * source, int block_base, int is_valid(char*, int), LineColTracker & tracker);
     20static inline void validate_block(BitBlockForwardScanner & start, char * source, int block_base, int is_valid(char*, int,int), LineColTracker & tracker);
    2121
    2222static inline void postprocess_do_block(Lex & lex, CtCDPI_Callouts & ctCDPI_Callouts, Ref_Callouts & ref_Callouts, Check_streams & check_streams,
     
    128128}
    129129
    130 static inline void validate_block(BitBlockForwardIterator & start, char * source, int block_base, int is_valid(char *, int), LineColTracker & tracker) {
     130static inline void validate_block(BitBlockForwardScanner & s, char * source, int block_base, int is_valid(char *, int), LineColTracker & tracker) {
    131131
    132132    int pos, block_pos;
    133     BitBlockForwardIterator end;
    134     while(start != end) {
    135 
    136         block_pos = block_base + *start;
     133    s.scan_to_next();
     134    while(!s.is_done()) {
     135
     136        block_pos = block_base + s.get_pos();
    137137        int rv = is_valid(source, block_pos);
    138138
     
    143143            exit(-1);
    144144        }
    145         start++;
    146     }
    147 }
    148 
    149 static inline void validate_block(BitBlockForwardIterator & start, char * source, int block_base, int buffer_base, int is_valid(char *, int, int), LineColTracker & tracker) {
     145        s.scan_to_next();
     146    }
     147}
     148
     149static inline void validate_block(BitBlockForwardScanner & 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     BitBlockForwardIterator end;
    153     while(start != end) {
    154 
    155         block_pos = block_base + *start;
     152    s.scan_to_next();
     153    while(!s.is_done()) {
     154
     155        block_pos = block_base + s.get_pos();
    156156        file_pos = block_pos+buffer_base;
    157157
     
    165165            exit(-1);
    166166        }
    167         start++;
     167        s.scan_to_next();
    168168    }
    169169}
     
    173173                                        char * source, int buffer_base, int block_base, int chars_avail,
    174174                                        LineColTracker & tracker ) {
    175     BitBlockForwardIterator iter;
     175    BitBlockForwardScanner iter;
    176176
    177177    if (bitblock::any(simd_or(check_streams.non_ascii_name_starts, check_streams.non_ascii_names))) {
Note: See TracChangeset for help on using the changeset viewer.