pub enum ScalarPrimsDescriptor {
PointwiseUnary {
op: ScalarUnaryOp,
},
PointwiseBinary {
op: ScalarBinaryOp,
},
PointwiseTernary {
op: ScalarTernaryOp,
},
Reduction {
modes_a: Vec<u32>,
modes_c: Vec<u32>,
op: ScalarReductionOp,
},
}Expand description
Descriptor for scalar-pointwise and scalar-reduction planning.
§Examples
use tenferro_prims::{ScalarPrimsDescriptor, ScalarUnaryOp};
let desc = ScalarPrimsDescriptor::PointwiseUnary {
op: ScalarUnaryOp::Reciprocal,
};
assert!(matches!(desc, ScalarPrimsDescriptor::PointwiseUnary { .. }));Variants§
PointwiseUnary
Apply a unary pointwise operation to one input tensor.
Fields
§
op: ScalarUnaryOpThe unary scalar operation to apply.
PointwiseBinary
Apply a binary pointwise operation to two input tensors.
Fields
§
op: ScalarBinaryOpThe binary scalar operation to apply.
PointwiseTernary
Apply a ternary pointwise operation to three input tensors.
Fields
§
op: ScalarTernaryOpThe ternary scalar operation to apply.
Reduction
Reduce one tensor into an output tensor over the dropped modes.
Trait Implementations§
Source§impl Clone for ScalarPrimsDescriptor
impl Clone for ScalarPrimsDescriptor
Source§fn clone(&self) -> ScalarPrimsDescriptor
fn clone(&self) -> ScalarPrimsDescriptor
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 ScalarPrimsDescriptor
impl Debug for ScalarPrimsDescriptor
Source§impl Hash for ScalarPrimsDescriptor
impl Hash for ScalarPrimsDescriptor
Source§impl PartialEq for ScalarPrimsDescriptor
impl PartialEq for ScalarPrimsDescriptor
impl Eq for ScalarPrimsDescriptor
impl StructuralPartialEq for ScalarPrimsDescriptor
Auto Trait Implementations§
impl Freeze for ScalarPrimsDescriptor
impl RefUnwindSafe for ScalarPrimsDescriptor
impl Send for ScalarPrimsDescriptor
impl Sync for ScalarPrimsDescriptor
impl Unpin for ScalarPrimsDescriptor
impl UnwindSafe for ScalarPrimsDescriptor
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,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
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