My Project
Static Public Member Functions | List of all members
mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp > Struct Template Reference

#include <OpDefinition.h>

Inheritance diagram for mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp >:
Inheritance graph
[legend]
Collaboration diagram for mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp >:
Collaboration graph
[legend]

Static Public Member Functions

static ClassIDgetInterfaceID ()
 Define an accessor for the ID of this interface. More...
 
static Conceptinstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteOp, Trait >
OperationgetOperation ()
 Return the ultimate Operation being worked on. More...
 
- Static Protected Member Functions inherited from mlir::OpTrait::TraitBase< ConcreteOp, Trait >
static LogicalResult verifyTrait (Operation *op)
 
static AbstractOperation::OperationProperties getTraitProperties ()
 

Detailed Description

template<typename ConcreteType, typename Traits>
template<typename ConcreteOp>
struct mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp >

This is a special trait that registers a given interface with an operation.

Member Function Documentation

◆ getInterfaceID()

template<typename ConcreteType , typename Traits >
template<typename ConcreteOp >
static ClassID* mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp >::getInterfaceID ( )
inlinestatic

Define an accessor for the ID of this interface.

◆ instance()

template<typename ConcreteType , typename Traits >
template<typename ConcreteOp >
static Concept& mlir::OpInterface< ConcreteType, Traits >::Trait< ConcreteOp >::instance ( )
inlinestatic

Provide an accessor to a static instance of the interface model for the concrete operation type. The implementation is inspired from Sean Parent's concept-based polymorphism. A key difference is that the set of classes erased is statically known, which alleviates the need for using dynamic memory allocation. We use a zero-sized templated class Model<ConcreteOp> to emit the virtual table and generate a singleton object for each instantiation of this class.


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