14#include "llvm/Support/InterleavedRange.h"
28 elements.push_back(value);
33 "parsing values in integer list attribute")) {
37 auto i32Type = IntegerType::get(parser.
getContext(), 32);
46 printer << llvm::interleaved_array(
47 llvm::map_range(attr.getValues<APInt>(),
48 [](
const APInt &a) { return a.getSExtValue(); }));
@ Square
Square brackets surrounding zero or more operands.
virtual ParseResult parseCommaSeparatedList(Delimiter delimiter, function_ref< ParseResult()> parseElementFn, StringRef contextMessage=StringRef())=0
Parse a list of comma-separated items with an optional delimiter.
MLIRContext * getContext() const
ParseResult parseInteger(IntT &result)
Parse an integer value from the stream.
An attribute that represents a reference to a dense integer vector or tensor object.
static DenseIntElementsAttr get(const ShapedType &type, Arg &&arg)
Get an instance of a DenseIntElementsAttr with the given arguments.
The OpAsmParser has methods for interacting with the asm parser: parsing things from it,...
This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom p...
Operation is the basic unit of execution within MLIR.
static TensorArmType get(ArrayRef< int64_t > shape, Type elementType)
void printSPIRV_I32_1DArmTensor(OpAsmPrinter &printer, Operation *, DenseIntElementsAttr attr)
ParseResult parseSPIRV_I32_1DArmTensor(OpAsmParser &parser, DenseIntElementsAttr &attr)