Skip to main content

FixedPointBatch

Struct FixedPointBatch 

Source
pub struct FixedPointBatch<'a, F> { /* private fields */ }
Expand description

Fixed-point batch runner that reuses scratch across analyses.

Implementations§

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn ifds_scratch(&self) -> &IfdsSolveScratch

Inspect retained IFDS scratch after one or more batch solves.

Source

pub fn ifds_prepare_scratch(&self) -> &IfdsPrepareScratch

Inspect retained IFDS preparation scratch after one or more prepares.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn prepare_ifds( &mut self, num_procs: u32, blocks_per_proc: u32, facts_per_proc: u32, intra_edges: &[(u32, u32, u32)], inter_edges: &[(u32, u32, u32, u32)], flow_gen: &[(u32, u32, u32)], flow_kill: &[(u32, u32, u32)], ) -> Result<PreparedIfdsCsr, String>

Prepare IFDS CSR buffers for repeated batch solves.

Source

pub fn ifds( &mut self, num_procs: u32, blocks_per_proc: u32, facts_per_proc: u32, intra_edges: &[(u32, u32, u32)], inter_edges: &[(u32, u32, u32, u32)], flow_gen: &[(u32, u32, u32)], flow_kill: &[(u32, u32, u32)], seed_facts: &[(u32, u32, u32)], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run IFDS reachability while reusing retained batch preparation and solve scratch.

Source

pub fn ifds_into( &mut self, num_procs: u32, blocks_per_proc: u32, facts_per_proc: u32, intra_edges: &[(u32, u32, u32)], inter_edges: &[(u32, u32, u32, u32)], flow_gen: &[(u32, u32, u32)], flow_kill: &[(u32, u32, u32)], seed_facts: &[(u32, u32, u32)], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run IFDS reachability into caller-owned result storage while reusing retained batch preparation and solve scratch.

Source

pub fn ifds_many( &mut self, num_procs: u32, blocks_per_proc: u32, facts_per_proc: u32, intra_edges: &[(u32, u32, u32)], inter_edges: &[(u32, u32, u32, u32)], flow_gen: &[(u32, u32, u32)], flow_kill: &[(u32, u32, u32)], seed_sets: &[&[(u32, u32, u32)]], max_iterations: u32, ) -> Result<Vec<Vec<u32>>, String>

Run several IFDS reachability queries while preparing the IFDS CSR once and reusing retained batch scratch across every seed set.

Source

pub fn ifds_many_into( &mut self, num_procs: u32, blocks_per_proc: u32, facts_per_proc: u32, intra_edges: &[(u32, u32, u32)], inter_edges: &[(u32, u32, u32, u32)], flow_gen: &[(u32, u32, u32)], flow_kill: &[(u32, u32, u32)], seed_sets: &[&[(u32, u32, u32)]], max_iterations: u32, results: &mut Vec<Vec<u32>>, ) -> Result<(), String>

Run several IFDS reachability queries while preparing the IFDS CSR once and writing into caller-owned result rows.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn ifds_prepared( &mut self, prepared: &PreparedIfdsCsr, seed_facts: &[(u32, u32, u32)], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run IFDS reachability against prepared CSR buffers with retained batch scratch.

Source

pub fn ifds_prepared_into( &mut self, prepared: &PreparedIfdsCsr, seed_facts: &[(u32, u32, u32)], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run IFDS reachability against prepared CSR buffers into caller-owned result storage with retained batch scratch.

Source

pub fn ifds_prepared_many( &mut self, prepared: &PreparedIfdsCsr, seed_sets: &[&[(u32, u32, u32)]], max_iterations: u32, ) -> Result<Vec<Vec<u32>>, String>

Run several IFDS reachability queries against prepared CSR buffers while reusing retained batch scratch across every seed set.

Source

pub fn ifds_prepared_many_into( &mut self, prepared: &PreparedIfdsCsr, seed_sets: &[&[(u32, u32, u32)]], max_iterations: u32, results: &mut Vec<Vec<u32>>, ) -> Result<(), String>

Run several IFDS reachability queries against prepared CSR buffers into caller-owned result rows with retained batch scratch.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn live( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Source

pub fn live_into( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run live-variable closure into caller-owned result storage.

Source

pub fn prepare_live( &mut self, graph: CsrGraph<'_>, ) -> Result<FixedPointForwardGraph, String>

Prepare live-variable reversed-control graph buffers for repeated runs.

Source

pub fn prepare_live_into( &mut self, graph: CsrGraph<'_>, prepared: &mut FixedPointForwardGraph, ) -> Result<(), String>

Repack live-variable graph buffers into an existing prepared graph.

Source

pub fn prepare_live_plan( &mut self, graph: CsrGraph<'_>, ) -> Result<FixedPointAnalysisPlan, String>

Prepare live-variable graph buffers and Program for repeated runs.

Source

pub fn prepare_live_plan_into( &mut self, graph: CsrGraph<'_>, plan: &mut FixedPointAnalysisPlan, ) -> Result<(), String>

Repack a live-variable plan in place for a new graph layout.

Source

pub fn live_prepared( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run live-variable closure against prepared reversed-control buffers.

Source

pub fn live_prepared_into( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run live-variable closure against prepared reversed-control buffers into caller-owned result storage.

Source

pub fn live_plan( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run live-variable closure against a prepared graph+Program plan.

Source

pub fn live_plan_into( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run live-variable closure against a prepared graph+Program plan into caller-owned result storage.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn points_to_subset( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Source

pub fn points_to_subset_into( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run Andersen subset closure into caller-owned result storage.

Source

pub fn prepare_points_to_subset( &self, graph: CsrGraph<'_>, ) -> Result<FixedPointForwardGraph, String>

Prepare points-to subset graph buffers for repeated batch runs.

Source

pub fn prepare_points_to_subset_into( &self, graph: CsrGraph<'_>, prepared: &mut FixedPointForwardGraph, ) -> Result<(), String>

Repack points-to subset graph buffers into an existing prepared graph.

Source

pub fn prepare_points_to_subset_plan( &self, graph: CsrGraph<'_>, ) -> Result<FixedPointAnalysisPlan, String>

Prepare points-to subset graph buffers and Program for repeated runs.

Source

pub fn prepare_points_to_subset_plan_into( &self, graph: CsrGraph<'_>, plan: &mut FixedPointAnalysisPlan, ) -> Result<(), String>

Repack a points-to subset plan in place for a new graph layout.

Source

pub fn points_to_subset_prepared( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run points-to subset closure against prepared graph buffers.

Source

pub fn points_to_subset_prepared_into( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run points-to subset closure against prepared graph buffers into caller-owned result storage.

Source

pub fn points_to_subset_plan( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run points-to subset closure against a prepared graph+Program plan.

Source

pub fn points_to_subset_plan_into( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run points-to subset closure against a prepared graph+Program plan into caller-owned result storage.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn reaching( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Source

pub fn reaching_into( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run reaching-definition closure into caller-owned result storage.

Source

pub fn prepare_reaching( &mut self, graph: CsrGraph<'_>, ) -> Result<FixedPointForwardGraph, String>

Prepare reaching graph buffers for repeated batch runs.

Source

pub fn prepare_reaching_into( &mut self, graph: CsrGraph<'_>, prepared: &mut FixedPointForwardGraph, ) -> Result<(), String>

Repack reaching graph buffers into an existing prepared graph.

Source

pub fn prepare_reaching_plan( &mut self, graph: CsrGraph<'_>, ) -> Result<FixedPointAnalysisPlan, String>

Prepare reaching graph buffers and Program for repeated batch runs.

Source

pub fn prepare_reaching_plan_into( &mut self, graph: CsrGraph<'_>, plan: &mut FixedPointAnalysisPlan, ) -> Result<(), String>

Repack a reaching plan in place for a new graph layout.

Source

pub fn reaching_prepared( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run reaching-definition closure against prepared graph buffers.

Source

pub fn reaching_prepared_into( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run reaching-definition closure against prepared graph buffers into caller-owned result storage.

Source

pub fn reaching_plan( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run reaching-definition closure against a prepared graph+Program plan.

Source

pub fn reaching_plan_into( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run reaching-definition closure against a prepared graph+Program plan into caller-owned result storage.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn slice( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Source

pub fn slice_into( &mut self, graph: CsrGraph<'_>, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run backward slice closure into caller-owned result storage.

Source

pub fn prepare_slice( &self, graph: CsrGraph<'_>, ) -> Result<FixedPointForwardGraph, String>

Prepare backward-slice graph buffers for repeated batch runs.

Source

pub fn prepare_slice_into( &self, graph: CsrGraph<'_>, prepared: &mut FixedPointForwardGraph, ) -> Result<(), String>

Repack slice graph buffers into an existing prepared graph.

Source

pub fn prepare_slice_plan( &self, graph: CsrGraph<'_>, ) -> Result<FixedPointAnalysisPlan, String>

Prepare backward-slice graph buffers and Program for repeated runs.

Source

pub fn prepare_slice_plan_into( &self, graph: CsrGraph<'_>, plan: &mut FixedPointAnalysisPlan, ) -> Result<(), String>

Repack a slice plan in place for a new graph layout.

Source

pub fn slice_prepared( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run backward slice closure against prepared graph buffers.

Source

pub fn slice_prepared_into( &mut self, graph: &FixedPointForwardGraph, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run backward slice closure against prepared graph buffers into caller-owned result storage.

Source

pub fn slice_plan( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, ) -> Result<Vec<u32>, String>

Run backward slice closure against a prepared graph+Program plan.

Source

pub fn slice_plan_into( &mut self, plan: &FixedPointAnalysisPlan, seed_bits: &[u32], max_iterations: u32, result: &mut Vec<u32>, ) -> Result<(), String>

Run backward slice closure against a prepared graph+Program plan into caller-owned result storage.

Source§

impl<'a, F> FixedPointBatch<'a, F>
where F: Fn(&Program, &[&[u8]], Option<[u32; 3]>, &mut Vec<Vec<u8>>) -> Result<(), String>,

Source

pub fn new(dispatch: &'a F) -> Self

Create a batch runner around a borrowed GPU dispatch adapter.

Source

pub fn scratch(&self) -> &FixedPointScratch

Inspect retained scratch after one or more batch runs.

Source

pub fn frontier_density(&self) -> FrontierDensityTelemetry

Latest host-observed frontier density from the last fixed-point solve.

Source

pub fn recommended_frontier_execution_mode(&self) -> FrontierExecutionMode

Sparse/dense execution family recommended from the last solve’s frontier density.

Source

pub fn execution_plan_for_prepared_graph( &self, graph: &FixedPointForwardGraph, ) -> Result<FixedPointExecutionPlan, String>

Build a scale-aware execution plan for a prepared graph using the last observed frontier density.

Source

pub fn clear(&mut self)

Clear logical scratch contents while preserving capacity.

Trait Implementations§

Source§

impl<'a, F: Clone> Clone for FixedPointBatch<'a, F>

Source§

fn clone(&self) -> FixedPointBatch<'a, F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a, F: Debug> Debug for FixedPointBatch<'a, F>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a, F: PartialEq> PartialEq for FixedPointBatch<'a, F>

Source§

fn eq(&self, other: &FixedPointBatch<'a, F>) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<'a, F: PartialEq> StructuralPartialEq for FixedPointBatch<'a, F>

Auto Trait Implementations§

§

impl<'a, F> !Freeze for FixedPointBatch<'a, F>

§

impl<'a, F> !RefUnwindSafe for FixedPointBatch<'a, F>

§

impl<'a, F> !UnwindSafe for FixedPointBatch<'a, F>

§

impl<'a, F> Send for FixedPointBatch<'a, F>
where F: Sync,

§

impl<'a, F> Sync for FixedPointBatch<'a, F>
where F: Sync,

§

impl<'a, F> Unpin for FixedPointBatch<'a, F>

§

impl<'a, F> UnsafeUnpin for FixedPointBatch<'a, F>

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more