pub struct FMAOperation<'c> { /* private fields */ }
Expand description
A fma
operation. Vector fused multiply-add.
Multiply-add expressions operate on n-D vectors and compute a fused
pointwise multiply-and-accumulate: $result =
$lhs * $rhs + $acc. All operands and result have the same vector type. The semantics of the operation correspond to those of the
llvm.fma[intrinsic](https://llvm.org/docs/LangRef.html#int-fma). In the particular case of lowering to LLVM, this is guaranteed to lower to the
llvm.fma.*` intrinsic.
Example:
%3 = vector.fma %0, %1, %2: vector<8x16xf32>
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, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> FMAOperationBuilder<'c, Unset, Unset, 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 acc(&self) -> Result<Value<'c, '_>, 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