Special case of RuntimeRange for PortInstance.
More...
Inherits org.lflang.generator.RuntimeRange< PortInstance >.
Inherited by org.lflang.generator.SendRange.
|
| int | compareTo (RuntimeRange<?> o) |
| | Compare ranges by first comparing their start offset, and then, if these are equal, comparing their widths.
|
| RuntimeRange< T > | head (int newWidth) |
| | Return a new RuntimeRange that is identical to this range but with width reduced to the specified width.
|
| List< Integer > | instances () |
| | Return the list of natural identifiers for the runtime instances in this range.
|
| List< NamedInstance<?> > | iterationOrder () |
| | Return a list containing the instance for this range and all of its parents, not including the top level reactor, in the order in which their banks and multiport channels should be iterated.
|
| RuntimeRange<?> | overlap (RuntimeRange<?> range) |
| | Return a range that is the subset of this range that overlaps with the specified range or null if there is no overlap.
|
| boolean | overlaps (RuntimeRange<?> range) |
| | Return true if the specified range has the same instance as this range and the ranges overlap.
|
| Set< Integer > | parentInstances (int n) |
| | Return a set of identifiers for runtime instances of a parent of this RuntimeRange's instance n levels above this RuntimeRange's instance.
|
| ReactorInstance | parentReactor () |
| | Return the nearest containing ReactorInstance for this instance.
|
| List< Integer > | permutation () |
| | Return the permutation vector that indicates the order in which the digits of the permuted mixed-radix representations of indices in this range should be incremented.
|
| | Port (PortInstance instance) |
| | Port (PortInstance instance, int start, int width, Set< ReactorInstance > interleaved) |
| | Port (PortInstance instance, Set< ReactorInstance > interleaved) |
| List< Integer > | radixes () |
| | Return the radixes vector containing the width of this instance followed by the widths of its containers, not including the top level, which always has radix 1 and value 0.
|
| MixedRadixInt | startMR () |
| | Return the start as a new permuted mixed-radix number.
|
| RuntimeRange< T > | tail (int offset) |
| | Return a new range that represents the leftover elements starting at the specified offset relative to start.
|
| RuntimeRange< T > | toggleInterleaved (ReactorInstance reactor) |
| | Toggle the interleaved status of the specified reactor, which is assumed to be a parent of the instance of this range.
|
| String | toString () |
|
| final T | instance |
| | The instance that this is a range of.
|
| final int | maxWidth |
| | The maximum width of any range with this instance.
|
| final int | start |
| | The start offset of this range.
|
| final int | width |
| | The width of this range.
|
◆ Port() [1/3]
◆ Port() [2/3]
◆ Port() [3/3]
◆ compareTo()
Compare ranges by first comparing their start offset, and then, if these are equal, comparing their widths.
This comparison is meaningful only for ranges that have the same instances. Note that this can return 0 even if equals() does not return true.
- Parameters
-
| o | The range to compare to. |
◆ head()
Return a new RuntimeRange that is identical to this range but with width reduced to the specified width.
If the new width is greater than or equal to the width of this range, then return this range. If the newWidth is 0 or negative, return null.
- Parameters
-
◆ instances()
Return the list of natural identifiers for the runtime instances in this range.
Each returned identifier is an integer representation of the mixed-radix number [d0, ... , dn] with radices [w0, ... , wn], where d0 is the bank or channel index of this RuntimeRange's instance, which has width w0, and dn is the bank index of its topmost parent below the top-level (main) reactor, which has width wn. The depth of this RuntimeRange's instance, therefore, is n - 1. The order of the returned list is the order in which the runtime instances should be iterated.
◆ iterationOrder()
Return a list containing the instance for this range and all of its parents, not including the top level reactor, in the order in which their banks and multiport channels should be iterated.
For each depth at which the connection is interleaved, that parent will appear before this instance in depth order (shallower to deeper). For each depth at which the connection is not interleaved, that parent will appear after this instance in reverse depth order (deeper to shallower).
◆ overlap()
Return a range that is the subset of this range that overlaps with the specified range or null if there is no overlap.
◆ overlaps()
Return true if the specified range has the same instance as this range and the ranges overlap.
- Parameters
-
| range | The range to check for overlap. |
◆ parentInstances()
Return a set of identifiers for runtime instances of a parent of this RuntimeRange's instance n levels above this RuntimeRange's instance.
If n == 1, for example, then this return the identifiers for the parent ReactorInstance.
This returns a list of natural identifiers, as defined below, for the instances within the range.
The resulting list can be used to count the number of distinct runtime instances of this RuntimeRange's instance (using n == 0) or any of its parents that lie within the range and to provide an index into an array of runtime instances.
Each natural identifier is the integer value of a mixed-radix number defined as follows:
- The low-order digit is the index of the runtime instance of i within its container. If the
NamedInstance is a PortInstance, this will be the multiport channel or 0 if it is not a multiport. If the NamedInstance is a ReactorInstance, then it will be the bank index or 0 if the reactor is not a bank. The radix for this digit will be the multiport width or bank width or 1 if the NamedInstance is neither a multiport nor a bank.
- The next digit will be the bank index of the container of the specified
NamedInstance or 0 if it is not a bank.
- The remaining digits will be bank indices of containers up to but not including the top-level reactor (there is no point in including the top-level reactor because it is never a bank).
- Each index that is returned can be used as an index into an array of runtime instances that is assumed to be in a natural order.
- Parameters
-
| n | The number of levels up of the parent. This is required to be less than the depth of this RuntimeRange's instance or an exception will be thrown. |
◆ parentReactor()
◆ permutation()
Return the permutation vector that indicates the order in which the digits of the permuted mixed-radix representations of indices in this range should be incremented.
◆ radixes()
Return the radixes vector containing the width of this instance followed by the widths of its containers, not including the top level, which always has radix 1 and value 0.
◆ startMR()
Return the start as a new permuted mixed-radix number.
For any instance that is neither a multiport nor a bank, the corresponding digit will be 0.
◆ tail()
Return a new range that represents the leftover elements starting at the specified offset relative to start.
If start + offset is greater than or equal to the width, then this returns null. If this offset is 0 then this returns this range unmodified.
- Parameters
-
| offset | The number of elements to consume. |
◆ toggleInterleaved()
Toggle the interleaved status of the specified reactor, which is assumed to be a parent of the instance of this range.
If it was previously interleaved, make it not interleaved and vice versa. This returns a new RuntimeRange.
- Parameters
-
| reactor | The parent reactor at which to toggle interleaving. |
◆ toString()
◆ _interleaved
Record of which levels are interleaved.
◆ instance
The instance that this is a range of.
◆ maxWidth
The maximum width of any range with this instance.
◆ start
The start offset of this range.
◆ width
The documentation for this class was generated from the following file:
- /Users/runner/work/lingua-franca/lingua-franca/core/src/main/java/org/lflang/generator/RuntimeRange.java