Changeset 1624


Ignore:
Timestamp:
Nov 1, 2011, 5:43:26 AM (8 years ago)
Author:
cameron
Message:

New bitblock iterators replace StreamScan?

Location:
proto/parabix2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • proto/parabix2/pablo_template.cpp

    r1614 r1624  
    88CarryArray<count> name;\
    99
    10 typedef long ScanBlock;
    1110#include "../lib/carryQ.hpp"
    1211#include "../lib/bitstream_iterator.hpp"
     
    5150BitBlock EOF_mask = simd<1>::constant<1>();
    5251
    53 /* StreamScan & Post Process Declarations */
    54 //      static inline int StreamScanToFirst(ScanBlock * stream, int blk_count, int ProcessPos(int), int * error_pos_in_block)
    55 static inline int StreamScan(ScanBlock * stream, int blk_count, int ProcessPos(int), int * error_pos_in_block);
    5652
    5753static inline int NameStrt_check(int pos);
     
    138134}
    139135
    140 
    141 /* StreamScan & Post Process Definitions */
    142 static inline int StreamScan(ScanBlock * stream, int blk_count, int ProcessPos(int), int * error_pos_in_block) {
    143 
    144         int blk;
    145         int block_pos = 0;
    146         int pos;
    147 
    148         for (blk = 0; blk < blk_count; blk++) {
    149                 ScanBlock s = stream[blk];
    150                 while(s) {
    151                         pos = (cfzl(s) + block_pos);
    152                         int code = (ProcessPos(pos));
    153                         if (code) {
    154                                 *error_pos_in_block = pos;
    155                                 return code; // error code
    156                         }
    157                         s = s & (s-1);  // clear rightmost bit.
    158                 }
    159                 block_pos += 8 * sizeof(ScanBlock);
    160         }
    161         return 0;
    162 }
    163136
    164137static inline int NameStrt_check(int pos) {
  • proto/parabix2/src/TagMatcher.hpp

    r1615 r1624  
    1111
    1212
     13typedef unsigned long ScanBlock;
    1314#define MAX_DEPTH 100
    1415#define MAX_ATTS 100
Note: See TracChangeset for help on using the changeset viewer.