weirflow 0.1.0

GPU-first dataflow analysis primitives for Vyre and Santh compiler pipelines.
Documentation
#![allow(clippy::too_many_arguments)]

use super::FixedPointResidentGraph;

impl FixedPointResidentGraph {
    /// Run reaching-definition closure through resident graph resources.
    pub fn reaching(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::reaching::reaching_closure_resident_plan_with_scratch(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run reaching-definition closure through resident graph resources into
    /// caller-owned result storage.
    pub fn reaching_into(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::reaching::reaching_closure_resident_plan_with_scratch_into(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run reaching-definition closure with both graph and frontier buffers
    /// passed as resident resources.
    pub fn reaching_resident_frontier(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::reaching::reaching_closure_resident_plan_with_backend_scratch(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run reaching-definition closure with graph/frontier resident resources
    /// into caller-owned result storage.
    pub fn reaching_resident_frontier_into(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::reaching::reaching_closure_resident_plan_with_backend_scratch_into(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run live-variable closure through resident graph resources.
    pub fn live(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::live::live_closure_resident_plan_with_scratch(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run live-variable closure through resident graph resources into
    /// caller-owned result storage.
    pub fn live_into(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::live::live_closure_resident_plan_with_scratch_into(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run live-variable closure with both graph and frontier buffers passed
    /// as resident resources.
    pub fn live_resident_frontier(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::live::live_closure_resident_plan_with_backend_scratch(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run live-variable closure with graph/frontier resident resources into
    /// caller-owned result storage.
    pub fn live_resident_frontier_into(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::live::live_closure_resident_plan_with_backend_scratch_into(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run points-to subset closure through resident graph resources.
    pub fn points_to_subset(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::points_to::subset_closure_resident_plan_with_scratch(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run points-to subset closure through resident graph resources into
    /// caller-owned result storage.
    pub fn points_to_subset_into(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::points_to::subset_closure_resident_plan_with_scratch_into(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run points-to subset closure with both graph and frontier buffers passed
    /// as resident resources.
    pub fn points_to_subset_resident_frontier(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::points_to::subset_closure_resident_plan_with_backend_scratch(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run points-to subset closure with graph/frontier resident resources
    /// into caller-owned result storage.
    pub fn points_to_subset_resident_frontier_into(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::points_to::subset_closure_resident_plan_with_backend_scratch_into(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run backward-slice closure through resident graph resources.
    pub fn slice(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::slice::slice_closure_resident_plan_with_scratch(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run backward-slice closure through resident graph resources into
    /// caller-owned result storage.
    pub fn slice_into(
        &self,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::slice::slice_closure_resident_plan_with_scratch_into(
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }

    /// Run backward-slice closure with both graph and frontier buffers passed
    /// as resident resources.
    pub fn slice_resident_frontier(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
    ) -> Result<Vec<u32>, String> {
        crate::slice::slice_closure_resident_plan_with_backend_scratch(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
        )
    }

    /// Run backward-slice closure with graph/frontier resident resources into
    /// caller-owned result storage.
    pub fn slice_resident_frontier_into(
        &self,
        backend: &dyn vyre::VyreBackend,
        pipeline: &dyn vyre::CompiledPipeline,
        seed_bits: &[u32],
        max_iterations: u32,
        config: &vyre::DispatchConfig,
        scratch: &mut crate::fixed_point_scratch::FixedPointScratch,
        result: &mut Vec<u32>,
    ) -> Result<(), String> {
        crate::slice::slice_closure_resident_plan_with_backend_scratch_into(
            backend,
            pipeline,
            self,
            seed_bits,
            max_iterations,
            config,
            scratch,
            result,
        )
    }
}