pub struct FmaOperation<'c> { /* private fields */ }
Expand description
A fma
operation. Floating point fused multipy-add operation.
Syntax:
operation ::= ssa-id `=` `math.fma` ssa-use `,` ssa-use `,` ssa-use `:` type
The fma
operation takes three operands and returns one result, each of
these is required to be the same type. Operands must be of floating point type
(i.e., scalar, tensor or vector).
Example:
// Scalar fused multiply-add: d = a*b + c
%d = math.fma %a, %b, %c : f64
The semantics of the operation correspond to those of the llvm.fma
intrinsic. In the
particular case of lowering to LLVM, this is guaranteed to lower
to the llvm.fma.*
intrinsic.
Implementations§
source§impl<'c> FmaOperation<'c>
impl<'c> FmaOperation<'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>
) -> FmaOperationBuilder<'c, Unset, Unset, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> FmaOperationBuilder<'c, Unset, Unset, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn a(&self) -> Result<Value<'c, '_>, Error>
pub fn b(&self) -> Result<Value<'c, '_>, Error>
pub fn c(&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<FmaOperation<'c>> for Operation<'c>
impl<'c> From<FmaOperation<'c>> for Operation<'c>
source§fn from(operation: FmaOperation<'c>) -> Self
fn from(operation: FmaOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for FmaOperation<'c>
impl<'c> !Send for FmaOperation<'c>
impl<'c> !Sync for FmaOperation<'c>
impl<'c> Unpin for FmaOperation<'c>
impl<'c> UnwindSafe for FmaOperation<'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