DfOperator

Enum DfOperator 

Source
pub enum DfOperator {
Show 13 variants Compute { op: ComputeOp, inputs: Vec<ChannelId>, output: ChannelId, }, Memory { op: MemoryOp, address: ChannelId, data: ChannelId, ordering: Vec<ChannelId>, }, Steer { decider: ChannelId, data: ChannelId, true_out: ChannelId, false_out: ChannelId, }, Stream { start: ChannelId, step: ChannelId, bound: ChannelId, output: ChannelId, done: ChannelId, }, Carry { initial: ChannelId, feedback: ChannelId, continue_signal: ChannelId, output: ChannelId, }, CarryGate { inner: ChannelId, outer: ChannelId, level: ChannelId, output: ChannelId, }, Merge { inputs: Vec<ChannelId>, output: ChannelId, }, Split { input: ChannelId, outputs: Vec<ChannelId>, }, Constant { value: TokenValue, output: ChannelId, repeat: Option<u64>, }, Source { external_id: u32, output: ChannelId, }, Sink { input: ChannelId, external_id: u32, }, Select { selector: ChannelId, inputs: Vec<ChannelId>, output: ChannelId, }, Reduce { op: ComputeOp, initial: ChannelId, values: ChannelId, count_or_done: ChannelId, output: ChannelId, },
}
Expand description

A dataflow operator that fires when all inputs are ready

Variants§

§

Compute

Pure computation: inputs → output

Fields

§inputs: Vec<ChannelId>
§output: ChannelId
§

Memory

Memory access with ordering constraints

Fields

§address: ChannelId

Address input

§data: ChannelId

Data input (for stores) or output (for loads)

§ordering: Vec<ChannelId>

Ordering dependencies (must complete before this fires)

§

Steer

Steer: conditional routing (RipTide’s key control-flow primitive)

Routes data to one of two outputs based on a boolean decider. This enables control flow without traditional branches.

Fields

§decider: ChannelId

Boolean condition channel

§data: ChannelId

Value to route

§true_out: ChannelId

Output when decider is true

§false_out: ChannelId

Output when decider is false

§

Stream

Stream: fused loop induction variable

This is RipTide’s key optimization - fusing the induction variable computation (i = 0; i < N; i++) into a single operator. Achieves 27-52% operator count reduction.

Fields

§start: ChannelId

Starting value

§step: ChannelId

Step/increment

§bound: ChannelId

Upper bound

§output: ChannelId

Current value output (fires once per iteration)

§done: ChannelId

Done signal (true when loop complete)

§

Carry

Carry: loop-carried dependency

Handles values that flow from one iteration to the next.

Fields

§initial: ChannelId

Initial value (first iteration)

§feedback: ChannelId

Feedback from previous iteration

§continue_signal: ChannelId

Continue signal (false = loop done)

§output: ChannelId

Output value

§

CarryGate

CarryGate: multi-level loop support

Selects between tokens from inner and outer loops.

Fields

§inner: ChannelId

Inner loop token

§outer: ChannelId

Outer loop token

§level: ChannelId

Level selector

§output: ChannelId

Output

§

Merge

Merge: join divergent control paths

Combines tokens from multiple paths into a single stream. Used for ordering at control flow join points.

Fields

§inputs: Vec<ChannelId>
§output: ChannelId
§

Split

Split: fan-out to multiple consumers

Fields

§outputs: Vec<ChannelId>
§

Constant

Constant: emit a constant value

Fields

§output: ChannelId
§repeat: Option<u64>

How many times to emit (None = once)

§

Source

Source: external input to the graph

Fields

§external_id: u32

External ID for this input

§output: ChannelId
§

Sink

Sink: external output from the graph

Fields

§external_id: u32

External ID for this output

§

Select

Select: multiplexer (choose one of N inputs based on selector)

Fields

§selector: ChannelId

Selector (index into inputs)

§inputs: Vec<ChannelId>

Input channels

§output: ChannelId

Output

§

Reduce

Reduce: accumulate values (for reductions like sum, product)

Fields

§op: ComputeOp

Reduction operation

§initial: ChannelId

Initial/identity value

§values: ChannelId

Stream of values to reduce

§count_or_done: ChannelId

Count of values (or done signal)

§output: ChannelId

Final result

Implementations§

Source§

impl DfOperator

Source

pub fn inputs(&self) -> Vec<ChannelId>

Get all input channels for this operator

Source

pub fn outputs(&self) -> Vec<ChannelId>

Get all output channels for this operator

Source

pub fn energy_cost(&self) -> u32

Estimated energy cost for this operator

Source

pub fn is_control(&self) -> bool

Is this a control-flow operator?

Trait Implementations§

Source§

impl Clone for DfOperator

Source§

fn clone(&self) -> DfOperator

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 DfOperator

Source§

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

Formats the value using the given formatter. Read more

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> 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.