MLIR  20.0.0git
Public Member Functions | Friends | List of all members
mlir::ShapedTypeComponents Class Reference

ShapedTypeComponents that represents the components of a ShapedType. More...

#include "mlir/Interfaces/InferTypeOpInterface.h"

Public Member Functions

 ShapedTypeComponents ()
 Default construction is an unranked shape. More...
 
 ShapedTypeComponents (Type elementType)
 
 ShapedTypeComponents (ShapedType shapedType)
 
 ShapedTypeComponents (ShapeAdaptor adaptor)
 
template<typename Arg , typename = std::enable_if_t< std::is_constructible<ShapeStorageT, Arg>::value>>
 ShapedTypeComponents (Arg &&arg, Type elementType=nullptr, Attribute attr=nullptr)
 
 ShapedTypeComponents (ArrayRef< int64_t > vec, Type elementType=nullptr, Attribute attr=nullptr)
 
ArrayRef< int64_t > getDims () const
 Return the dimensions of the shape. More...
 
bool hasRank () const
 Return whether the shape has a rank. More...
 
Type getElementType () const
 Return the element type component. More...
 
Attribute getAttribute () const
 Return the raw attribute component. More...
 

Friends

class ShapeAdaptor
 

Detailed Description

ShapedTypeComponents that represents the components of a ShapedType.

The components consist of

Definition at line 107 of file InferTypeOpInterface.h.

Constructor & Destructor Documentation

◆ ShapedTypeComponents() [1/6]

mlir::ShapedTypeComponents::ShapedTypeComponents ( )
inline

Default construction is an unranked shape.

Definition at line 113 of file InferTypeOpInterface.h.

◆ ShapedTypeComponents() [2/6]

mlir::ShapedTypeComponents::ShapedTypeComponents ( Type  elementType)
inline

Definition at line 114 of file InferTypeOpInterface.h.

◆ ShapedTypeComponents() [3/6]

mlir::ShapedTypeComponents::ShapedTypeComponents ( ShapedType  shapedType)
inline

Definition at line 116 of file InferTypeOpInterface.h.

◆ ShapedTypeComponents() [4/6]

mlir::ShapedTypeComponents::ShapedTypeComponents ( ShapeAdaptor  adaptor)
inline

◆ ShapedTypeComponents() [5/6]

template<typename Arg , typename = std::enable_if_t< std::is_constructible<ShapeStorageT, Arg>::value>>
mlir::ShapedTypeComponents::ShapedTypeComponents ( Arg &&  arg,
Type  elementType = nullptr,
Attribute  attr = nullptr 
)
inline

Definition at line 130 of file InferTypeOpInterface.h.

◆ ShapedTypeComponents() [6/6]

mlir::ShapedTypeComponents::ShapedTypeComponents ( ArrayRef< int64_t >  vec,
Type  elementType = nullptr,
Attribute  attr = nullptr 
)
inline

Definition at line 134 of file InferTypeOpInterface.h.

Member Function Documentation

◆ getAttribute()

Attribute mlir::ShapedTypeComponents::getAttribute ( ) const
inline

Return the raw attribute component.

Definition at line 153 of file InferTypeOpInterface.h.

◆ getDims()

ArrayRef<int64_t> mlir::ShapedTypeComponents::getDims ( ) const
inline

Return the dimensions of the shape.

Requires: shape is ranked.

Definition at line 141 of file InferTypeOpInterface.h.

Referenced by mlir::ShapeAdaptor::getDimSize().

◆ getElementType()

Type mlir::ShapedTypeComponents::getElementType ( ) const
inline

Return the element type component.

Definition at line 150 of file InferTypeOpInterface.h.

◆ hasRank()

bool mlir::ShapedTypeComponents::hasRank ( ) const
inline

Return whether the shape has a rank.

Definition at line 147 of file InferTypeOpInterface.h.

Friends And Related Function Documentation

◆ ShapeAdaptor

friend class ShapeAdaptor
friend

Definition at line 156 of file InferTypeOpInterface.h.


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