pub enum GpuEligibility {
BackendNotCompiled,
WorkloadBelowThreshold,
Eligible,
}Expand description
Joint eligibility state for a GPU kernel at the call site.
Callers construct exactly one variant, which encodes both the compile-time
backend presence and the runtime workload threshold check. Replacing the
former (supported: bool, large_enough: bool) pair removes the possibility
of silently swapping the two flags at a call site: each meaningful state
has exactly one constructor and the match inside decide is total.
Variants§
BackendNotCompiled
Vendor backend is not compiled into this build for this kernel.
WorkloadBelowThreshold
Backend is compiled in, but the workload (n, m, …) is below the runtime threshold for this kernel.
Eligible
Backend is compiled in and the workload is large enough; the only remaining gates are policy and runtime probe.
Implementations§
Source§impl GpuEligibility
impl GpuEligibility
Sourcepub const fn from_flags(supported: bool, large_enough: bool) -> Self
pub const fn from_flags(supported: bool, large_enough: bool) -> Self
Combine the compile-time backend flag with the workload predicate into the canonical joint state. Use this only when you genuinely have two independent booleans; otherwise prefer constructing a variant directly.
Trait Implementations§
Source§impl Clone for GpuEligibility
impl Clone for GpuEligibility
Source§fn clone(&self) -> GpuEligibility
fn clone(&self) -> GpuEligibility
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GpuEligibility
Source§impl Debug for GpuEligibility
impl Debug for GpuEligibility
impl Eq for GpuEligibility
Source§impl PartialEq for GpuEligibility
impl PartialEq for GpuEligibility
Source§fn eq(&self, other: &GpuEligibility) -> bool
fn eq(&self, other: &GpuEligibility) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GpuEligibility
Auto Trait Implementations§
impl Freeze for GpuEligibility
impl RefUnwindSafe for GpuEligibility
impl Send for GpuEligibility
impl Sync for GpuEligibility
impl Unpin for GpuEligibility
impl UnsafeUnpin for GpuEligibility
impl UnwindSafe for GpuEligibility
Blanket Implementations§
impl<T> Boilerplate for T
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<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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