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>)
Trait Implementations§
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.
Auto Trait Implementations§
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