pub(crate) mod counted;
mod pipeline;
mod reducer;
pub use reducer::Reducer;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum U32Reduction {
Sum,
Min,
Max,
}
impl U32Reduction {
pub const fn identity(self) -> u32 {
match self {
Self::Sum | Self::Max => 0,
Self::Min => u32::MAX,
}
}
pub(crate) const fn name(self) -> &'static str {
match self {
Self::Sum => "sum",
Self::Min => "min",
Self::Max => "max",
}
}
pub(crate) const fn pass_label(self) -> &'static str {
match self {
Self::Sum => "Sum Reduction",
Self::Min => "Minimum Reduction",
Self::Max => "Maximum Reduction",
}
}
}