pub struct NegFOperation<'c> { /* private fields */ }Expand description
A negf operation. Floating point negation.
The negf operation computes the negation of a given value. It takes one
operand and returns one result of the same type. This type may be a float
scalar type, a vector whose element type is float, or a tensor of floats.
It has no standard attributes.
Example:
// Scalar negation value.
%a = arith.negf %b : f64
// SIMD vector element-wise negation value.
%f = arith.negf %g : vector<4xf32>
// Tensor element-wise negation value.
%x = arith.negf %y : tensor<4x?xf8>Implementations§
Source§impl<'c> NegFOperation<'c>
impl<'c> NegFOperation<'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>,
) -> NegFOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c>, ) -> NegFOperationBuilder<'c, Unset>
Creates a builder.
pub fn result(&self) -> Result<OperationResult<'c, '_>, Error>
pub fn operand(&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> Clone for NegFOperation<'c>
impl<'c> Clone for NegFOperation<'c>
Source§fn clone(&self) -> NegFOperation<'c>
fn clone(&self) -> NegFOperation<'c>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'c> Debug for NegFOperation<'c>
impl<'c> Debug for NegFOperation<'c>
Source§impl<'b> From<NegFOperation<'b>> for ArithDialectOperation<'b>
impl<'b> From<NegFOperation<'b>> for ArithDialectOperation<'b>
Source§fn from(op: NegFOperation<'b>) -> Self
fn from(op: NegFOperation<'b>) -> Self
Converts to this type from the input type.
Source§impl<'c> From<NegFOperation<'c>> for Operation<'c>
impl<'c> From<NegFOperation<'c>> for Operation<'c>
Source§fn from(operation: NegFOperation<'c>) -> Self
fn from(operation: NegFOperation<'c>) -> Self
Converts to this type from the input type.
Source§impl<'c> PartialEq for NegFOperation<'c>
impl<'c> PartialEq for NegFOperation<'c>
Source§impl<'c> TryFrom<Operation<'c>> for NegFOperation<'c>
impl<'c> TryFrom<Operation<'c>> for NegFOperation<'c>
impl<'c> Eq for NegFOperation<'c>
impl<'c> StructuralPartialEq for NegFOperation<'c>
Auto Trait Implementations§
impl<'c> Freeze for NegFOperation<'c>
impl<'c> RefUnwindSafe for NegFOperation<'c>
impl<'c> !Send for NegFOperation<'c>
impl<'c> !Sync for NegFOperation<'c>
impl<'c> Unpin for NegFOperation<'c>
impl<'c> UnwindSafe for NegFOperation<'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