MLIR 22.0.0git
mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT > Class Template Reference

Helper StructuredGenerator class to manipulate and rewrite ops with StructuredOpInterface. More...

#include "mlir/Dialect/Utils/StructuredOpsUtils.h"

Classes

struct  IteratorType
struct  Par
struct  Red

Public Types

using MapList = ArrayRef<ArrayRef<AffineExpr>>

Public Member Functions

 StructuredGenerator (RewriterBase &rewriter, StructuredOpInterface op)
bool iters (ArrayRef< IteratorType > its)
bool layout (MapList l)

Protected Attributes

RewriterBaserewriter
MLIRContextctx
Location loc
SmallVector< IteratorTypeT > iterators
SmallVector< AffineMap, 4 > maps
Operationop

Detailed Description

template<typename StructuredOpInterface, typename IteratorTypeT>
class mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >

Helper StructuredGenerator class to manipulate and rewrite ops with StructuredOpInterface.

This is templated for now because VectorOps do not yet implement the StructuredOpInterface itself.

Definition at line 90 of file StructuredOpsUtils.h.

Member Typedef Documentation

◆ MapList

template<typename StructuredOpInterface, typename IteratorTypeT>
using mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::MapList = ArrayRef<ArrayRef<AffineExpr>>

Definition at line 92 of file StructuredOpsUtils.h.

Constructor & Destructor Documentation

◆ StructuredGenerator()

template<typename StructuredOpInterface, typename IteratorTypeT>
mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::StructuredGenerator ( RewriterBase & rewriter,
StructuredOpInterface op )
inline

Definition at line 108 of file StructuredOpsUtils.h.

References ctx, getContext(), iterators, loc, maps, op, and rewriter.

Member Function Documentation

◆ iters()

template<typename StructuredOpInterface, typename IteratorTypeT>
bool mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::iters ( ArrayRef< IteratorType > its)
inline

Definition at line 113 of file StructuredOpsUtils.h.

References iterators.

◆ layout()

template<typename StructuredOpInterface, typename IteratorTypeT>
bool mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::layout ( MapList l)
inline

Definition at line 123 of file StructuredOpsUtils.h.

References ctx, mlir::AffineMap::inferFromExprList(), and maps.

Member Data Documentation

◆ ctx

template<typename StructuredOpInterface, typename IteratorTypeT>
MLIRContext* mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::ctx
protected

Definition at line 132 of file StructuredOpsUtils.h.

Referenced by layout(), and StructuredGenerator().

◆ iterators

template<typename StructuredOpInterface, typename IteratorTypeT>
SmallVector<IteratorTypeT> mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::iterators
protected

Definition at line 134 of file StructuredOpsUtils.h.

Referenced by iters(), and StructuredGenerator().

◆ loc

template<typename StructuredOpInterface, typename IteratorTypeT>
Location mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::loc
protected

Definition at line 133 of file StructuredOpsUtils.h.

Referenced by StructuredGenerator().

◆ maps

template<typename StructuredOpInterface, typename IteratorTypeT>
SmallVector<AffineMap, 4> mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::maps
protected

Definition at line 135 of file StructuredOpsUtils.h.

Referenced by layout(), and StructuredGenerator().

◆ op

template<typename StructuredOpInterface, typename IteratorTypeT>
Operation* mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::op
protected

Definition at line 136 of file StructuredOpsUtils.h.

Referenced by StructuredGenerator().

◆ rewriter

template<typename StructuredOpInterface, typename IteratorTypeT>
RewriterBase& mlir::StructuredGenerator< StructuredOpInterface, IteratorTypeT >::rewriter
protected

Definition at line 131 of file StructuredOpsUtils.h.

Referenced by StructuredGenerator().


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