MLIR 22.0.0git
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.
 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_tgetDims () const
 Return the dimensions of the shape.
bool hasRank () const
 Return whether the shape has a rank.
Type getElementType () const
 Return the element type component.
Attribute getAttribute () const
 Return the raw attribute component.

Friends

class ShapeAdaptor

Detailed Description

ShapedTypeComponents that represents the components of a ShapedType.

The components consist of

  • A ranked or unranked shape with the dimension specification match those of ShapeType's getShape() (e.g., dynamic dimension represented using ShapedType::kDynamic)
  • A element type, may be unset (nullptr)
  • A attribute, may be unset (nullptr) Used by ShapedType type inferences.

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.

References nullptr.

◆ ShapedTypeComponents() [2/6]

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

Definition at line 114 of file InferTypeOpInterface.h.

References false, and nullptr.

◆ ShapedTypeComponents() [3/6]

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

Definition at line 116 of file InferTypeOpInterface.h.

References nullptr.

◆ 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.

References true.

◆ 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.

References true.

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.

◆ 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.

◆ ShapeAdaptor

friend class ShapeAdaptor
friend

Definition at line 156 of file InferTypeOpInterface.h.

References ShapeAdaptor.

Referenced by ShapeAdaptor, and ShapedTypeComponents().


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