use crate::proof::comparator::ComparatorKind;
use crate::spec::types::{ChainSpec, OpSpec, Strictness};
pub use super::suite::ConformanceSuite;
use crate::spec::minimums::{MIN_BOUNDARY_VALUES, MIN_EQUIVALENCE_CLASSES};
#[inline]
pub(crate) fn workgroup_sizes(preferred: Option<u32>) -> Result<Vec<u32>, String> {
let mut sizes = vec![1u32, 64];
if let Some(size) = preferred {
if size == 0 {
return Err(
"Fix: workgroup_size cannot be 0. Use Some(n) with n in 1..=1024 \
or None to accept the default schedule."
.to_string(),
);
}
if size > 1024 {
return Err(format!(
"Fix: workgroup_size {size} exceeds 1024. Cap to the device max."
));
}
sizes.push(size);
}
sizes.sort_unstable();
sizes.dedup();
Ok(sizes)
}