... | ... | @@ -124,19 +124,19 @@ LineStarts can then be identified as the positions immediately after a line brea |
|
|
or at the beginning of the file. These are computed by the `LineStartsKernel`.
|
|
|
|
|
|
```
|
|
|
StreamSet * LineStarts = E->CreateStreamSet(1, 1);
|
|
|
StreamSet * LineStarts = P->CreateStreamSet(1, 1);
|
|
|
P->CreateKernelCall<LineStartsKernel>(mLineBreakStream, LineStarts);
|
|
|
```
|
|
|
|
|
|
The starts of the matched lines are now computed by a ```SpreadByMask```.
|
|
|
```
|
|
|
StreamSet * MatchedLineStarts = E->CreateStreamSet(1, 1);
|
|
|
SpreadByMask(E, LineStarts, MatchesByLine, MatchedLineStarts);
|
|
|
StreamSet * MatchedLineStarts = P->CreateStreamSet(1, 1);
|
|
|
SpreadByMask(P, LineStarts, MatchesByLine, MatchedLineStarts);
|
|
|
```
|
|
|
|
|
|
Now a mask for an entire matched row can be computed, using the LineSpansKernel.
|
|
|
```
|
|
|
StreamSet * MatchedLineSpans = E->CreateStreamSet(1, 1);
|
|
|
StreamSet * MatchedLineSpans = P->CreateStreamSet(1, 1);
|
|
|
P->CreateKernelCall<LineSpansKernel>(MatchedLineStarts, MatchedLineEnds, MatchedLineSpans);
|
|
|
```
|
|
|
|
... | ... | |