MLIR 22.0.0git
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 >:

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.

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 1186 of file OpDefinition.h.

Member Function Documentation

◆ foldTrait()

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

Definition at line 1201 of file OpDefinition.h.

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

◆ verifyTrait()

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

Definition at line 1188 of file OpDefinition.h.

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


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