MLIR  16.0.0git
Static Public Member Functions | List of all members
mlir::OpTrait::IsIdempotent< ConcreteType > Class Template Reference

This class adds property that the operation is idempotent. More...

#include "mlir/IR/OpDefinition.h"

+ Inheritance diagram for mlir::OpTrait::IsIdempotent< ConcreteType >:
+ Collaboration diagram for mlir::OpTrait::IsIdempotent< ConcreteType >:

Static Public Member Functions

static LogicalResult verifyTrait (Operation *op)
 
static OpFoldResult foldTrait (Operation *op, ArrayRef< Attribute > operands)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteType, IsIdempotent >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 

Detailed Description

template<typename ConcreteType>
class mlir::OpTrait::IsIdempotent< ConcreteType >

This class adds property that the operation is idempotent.

This means a unary to unary operation "f" that satisfies f(f(x)) = f(x), or a binary operation "g" that satisfies g(x, x) = x.

Definition at line 1133 of file OpDefinition.h.

Member Function Documentation

◆ foldTrait()

template<typename ConcreteType >
static OpFoldResult mlir::OpTrait::IsIdempotent< ConcreteType >::foldTrait ( Operation op,
ArrayRef< Attribute operands 
)
inlinestatic

Definition at line 1148 of file OpDefinition.h.

References mlir::OpTrait::impl::foldIdempotent().

◆ verifyTrait()

template<typename ConcreteType >
static LogicalResult mlir::OpTrait::IsIdempotent< ConcreteType >::verifyTrait ( Operation op)
inlinestatic

The documentation for this class was generated from the following file: