|
MLIR 22.0.0git
|
Range of values and shapes (corresponding effectively to Shapes dialect's ValueShape type concept). More...
#include "mlir/Interfaces/InferTypeOpInterface.h"
Public Types | |
| using | ValueShapeMapFn = function_ref<ShapeAdaptor(Value)> |
| using | type_iterator = ValueTypeIterator<iterator> |
| Returns the types of the values within this range. | |
| using | type_range = ValueTypeRange<ValueRange> |
Public Member Functions | |
| ValueShapeRange (ValueRange values, ValueShapeMapFn operandShape=nullptr, ValueShapeMapFn valueToShape=nullptr) | |
| ValueShapeRange (const std::initializer_list< Value > &values) | |
| ValueShapeRange (const ValueShapeRange &)=default | |
| ValueShapeRange & | setValueToShapeMapping (ValueShapeMapFn fn) |
| Sets the Value to ShapeAdaptor mapping function and returns this. | |
| ValueShapeRange & | setOperandShapeMapping (ValueShapeMapFn fn) |
| ValueShapeMapFn | getValueToShapeMapping () const |
| Returns the set Value to ShapeAdaptor mapping function. | |
| ValueShapeMapFn | getOperandShapeMapping () const |
| type_range | getTypes () const |
| auto | getType () const |
| ValueRange | getValues () const |
| Returns the Values in the ValueRange. | |
| ShapeAdaptor | getValueAsShape (int index) |
| Returns an argument as shape. | |
| ShapeAdaptor | getShape (int index) const |
| Returns the shape of index'th operand. | |
| ShapeAdaptor | getShape (Value val) const |
| Returns the shape of the given Value. | |
Range of values and shapes (corresponding effectively to Shapes dialect's ValueShape type concept).
Definition at line 174 of file InferTypeOpInterface.h.
| using mlir::ValueShapeRange::type_iterator = ValueTypeIterator<iterator> |
Returns the types of the values within this range.
Note: This returns only the types of Values in the ValueRange and not a more refined type.
Definition at line 207 of file InferTypeOpInterface.h.
Definition at line 208 of file InferTypeOpInterface.h.
Definition at line 176 of file InferTypeOpInterface.h.
|
inline |
Definition at line 178 of file InferTypeOpInterface.h.
Referenced by setOperandShapeMapping(), setValueToShapeMapping(), ValueShapeRange(), and ValueShapeRange().
|
inline |
Definition at line 182 of file InferTypeOpInterface.h.
References ValueShapeRange().
|
default |
References ValueShapeRange().
|
inline |
Definition at line 200 of file InferTypeOpInterface.h.
| ShapeAdaptor ValueShapeRange::getShape | ( | int | index | ) | const |
Returns the shape of index'th operand.
Definition at line 221 of file InferTypeOpInterface.cpp.
References getShape().
Referenced by getShape(), and resolveBroadcastShape().
| ShapeAdaptor ValueShapeRange::getShape | ( | Value | val | ) | const |
Returns the shape of the given Value.
Definition at line 214 of file InferTypeOpInterface.cpp.
References mlir::Value::getType().
|
inline |
Definition at line 210 of file InferTypeOpInterface.h.
References getTypes().
|
inline |
Definition at line 209 of file InferTypeOpInterface.h.
Referenced by getType().
| ShapeAdaptor ValueShapeRange::getValueAsShape | ( | int | index | ) |
Returns an argument as shape.
If the argument is not constant or not a shape, then the function returns a nullptr. This will first query the valueToShape mapping (if set), before querying the ValueRange.
Definition at line 200 of file InferTypeOpInterface.cpp.
References mlir::m_Constant(), and mlir::matchPattern().
|
inline |
Returns the Values in the ValueRange.
To query the most up to date shape of a Value, query the shape using getShape below rather than using the type of the Value.
Definition at line 215 of file InferTypeOpInterface.h.
References ValueRange.
|
inline |
Returns the set Value to ShapeAdaptor mapping function.
Definition at line 199 of file InferTypeOpInterface.h.
|
inline |
Definition at line 193 of file InferTypeOpInterface.h.
References ValueShapeRange().
|
inline |
Sets the Value to ShapeAdaptor mapping function and returns this.
Definition at line 188 of file InferTypeOpInterface.h.
References ValueShapeRange().