pub struct RoundEvenOperation<'c> { /* private fields */ }
Expand description
A roundeven
operation. Round of the specified value with halfway cases to even.
Syntax:
operation ::= ssa-id `=` `math.roundeven` ssa-use `:` type
The roundeven
operation returns the operand rounded to the nearest integer
value in floating-point format. It takes one operand of floating point type
(i.e., scalar, tensor or vector) and produces one result of the same type. The
operation rounds the argument to the nearest integer value in floating-point
format, rounding halfway cases to even, regardless of the current
rounding direction.
Example:
// Scalar round operation.
%a = math.roundeven %b : f64
Implementations§
source§impl<'c> RoundEvenOperation<'c>
impl<'c> RoundEvenOperation<'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>
) -> RoundEvenOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> RoundEvenOperationBuilder<'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> From<RoundEvenOperation<'c>> for Operation<'c>
impl<'c> From<RoundEvenOperation<'c>> for Operation<'c>
source§fn from(operation: RoundEvenOperation<'c>) -> Self
fn from(operation: RoundEvenOperation<'c>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'c> RefUnwindSafe for RoundEvenOperation<'c>
impl<'c> !Send for RoundEvenOperation<'c>
impl<'c> !Sync for RoundEvenOperation<'c>
impl<'c> Unpin for RoundEvenOperation<'c>
impl<'c> UnwindSafe for RoundEvenOperation<'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