MLIR 22.0.0git
LvlTypeParser.h
Go to the documentation of this file.
1//===- LvlTypeParser.h - `LevelType` parser ------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef MLIR_DIALECT_SPARSETENSOR_IR_DETAIL_LVLTYPEPARSER_H
10#define MLIR_DIALECT_SPARSETENSOR_IR_DETAIL_LVLTYPEPARSER_H
11
13
14namespace mlir {
15namespace sparse_tensor {
16namespace ir_detail {
17
19public:
20 LvlTypeParser() = default;
21 FailureOr<uint64_t> parseLvlType(AsmParser &parser) const;
22
23private:
24 ParseResult parseProperty(AsmParser &parser, uint64_t *properties) const;
25 ParseResult parseStructured(AsmParser &parser,
26 SmallVector<unsigned> *structured) const;
27};
28
29} // namespace ir_detail
30} // namespace sparse_tensor
31} // namespace mlir
32
33#endif // MLIR_DIALECT_SPARSETENSOR_IR_DETAIL_LVLTYPEPARSER_H
This base class exposes generic asm parser hooks, usable across the various derived parsers.
FailureOr< uint64_t > parseLvlType(AsmParser &parser) const
Include the generated interface declarations.