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
Memory
Memory access with ordering constraints
Fields
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
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
Carry
Carry: loop-carried dependency
Handles values that flow from one iteration to the next.
Fields
CarryGate
CarryGate: multi-level loop support
Selects between tokens from inner and outer loops.
Fields
Merge
Merge: join divergent control paths
Combines tokens from multiple paths into a single stream. Used for ordering at control flow join points.
Split
Split: fan-out to multiple consumers
Constant
Constant: emit a constant value
Source
Source: external input to the graph
Sink
Sink: external output from the graph
Select
Select: multiplexer (choose one of N inputs based on selector)
Fields
Reduce
Reduce: accumulate values (for reductions like sum, product)
Implementations§
Source§impl DfOperator
impl DfOperator
Sourcepub fn energy_cost(&self) -> u32
pub fn energy_cost(&self) -> u32
Estimated energy cost for this operator
Sourcepub fn is_control(&self) -> bool
pub fn is_control(&self) -> bool
Is this a control-flow operator?
Trait Implementations§
Source§impl Clone for DfOperator
impl Clone for DfOperator
Source§fn clone(&self) -> DfOperator
fn clone(&self) -> DfOperator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more