MLIR  20.0.0git
Public Types | Public Member Functions | List of all members
mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor Class Reference

Generic adaptor around the root op of this pattern using the converted operands. More...

#include "mlir/Transforms/OneToNTypeConversion.h"

+ Inheritance diagram for mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor:

Public Types

using RangeT = ArrayRef< ValueRange >
 
using BaseT = typename SourceOp::template GenericAdaptor< RangeT >
 
using Properties = typename SourceOp::template InferredProperties< SourceOp >
 

Public Member Functions

 OpAdaptor (const OneToNTypeMapping *operandMapping, const OneToNTypeMapping *resultMapping, const ValueRange *convertedOperands, RangeT values, SourceOp op)
 
const OneToNTypeMappinggetOperandMapping () const
 Get the type mapping of the original operands to the converted operands. More...
 
const OneToNTypeMappinggetResultMapping () const
 Get the type mapping of the original results to the converted results. More...
 
ValueRange getFlatOperands () const
 Get a flat range of all converted operands. More...
 

Detailed Description

template<typename SourceOp>
class mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor

Generic adaptor around the root op of this pattern using the converted operands.

Importantly, each operand is represented as a range of values, namely the N values each original operand gets converted to. Concretely, this makes the result type of the accessor functions of the adaptor class be a ValueRange.

Definition at line 226 of file OneToNTypeConversion.h.

Member Typedef Documentation

◆ BaseT

template<typename SourceOp >
using mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::BaseT = typename SourceOp::template GenericAdaptor<RangeT>

Definition at line 230 of file OneToNTypeConversion.h.

◆ Properties

template<typename SourceOp >
using mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::Properties = typename SourceOp::template InferredProperties<SourceOp>

Definition at line 231 of file OneToNTypeConversion.h.

◆ RangeT

template<typename SourceOp >
using mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::RangeT = ArrayRef<ValueRange>

Definition at line 229 of file OneToNTypeConversion.h.

Constructor & Destructor Documentation

◆ OpAdaptor()

template<typename SourceOp >
mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::OpAdaptor ( const OneToNTypeMapping operandMapping,
const OneToNTypeMapping resultMapping,
const ValueRange convertedOperands,
RangeT  values,
SourceOp  op 
)
inline

Definition at line 233 of file OneToNTypeConversion.h.

Member Function Documentation

◆ getFlatOperands()

template<typename SourceOp >
ValueRange mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::getFlatOperands ( ) const
inline

Get a flat range of all converted operands.

Unlike getOperands, which returns an ArrayRef with one ValueRange for each original operand, this function returns a ValueRange that contains all converted operands irrespectively of which operand they originated from.

Definition at line 251 of file OneToNTypeConversion.h.

◆ getOperandMapping()

template<typename SourceOp >
const OneToNTypeMapping& mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::getOperandMapping ( ) const
inline

Get the type mapping of the original operands to the converted operands.

Definition at line 240 of file OneToNTypeConversion.h.

◆ getResultMapping()

template<typename SourceOp >
const OneToNTypeMapping& mlir::OneToNOpConversionPattern< SourceOp >::OpAdaptor::getResultMapping ( ) const
inline

Get the type mapping of the original results to the converted results.

Definition at line 245 of file OneToNTypeConversion.h.


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