Changeset 5741 for icGREP/icgrep-devel


Ignore:
Timestamp:
Nov 22, 2017, 12:33:07 PM (18 months ago)
Author:
cameron
Message:

Remove bad assertion/add comments for multiplexing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/multiplex_CCs.cpp

    r5727 r5741  
    1212// Breakpoints of a set of character classes (CCs): each codepoint c such that
    1313// there is some CC in CCs such that either (a) c is in the CC and c-1 is not, or
    14 // (b) c-1 is in the CC and c is not.
     14// (b) c-1 is in the CC and c is not.  Boundary cases: if codepoint 0 is in
     15// some CC, then 0 is a breakpoint (codepoint -1 is not in any CC).  If codepoint
     16// 0x10FFFF is in some CC then 0x110000 is a breakpoint.
    1517//
    1618// The breakpoints may be determined by iterating through the interval
     
    6769   
    6870    unsigned range_lo = 0;
    69     unsigned cur_index = 1;
     71    unsigned next_set_index = 1;
    7072    for (auto & bkpt_entry : breakpoints) {
    7173        if (current_exclusive_set_idx > 0) {  // We have a range entry to close for a pending exclusive set.
     
    7981        // Start a new range.
    8082        range_lo = bkpt_entry.first;
    81         if (range_lo > UCD::UNICODE_MAX) continue;
     83        if (range_lo > UCD::UNICODE_MAX) continue; // Nothing to do for bkpt 0x110000
    8284        current_set ^= bkpt_entry.second;
    8385        auto idx_iter = CC_set_to_exclusive_set_map.find(current_set);
     
    8587            // New exclusive class; assign the next sequential integer.
    8688            //current_exclusive_set_idx = exclusiveSetIDs.size();
    87             current_exclusive_set_idx = cur_index;
    88             cur_index++;
     89            current_exclusive_set_idx = next_set_index;
     90            next_set_index++;
    8991            CC_set_to_exclusive_set_map.emplace(current_set, current_exclusive_set_idx);
    9092           
     
    101103        }
    102104    }
    103     assert (current_exclusive_set_idx == 0 && "Breakpoint for final interval not found.");
    104105}
Note: See TracChangeset for help on using the changeset viewer.