pub struct MultiDimReductionOperation<'c> { /* private fields */ }
Expand description
A multi_reduction
operation. Multi-dimensional reduction operation.
Reduces an n-D vector into an (n-k)-D vector (or a scalar when k == n) using the given operation (add/mul/min/max for int/fp and and/or/xor for int only). Takes an initial accumulator operand.
Example:
%1 = vector.multi_reduction <add>, %0, %acc0 [1, 3] :
vector<4x8x16x32xf32> into vector<4x16xf32>
%2 = vector.multi_reduction <add>, %1, %acc1 [0, 1] :
vector<4x16xf32> into f32
Implementations§
source§impl<'c> MultiDimReductionOperation<'c>
impl<'c> MultiDimReductionOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> MultiDimReductionOperationBuilder<'c, Unset, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> MultiDimReductionOperationBuilder<'c, Unset, Unset, Unset, Unset>
Creates a builder.
pub fn dest(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn source(&self) -> Result<Value<'c, '_>, Error>
pub fn acc(&self) -> Result<Value<'c, '_>, Error>
pub fn kind(&self) -> Result<Attribute<'c>, Error>
pub fn set_kind(&mut self, value: Attribute<'c>)
pub fn reduction_dims(&self) -> Result<ArrayAttribute<'c>, Error>
pub fn set_reduction_dims(&mut self, value: ArrayAttribute<'c>)
Trait Implementations§
source§impl<'c> From<MultiDimReductionOperation<'c>> for Operation<'c>
impl<'c> From<MultiDimReductionOperation<'c>> for Operation<'c>
source§fn from(operation: MultiDimReductionOperation<'c>) -> Self
fn from(operation: MultiDimReductionOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for MultiDimReductionOperation<'c>
impl<'c> !Send for MultiDimReductionOperation<'c>
impl<'c> !Sync for MultiDimReductionOperation<'c>
impl<'c> Unpin for MultiDimReductionOperation<'c>
impl<'c> UnwindSafe for MultiDimReductionOperation<'c>
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