pub struct Z1Nested<T> { /* private fields */ }Expand description
z^-1 operator over streams of streams.
The operator stores a complete nested stream consumed at the last iteration of the parent clock and outputs it at the next parent clock cycle. It outputs a stream of zeros in the first parent clock tick.
One important subtlety is that mathematically speaking nested streams are infinite, but we can only compute and store finite prefixes of such streams. When asked to produce output beyond the stored prefix, the z^-1 operator repeats the last value in the stored prefix. The assumption here is that the circuit was evaluated to a fixed point at the previous parent timestamp, and hence the rest of the stream will contain the same fixed point value. This is not generally true for all circuits, and users should keep this in mind when instantiating the operator.
It is a strict operator.
§Examples
Input (one row per parent timestamps):
1 2 3 4
1 1 1 1 1
2 2 2 0 0Output:
0 0 0 0
1 2 3 4 4
1 1 1 1 1Trait Implementations§
Source§impl<T> Operator for Z1Nested<T>
impl<T> Operator for Z1Nested<T>
Source§fn clock_start(&mut self, scope: Scope)
fn clock_start(&mut self, scope: Scope)
fn clock_end(&mut self, scope: Scope)
Source§fn metadata(&self, meta: &mut OperatorMeta)
fn metadata(&self, meta: &mut OperatorMeta)
Source§fn fixedpoint(&self, scope: Scope) -> bool
fn fixedpoint(&self, scope: Scope) -> bool
Source§fn location(&self) -> OperatorLocation
fn location(&self) -> OperatorLocation
Source§fn init(&mut self, _global_id: &GlobalNodeId)
fn init(&mut self, _global_id: &GlobalNodeId)
Source§fn register_ready_callback<F>(&mut self, _cb: F)
fn register_ready_callback<F>(&mut self, _cb: F)
Source§fn checkpoint(
&mut self,
base: &StoragePath,
persistent_id: Option<&str>,
files: &mut Vec<Arc<dyn FileCommitter>>,
) -> Result<(), Error>
fn checkpoint( &mut self, base: &StoragePath, persistent_id: Option<&str>, files: &mut Vec<Arc<dyn FileCommitter>>, ) -> Result<(), Error>
base. Any files that the operator creates should have
persistent_id in their names to keep them unique. Read moreSource§fn restore(
&mut self,
base: &StoragePath,
persistent_id: Option<&str>,
) -> Result<(), Error>
fn restore( &mut self, base: &StoragePath, persistent_id: Option<&str>, ) -> Result<(), Error>
base, using persistent_id to find its files. Read moreSource§fn start_replay(&mut self) -> Result<(), Error>
fn start_replay(&mut self) -> Result<(), Error>
Source§fn is_replay_complete(&self) -> bool
fn is_replay_complete(&self) -> bool
Source§fn end_replay(&mut self) -> Result<(), Error>
fn end_replay(&mut self) -> Result<(), Error>
Source§fn start_transaction(&mut self)
fn start_transaction(&mut self)
Source§fn flush(&mut self)
fn flush(&mut self)
Source§fn is_flush_complete(&self) -> bool
fn is_flush_complete(&self) -> bool
Source§impl<T> StrictOperator<T> for Z1Nested<T>
impl<T> StrictOperator<T> for Z1Nested<T>
Source§fn get_output(&mut self) -> T
fn get_output(&mut self) -> T
eval_strict() has been invoked for the current timestamp. It can
be invoked at most once for each timestamp,
as the implementation may mutate or destroy the operator’s internal
state (for example Z1 returns its inner
value, leaving the operator empty).fn get_final_output(&mut self) -> T
Source§impl<T> StrictUnaryOperator<T, T> for Z1Nested<T>
impl<T> StrictUnaryOperator<T, T> for Z1Nested<T>
Source§async fn eval_strict(&mut self, i: &T)
async fn eval_strict(&mut self, i: &T)
get_output during the
next timestamp.Source§async fn eval_strict_owned(&mut self, i: T)
async fn eval_strict_owned(&mut self, i: T)
get_output during the
next timestamp.Source§fn input_preference(&self) -> OwnershipPreference
fn input_preference(&self) -> OwnershipPreference
OwnershipPreference).Source§impl<T> UnaryOperator<T, T> for Z1Nested<T>
impl<T> UnaryOperator<T, T> for Z1Nested<T>
Source§async fn eval_owned(&mut self, i: T) -> T
async fn eval_owned(&mut self, i: T) -> T
Source§fn input_preference(&self) -> OwnershipPreference
fn input_preference(&self) -> OwnershipPreference
OwnershipPreference).Auto Trait Implementations§
impl<T> Freeze for Z1Nested<T>where
T: Freeze,
impl<T> RefUnwindSafe for Z1Nested<T>where
T: RefUnwindSafe,
impl<T> Send for Z1Nested<T>where
T: Send,
impl<T> Sync for Z1Nested<T>where
T: Sync,
impl<T> Unpin for Z1Nested<T>where
T: Unpin,
impl<T> UnsafeUnpin for Z1Nested<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Z1Nested<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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