pub mod all;
pub mod any;
mod atomic_scalar;
pub mod count;
pub mod count_non_zero;
pub mod gather;
pub mod histogram;
mod indexed_move;
pub mod max;
pub mod min;
pub mod multi_block_prefix_scan;
pub mod radix_sort;
pub mod range_counts;
pub mod scatter;
pub mod segment_reduce;
pub mod sum;
pub mod workgroup_any;
pub mod workgroup_tree;
#[cfg(any(test, feature = "cpu-parity"))]
fn collect_cpu_reference<T>(
operation: &str,
fill: impl FnOnce(&mut Vec<T>) -> Result<(), String>,
) -> Vec<T> {
let mut out = Vec::new();
fill(&mut out).unwrap_or_else(|error| {
panic!("vyre-primitives {operation} CPU reference failed: {error}")
});
out
}