pub(crate) struct GpuKernelArgs {
pub(crate) id: Option<String>,
pub(crate) backends: Vec<GpuBackend>,
pub(crate) fallback: Vec<GpuBackend>,
pub(crate) requires: Vec<GpuCapability>,
pub(crate) block_size: Option<u32>,
}Expand description
Attributes for the gpu_kernel macro.
Fields§
§id: Option<String>Kernel identifier.
backends: Vec<GpuBackend>Target backends to generate code for.
fallback: Vec<GpuBackend>Fallback order for backend selection.
requires: Vec<GpuCapability>Required capabilities.
block_size: Option<u32>Block/workgroup size.
Implementations§
Source§impl GpuKernelArgs
impl GpuKernelArgs
pub(crate) fn parse(attr: TokenStream) -> Result<Self, Error>
Sourcepub(crate) fn validate_capabilities(&self) -> Result<(), String>
pub(crate) fn validate_capabilities(&self) -> Result<(), String>
Validate that all required capabilities are supported by at least one backend.
Sourcepub(crate) fn compatible_backends(&self) -> Vec<GpuBackend>
pub(crate) fn compatible_backends(&self) -> Vec<GpuBackend>
Get backends that support all required capabilities.
Trait Implementations§
Source§impl Debug for GpuKernelArgs
impl Debug for GpuKernelArgs
Auto Trait Implementations§
impl Freeze for GpuKernelArgs
impl RefUnwindSafe for GpuKernelArgs
impl Send for GpuKernelArgs
impl Sync for GpuKernelArgs
impl Unpin for GpuKernelArgs
impl UnwindSafe for GpuKernelArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more