StreamIr

Struct StreamIr 

Source
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: Stmt

The 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: LivetimeEquivalences

Equivalence 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

Source

pub fn display(self) -> String

Display the StreamIR using a debugging formatter

Source§

impl StreamIr

Source

pub fn stream_memory(&self, sr: StreamReference) -> &Memory

Returns the memory representation for the given stream.

Source

pub fn name(&self, sr: StreamReference) -> &str

Returns the name of the given stream.

Source

pub fn stream_by_name(&self, name: &str) -> Option<StreamReference>

Returns the stream reference of the stream with the given name

Source

pub fn streams(&self) -> impl Iterator<Item = StreamReference> + '_

Returns an iterator over all streams in the specification UNSORTED

Source

pub fn inputs(&self) -> impl Iterator<Item = InputReference> + '_

Returns an iterator over all inputs in the specification UNSORTED

Source

pub fn num_inputs(&self) -> usize

Returns the number of input streams in the specification

Source

pub fn outputs(&self) -> impl Iterator<Item = OutputReference> + '_

Returns an iterator over all output streams in the specification UNSORTED

Source

pub fn triggers(&self) -> impl Iterator<Item = OutputReference> + '_

Returns an iterator over all the output streams that represent triggers UNSORTED

Source

pub fn num_outputs(&self) -> usize

Returns the total number of output streams in the specification

Source

pub fn static_outputs(&self) -> impl Iterator<Item = OutputReference> + '_

Returns an iterator over all static output streams in the specification

Source

pub fn dynamic_outputs(&self) -> impl Iterator<Item = OutputReference> + '_

Returns an iterator over of dynamic output streams in the specification

Source

pub fn parameterized_outputs( &self, ) -> impl Iterator<Item = OutputReference> + '_

Returns the number of parameterized output streams in the specification

Source§

impl StreamIr

Source

pub fn all_periodic_pacings(&self) -> (Vec<Duration>, Vec<&LocalFreq>)

Returns all periodic pacings that are used in guards in the StreamIR

Returns a tuple, the first element holds the durations of global frequencies, the second element the reference of local frequencies

Trait Implementations§

Source§

impl Clone for StreamIr

Source§

fn clone(&self) -> StreamIr

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StreamIr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<RtLolaMir> for StreamIr

Source§

type Error = LoweringError

The type returned in the event of a conversion error.
Source§

fn try_from(value: RtLolaMir) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.