pub struct PrimitiveOpDescriptor {
pub kind: PrimitiveOpKind,
pub name: &'static str,
pub category: OpCategory,
pub dtype_policy: DTypePolicy,
pub min_inputs: u8,
pub max_inputs: u8,
pub host_only: bool,
}Expand description
Static metadata for one core primitive operation.
§Examples
use tenferro_core_ops::{descriptor, PrimitiveOpKind};
let add = descriptor(PrimitiveOpKind::Add);
assert_eq!(add.min_inputs, 2);
assert_eq!(add.max_inputs, 2);Fields§
§kind: PrimitiveOpKindCatalog key for this operation.
name: &'static strStable snake-case operation name for diagnostics and descriptors.
category: OpCategoryBroad execution category.
dtype_policy: DTypePolicyDtype compatibility policy.
min_inputs: u8Minimum number of inputs accepted by the op.
max_inputs: u8Maximum number of inputs accepted by the op.
host_only: boolWhether this op is executed by host/runtime logic rather than a tensor backend.
Trait Implementations§
Source§impl Clone for PrimitiveOpDescriptor
impl Clone for PrimitiveOpDescriptor
Source§fn clone(&self) -> PrimitiveOpDescriptor
fn clone(&self) -> PrimitiveOpDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrimitiveOpDescriptor
impl Debug for PrimitiveOpDescriptor
Source§impl Hash for PrimitiveOpDescriptor
impl Hash for PrimitiveOpDescriptor
Source§impl PartialEq for PrimitiveOpDescriptor
impl PartialEq for PrimitiveOpDescriptor
impl Copy for PrimitiveOpDescriptor
impl Eq for PrimitiveOpDescriptor
impl StructuralPartialEq for PrimitiveOpDescriptor
Auto Trait Implementations§
impl Freeze for PrimitiveOpDescriptor
impl RefUnwindSafe for PrimitiveOpDescriptor
impl Send for PrimitiveOpDescriptor
impl Sync for PrimitiveOpDescriptor
impl Unpin for PrimitiveOpDescriptor
impl UnsafeUnpin for PrimitiveOpDescriptor
impl UnwindSafe for PrimitiveOpDescriptor
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