Skip to main content

Module streams_pipeline

Module streams_pipeline 

Source
Expand description

atomr-streams-based pipeline helpers — the F10 successor to the actor-based crate::pipeline::PipelineExecutor.

Wraps the Source / Sink DSL so callers can compose GPU kernel stages with the rest of a atomr-streams graph (file IO, TCP, framing, kill switches, restart-on-error supervision).

The functions here are intentionally thin: they let you build a Source<I> from any mpsc::UnboundedReceiver, transform it with a map_async stage that calls a user-supplied async function (the GPU kernel call), and terminate with one of the built-in sinks. For more complex topologies (broadcast, balance, partition), drop straight into atomr_streams::* — this module’s helpers stay out of your way.

Functions§

gpu_stage
Apply an async GPU stage with the given degree of parallelism. Ordering is preserved (akka.net’s SelectAsync).
run_collect
Run a single-stage pipeline end-to-end: pull from rx, apply the async stage with the given parallelism, and collect every output into a Vec. The future completes when every sender is dropped upstream.
source_from_unbounded
Wrap a tokio::sync::mpsc::UnboundedReceiver as a streams Source.