pub struct AddFOperation<'c> { /* private fields */ }
Expand description
An addf
operation. Floating point addition operation.
The addf
operation takes two operands and returns one result, each of
these is required to be the same type. This type may be a floating point
scalar type, a vector whose element type is a floating point type, or a
floating point tensor.
Example:
// Scalar addition.
%a = arith.addf %b, %c : f64
// SIMD vector addition, e.g. for Intel SSE.
%f = arith.addf %g, %h : vector<4xf32>
// Tensor addition.
%x = arith.addf %y, %z : tensor<4x?xbf16>
TODO: In the distant future, this will accept optional attributes for fast math, contraction, rounding mode, and other controls.
Implementations§
source§impl<'c> AddFOperation<'c>
impl<'c> AddFOperation<'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>
) -> AddFOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> AddFOperationBuilder<'c, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn lhs(&self) -> Result<Value<'c, '_>, Error>
pub fn rhs(&self) -> Result<Value<'c, '_>, Error>
pub fn fastmath(&self) -> Result<Attribute<'c>, Error>
pub fn set_fastmath(&mut self, value: Attribute<'c>)
pub fn remove_fastmath(&mut self) -> Result<(), Error>
Trait Implementations§
source§impl<'c> From<AddFOperation<'c>> for Operation<'c>
impl<'c> From<AddFOperation<'c>> for Operation<'c>
source§fn from(operation: AddFOperation<'c>) -> Self
fn from(operation: AddFOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for AddFOperation<'c>
impl<'c> !Send for AddFOperation<'c>
impl<'c> !Sync for AddFOperation<'c>
impl<'c> Unpin for AddFOperation<'c>
impl<'c> UnwindSafe for AddFOperation<'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