weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
use super::{generic::PlanBuilder, FixedPointBorrowedResidentPlan};
use crate::fixed_point_resident::FixedPointResidentGraph;
use crate::fixed_point_resident_frontier::FixedPointResidentFrontierScratch;

impl<'a> FixedPointBorrowedResidentPlan<'a> {
    /// Bind a cached resident graph to a compiled pipeline without taking
    /// ownership of the graph resources.
    #[must_use]
    pub fn new(
        graph: &'a FixedPointResidentGraph,
        pipeline: std::sync::Arc<dyn vyre::CompiledPipeline>,
    ) -> Self {
        Self {
            inner: PlanBuilder { graph, pipeline },
        }
    }

    /// Free only caller-owned reusable frontier resources. Cached graph
    /// resources remain owned by the cache.
    pub fn clear_frontier(
        &self,
        backend: &dyn vyre::VyreBackend,
        resident_frontier: &mut FixedPointResidentFrontierScratch,
    ) -> Result<(), vyre::BackendError> {
        resident_frontier.clear(backend)
    }
}