pub struct StreamIr {
pub stmt: Stmt,
pub sr2memory: HashMap<StreamReference, Memory>,
pub wref2window: HashMap<WindowReference, Window>,
pub lref2lfreq: HashMap<LocalFreqRef, LocalFreq>,
pub livetime_equivalences: LivetimeEquivalences,
pub static_schedule: Option<StaticSchedule>,
pub triggers: HashMap<OutputReference, usize>,
pub accesses: HashMap<StreamReference, Accesses>,
pub accessed_by: HashMap<StreamReference, Accesses>,
}Expand description
The internal representation of the StreamIR.
Fields§
§stmt: StmtThe outermost statement of the StreamIR program.
sr2memory: HashMap<StreamReference, Memory>The memory representation of each stream.
wref2window: HashMap<WindowReference, Window>Information on windows in the specification.
lref2lfreq: HashMap<LocalFreqRef, LocalFreq>A mapping from references to information of local frequencies.
livetime_equivalences: LivetimeEquivalencesEquivalence classes for the livetime information of streams.
static_schedule: Option<StaticSchedule>The precomputed schedule for global periodic output streams
triggers: HashMap<OutputReference, usize>The mapping of all output references that represent triggers to the corresponding trigger reference
accesses: HashMap<StreamReference, Accesses>The collection of streams this stream accesses non-transitively. Includes this stream’s spawn, evaluation condition, and close expressions.
accessed_by: HashMap<StreamReference, Accesses>The collection of streams that access the current stream non-transitively
Implementations§
Source§impl StreamIr
impl StreamIr
Sourcepub fn stream_memory(&self, sr: StreamReference) -> &Memory
pub fn stream_memory(&self, sr: StreamReference) -> &Memory
Returns the memory representation for the given stream.
Sourcepub fn name(&self, sr: StreamReference) -> &str
pub fn name(&self, sr: StreamReference) -> &str
Returns the name of the given stream.
Sourcepub fn stream_by_name(&self, name: &str) -> Option<StreamReference>
pub fn stream_by_name(&self, name: &str) -> Option<StreamReference>
Returns the stream reference of the stream with the given name
Sourcepub fn streams(&self) -> impl Iterator<Item = StreamReference> + '_
pub fn streams(&self) -> impl Iterator<Item = StreamReference> + '_
Returns an iterator over all streams in the specification UNSORTED
Sourcepub fn inputs(&self) -> impl Iterator<Item = InputReference> + '_
pub fn inputs(&self) -> impl Iterator<Item = InputReference> + '_
Returns an iterator over all inputs in the specification UNSORTED
Sourcepub fn num_inputs(&self) -> usize
pub fn num_inputs(&self) -> usize
Returns the number of input streams in the specification
Sourcepub fn outputs(&self) -> impl Iterator<Item = OutputReference> + '_
pub fn outputs(&self) -> impl Iterator<Item = OutputReference> + '_
Returns an iterator over all output streams in the specification UNSORTED
Sourcepub fn triggers(&self) -> impl Iterator<Item = OutputReference> + '_
pub fn triggers(&self) -> impl Iterator<Item = OutputReference> + '_
Returns an iterator over all the output streams that represent triggers UNSORTED
Sourcepub fn num_outputs(&self) -> usize
pub fn num_outputs(&self) -> usize
Returns the total number of output streams in the specification
Sourcepub fn static_outputs(&self) -> impl Iterator<Item = OutputReference> + '_
pub fn static_outputs(&self) -> impl Iterator<Item = OutputReference> + '_
Returns an iterator over all static output streams in the specification
Sourcepub fn dynamic_outputs(&self) -> impl Iterator<Item = OutputReference> + '_
pub fn dynamic_outputs(&self) -> impl Iterator<Item = OutputReference> + '_
Returns an iterator over of dynamic output streams in the specification
Sourcepub fn parameterized_outputs(
&self,
) -> impl Iterator<Item = OutputReference> + '_
pub fn parameterized_outputs( &self, ) -> impl Iterator<Item = OutputReference> + '_
Returns the number of parameterized output streams in the specification
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamIr
impl !RefUnwindSafe for StreamIr
impl Send for StreamIr
impl !Sync for StreamIr
impl Unpin for StreamIr
impl UnwindSafe for StreamIr
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more