13 #ifndef MLIR_INTERFACES_VIEWLIKEINTERFACE_H_ 14 #define MLIR_INTERFACES_VIEWLIKEINTERFACE_H_ 32 class OffsetSizeAndStrideOpInterface;
37 ArrayAttr staticOffsets,
43 ArrayAttr staticSizes,
49 ArrayAttr staticStrides,
56 OffsetSizeAndStrideOpInterface a, OffsetSizeAndStrideOpInterface b,
62 #include "mlir/Interfaces/ViewLikeInterface.h.inc" 110 ArrayAttr &integers);
128 ArrayAttr &integers);
133 Operation *op, StringRef name,
unsigned expectedNumElements, ArrayAttr attr,
138 #endif // MLIR_INTERFACES_VIEWLIKEINTERFACE_H_ Include the generated interface declarations.
SmallVector< OpFoldResult, 4 > getMixedOffsets(OffsetSizeAndStrideOpInterface op, ArrayAttr staticOffsets, ValueRange offsets)
Return a vector of all the static or dynamic offsets of the op from provided external static and dyna...
Operation is a basic unit of execution within MLIR.
void printOperandsOrIntegersOffsetsOrStridesList(OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayAttr integers)
Printer hook for custom directive in assemblyFormat.
ParseResult parseOperandsOrIntegersOffsetsOrStridesList(OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, ArrayAttr &integers)
Pasrer hook for custom directive in assemblyFormat.
This class represents a single result from folding an operation.
The OpAsmParser has methods for interacting with the asm parser: parsing things from it...
LogicalResult verifyListOfOperandsOrIntegers(Operation *op, StringRef name, unsigned expectedNumElements, ArrayAttr attr, ValueRange values, llvm::function_ref< bool(int64_t)> isDynamic)
Verify that a the values has as many elements as the number of entries in attr for which isDynamic ev...
Auxiliary range data structure to unpack the offset, size and stride operands into a list of triples...
void printOperandsOrIntegersSizesList(OpAsmPrinter &printer, Operation *op, OperandRange values, ArrayAttr integers)
Printer hook for custom directive in assemblyFormat.
This class represents an efficient way to signal success or failure.
SmallVector< OpFoldResult, 4 > getMixedSizes(OffsetSizeAndStrideOpInterface op, ArrayAttr staticSizes, ValueRange sizes)
Return a vector of all the static or dynamic sizes of the op from provided external static and dynami...
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom p...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
static bool sameOffsetsSizesAndStrides(tensor::ExtractSliceOp s, tensor::InsertSliceOp si)
Return true is all offsets, sizes and strides are equal.
This class implements the operand iterators for the Operation class.
LogicalResult verifyOffsetSizeAndStrideOp(OffsetSizeAndStrideOpInterface op)
This class represents success/failure for parsing-like operations that find it important to chain tog...
This class provides an abstraction over the different types of ranges over Values.
SmallVector< OpFoldResult, 4 > getMixedStrides(OffsetSizeAndStrideOpInterface op, ArrayAttr staticStrides, ValueRange strides)
Return a vector of all the static or dynamic strides of the op from provided external static and dyna...
ParseResult parseOperandsOrIntegersSizesList(OpAsmParser &parser, SmallVectorImpl< OpAsmParser::UnresolvedOperand > &values, ArrayAttr &integers)
Pasrer hook for custom directive in assemblyFormat.