pub enum Refusal {
Integer,
NotFloat,
NoF64,
Unsupported(&'static str),
Declined,
TooSmall,
Failed(String),
}Expand description
Why a fused node ran on the CPU although a device was asked for.
Every one of these is a statement about the kernel or its data, decided
before any work happens, except Failed, which is the
device itself refusing at run time. A fallback is always correct and only
ever slower.
Variants§
Integer
The kernel’s working type is i64. WGSL has no 64-bit integer arithmetic on most adapters, so integer chains stay on the CPU.
NotFloat
The chain’s result is not f64 — a comparison at the root, a tally. Narrowing a device result is not worth the risk this phase.
NoF64
The adapter has no f64 in shaders and the caller did not ask for f32. See the module note on precision.
Unsupported(&'static str)
The generator does not cover one of the chain’s operations at this precision.
Declined
The kernel itself would decline these inputs, device or no device.
TooSmall
Too little data to pay for a dispatch.
Failed(String)
The device refused: an allocation, a shader, a queue submission.
Implementations§
Trait Implementations§
impl Eq for Refusal
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Freeze for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more