pub struct CapabilityQuery {
pub op: PrimitiveOpKind,
pub dtype: DType,
}Expand description
Query key for a backend capability lookup.
§Examples
use tenferro_core_ops::PrimitiveOpKind;
use tenferro_tensor::{CapabilityQuery, DType};
let query = CapabilityQuery::new(PrimitiveOpKind::Add, DType::F32);
assert_eq!(query.dtype, DType::F32);Fields§
§op: PrimitiveOpKind§dtype: DTypeImplementations§
Source§impl CapabilityQuery
impl CapabilityQuery
Sourcepub const fn new(op: PrimitiveOpKind, dtype: DType) -> Self
pub const fn new(op: PrimitiveOpKind, dtype: DType) -> Self
Build a capability lookup key.
§Examples
use tenferro_core_ops::PrimitiveOpKind;
use tenferro_tensor::{CapabilityQuery, DType};
assert_eq!(
CapabilityQuery::new(PrimitiveOpKind::Mul, DType::I64).op,
PrimitiveOpKind::Mul
);Trait Implementations§
Source§impl Clone for CapabilityQuery
impl Clone for CapabilityQuery
Source§fn clone(&self) -> CapabilityQuery
fn clone(&self) -> CapabilityQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CapabilityQuery
Source§impl Debug for CapabilityQuery
impl Debug for CapabilityQuery
impl Eq for CapabilityQuery
Source§impl Hash for CapabilityQuery
impl Hash for CapabilityQuery
Source§impl PartialEq for CapabilityQuery
impl PartialEq for CapabilityQuery
impl StructuralPartialEq for CapabilityQuery
Auto Trait Implementations§
impl Freeze for CapabilityQuery
impl RefUnwindSafe for CapabilityQuery
impl Send for CapabilityQuery
impl Sync for CapabilityQuery
impl Unpin for CapabilityQuery
impl UnsafeUnpin for CapabilityQuery
impl UnwindSafe for CapabilityQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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