use vyre_foundation::ir::Program;
use super::launch_plan::CsrForwardOrChangedLaunchPlan;
use super::layout::{CsrForwardOrChangedLayout, CsrForwardOrChangedProgramKey};
pub(crate) struct CsrForwardOrChangedDispatchPlan {
launch: CsrForwardOrChangedLaunchPlan,
program: Program,
}
impl CsrForwardOrChangedDispatchPlan {
#[must_use]
pub(crate) const fn new(launch: CsrForwardOrChangedLaunchPlan, program: Program) -> Self {
Self { launch, program }
}
#[must_use]
pub(crate) const fn layout(&self) -> CsrForwardOrChangedLayout {
self.launch.layout()
}
#[must_use]
pub(crate) const fn launch(&self) -> CsrForwardOrChangedLaunchPlan {
self.launch
}
#[must_use]
pub(crate) const fn program_key(&self) -> CsrForwardOrChangedProgramKey {
self.launch.program_key()
}
#[must_use]
pub(crate) const fn program(&self) -> &Program {
&self.program
}
#[must_use]
pub(crate) const fn changed_words(&self) -> usize {
self.launch.changed_words()
}
#[must_use]
pub(crate) const fn uses_changed_history(&self) -> bool {
self.launch.uses_changed_history()
}
#[must_use]
pub(crate) const fn changed_slot_value(&self, iteration: u32) -> Option<u32> {
self.launch.changed_slot_value(iteration)
}
pub(crate) fn changed_read_index(&self, iteration: u32) -> Result<usize, String> {
self.launch.changed_read_index(iteration)
}
#[must_use]
pub(crate) const fn dispatch_grid(&self) -> [u32; 3] {
self.launch.dispatch_grid()
}
#[must_use]
pub(crate) const fn frontier_words(&self) -> usize {
self.launch.frontier_words()
}
#[must_use]
pub(crate) const fn node_words(&self) -> usize {
self.launch.node_words()
}
#[must_use]
pub(crate) const fn edge_offset_words(&self) -> usize {
self.launch.edge_offset_words()
}
#[must_use]
pub(crate) const fn edge_storage_words(&self) -> usize {
self.launch.edge_storage_words()
}
}