... | @@ -13,3 +13,18 @@ ND BixNum[2] .................11............. |
... | @@ -13,3 +13,18 @@ ND BixNum[2] .................11............. |
|
ND BixNum[1] ......111..111111..111111.......
|
|
ND BixNum[1] ......111..111111..111111.......
|
|
ND BixNum[0] ...111...11....11..111...1111...
|
|
ND BixNum[0] ...111...11....11..111...1111...
|
|
```
|
|
```
|
|
|
|
|
|
|
|
# NestingDepth Kernel
|
|
|
|
|
|
|
|
The NestingDepth kernel is a Parabix kernel (to be implemented) that can compute the nesting
|
|
|
|
depth of characters in an input stream, given two character class bit streams
|
|
|
|
`L` identifying all the left or opening delimiters and `R` identifying all the right or closing delimiters. For our example bracket stream above, `L` and `R` are shown below.
|
|
|
|
|
|
|
|
```
|
|
|
|
Bracket Stream ...[..{.}..{...[.[]..]..}...]...
|
|
|
|
L ...1..1....1...1.1..............
|
|
|
|
R ........1.........1..1..1...1...
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
The NestingDepth Kernel also takes a parameter 'MaxDepth` identifying the maximum nesting depth expected for an input source. The number of bit streams in the NestingDepth BixNum must be equal to ceillog2(MaxDepth + 1). |