use alloc::string::String;
use alloc::vec::Vec;
use crate::Element;
pub(crate) mod constant;
pub(crate) mod copy;
pub(crate) mod linalg;
pub(crate) mod math;
pub(crate) mod nn;
pub(crate) mod ops;
pub(crate) mod reduction;
pub(crate) const MAX_WORKGROUPS: u32 = 65535;
pub(crate) const WORKGROUP_SIZE: u32 = 256;
pub(crate) trait Kernel: 'static {
const LABEL: &'static str;
type Output: Element;
fn wgsl() -> String;
}
#[allow(clippy::cast_possible_truncation)]
pub(crate) fn convert_strides(strides: &[usize]) -> Vec<u32> {
if strides.is_empty() {
alloc::vec![0]
} else {
strides.iter().map(|&s| s as u32).collect()
}
}