 Timestamp:
 Nov 22, 2017, 12:33:07 PM (16 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

icGREP/icgrepdevel/icgrep/cc/multiplex_CCs.cpp
r5727 r5741 12 12 // Breakpoints of a set of character classes (CCs): each codepoint c such that 13 13 // there is some CC in CCs such that either (a) c is in the CC and c1 is not, or 14 // (b) c1 is in the CC and c is not. 14 // (b) c1 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. 15 17 // 16 18 // The breakpoints may be determined by iterating through the interval … … 67 69 68 70 unsigned range_lo = 0; 69 unsigned cur_index = 1;71 unsigned next_set_index = 1; 70 72 for (auto & bkpt_entry : breakpoints) { 71 73 if (current_exclusive_set_idx > 0) { // We have a range entry to close for a pending exclusive set. … … 79 81 // Start a new range. 80 82 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 82 84 current_set ^= bkpt_entry.second; 83 85 auto idx_iter = CC_set_to_exclusive_set_map.find(current_set); … … 85 87 // New exclusive class; assign the next sequential integer. 86 88 //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++; 89 91 CC_set_to_exclusive_set_map.emplace(current_set, current_exclusive_set_idx); 90 92 … … 101 103 } 102 104 } 103 assert (current_exclusive_set_idx == 0 && "Breakpoint for final interval not found.");104 105 }
Note: See TracChangeset
for help on using the changeset viewer.