pub enum ComplexRealPrimsDescriptor {
PointwiseUnary {
op: ComplexRealUnaryOp,
},
Reduction {
modes_a: Vec<u32>,
modes_c: Vec<u32>,
unary_op: ComplexRealUnaryOp,
reduction_op: ScalarReductionOp,
},
}Expand description
Descriptor for complex-to-real planning.
§Examples
use tenferro_prims::{ComplexRealPrimsDescriptor, ComplexRealUnaryOp};
let desc = ComplexRealPrimsDescriptor::PointwiseUnary {
op: ComplexRealUnaryOp::Abs,
};
assert!(matches!(desc, ComplexRealPrimsDescriptor::PointwiseUnary { .. }));
let desc = ComplexRealPrimsDescriptor::Reduction {
modes_a: vec![0, 1],
modes_c: vec![1],
unary_op: ComplexRealUnaryOp::Abs,
reduction_op: tenferro_prims::ScalarReductionOp::Sum,
};
assert!(matches!(desc, ComplexRealPrimsDescriptor::Reduction { .. }));Variants§
PointwiseUnary
Apply a complex-to-real unary operation to one input tensor.
Fields
§
op: ComplexRealUnaryOpThe unary operation to apply.
Reduction
Apply a complex-to-real unary map and then reduce over selected axes.
Fields
§
unary_op: ComplexRealUnaryOpThe unary operation to apply before reduction.
§
reduction_op: ScalarReductionOpThe reduction operator to apply to the real-valued result.
Trait Implementations§
Source§impl Clone for ComplexRealPrimsDescriptor
impl Clone for ComplexRealPrimsDescriptor
Source§fn clone(&self) -> ComplexRealPrimsDescriptor
fn clone(&self) -> ComplexRealPrimsDescriptor
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 ComplexRealPrimsDescriptor
impl Debug for ComplexRealPrimsDescriptor
Source§impl Hash for ComplexRealPrimsDescriptor
impl Hash for ComplexRealPrimsDescriptor
impl Eq for ComplexRealPrimsDescriptor
impl StructuralPartialEq for ComplexRealPrimsDescriptor
Auto Trait Implementations§
impl Freeze for ComplexRealPrimsDescriptor
impl RefUnwindSafe for ComplexRealPrimsDescriptor
impl Send for ComplexRealPrimsDescriptor
impl Sync for ComplexRealPrimsDescriptor
impl Unpin for ComplexRealPrimsDescriptor
impl UnwindSafe for ComplexRealPrimsDescriptor
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