use crate::backend::BackendKernel;
pub struct Kernel {
pub(crate) inner: BackendKernel,
pub(crate) binding_count: usize,
pub(crate) workgroup_size: [u32; 3],
pub(crate) entry_point: String,
}
impl Kernel {
pub const fn binding_count(&self) -> usize {
self.binding_count
}
pub fn entry_point(&self) -> &str {
&self.entry_point
}
pub const fn workgroup_size(&self) -> [u32; 3] {
self.workgroup_size
}
}
impl std::fmt::Debug for Kernel {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Kernel")
.field("entry_point", &self.entry_point)
.field("binding_count", &self.binding_count)
.field("workgroup_size", &self.workgroup_size)
.finish_non_exhaustive()
}
}