pub struct SubFOperation<'c> { /* private fields */ }
Expand description
A subf
operation. Floating point subtraction operation.
The subf
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 subtraction.
%a = arith.subf %b, %c : f64
// SIMD vector subtraction, e.g. for Intel SSE.
%f = arith.subf %g, %h : vector<4xf32>
// Tensor subtraction.
%x = arith.subf %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> SubFOperation<'c>
impl<'c> SubFOperation<'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>
) -> SubFOperationBuilder<'c, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> SubFOperationBuilder<'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<SubFOperation<'c>> for Operation<'c>
impl<'c> From<SubFOperation<'c>> for Operation<'c>
source§fn from(operation: SubFOperation<'c>) -> Self
fn from(operation: SubFOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for SubFOperation<'c>
impl<'c> !Send for SubFOperation<'c>
impl<'c> !Sync for SubFOperation<'c>
impl<'c> Unpin for SubFOperation<'c>
impl<'c> UnwindSafe for SubFOperation<'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