MLIR
22.0.0git
lib
Interfaces
InferStridedMetadataInterface.cpp
Go to the documentation of this file.
1
//===- InferStridedMetadataInterface.cpp - Strided md inference interface -===//
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
#include "
mlir/Interfaces/InferStridedMetadataInterface.h
"
10
#include "
mlir/IR/BuiltinTypes.h
"
11
#include "
mlir/IR/TypeUtilities.h
"
12
#include <optional>
13
14
using namespace
mlir
;
15
16
#include "mlir/Interfaces/InferStridedMetadataInterface.cpp.inc"
17
18
void
StridedMetadataRange::print
(
raw_ostream
&os)
const
{
19
if
(
isUninitialized
()) {
20
os <<
"strided_metadata<None>"
;
21
return
;
22
}
23
os <<
"strided_metadata<offset = ["
;
24
llvm::interleaveComma(*offsets, os, [&](
const
ConstantIntRanges
&range) {
25
os <<
"{"
<< range <<
"}"
;
26
});
27
os <<
"], sizes = ["
;
28
llvm::interleaveComma(sizes, os, [&](
const
ConstantIntRanges
&range) {
29
os <<
"{"
<< range <<
"}"
;
30
});
31
os <<
"], strides = ["
;
32
llvm::interleaveComma(strides, os, [&](
const
ConstantIntRanges
&range) {
33
os <<
"{"
<< range <<
"}"
;
34
});
35
os <<
"]>"
;
36
}
InferStridedMetadataInterface.h
TypeUtilities.h
mlir::ConstantIntRanges
A set of arbitrary-precision integers representing bounds on a given integer value.
Definition
InferIntRangeInterface.h:27
mlir::StridedMetadataRange::isUninitialized
bool isUninitialized() const
Returns whether the metadata is uninitialized.
Definition
InferStridedMetadataInterface.h:56
mlir::StridedMetadataRange::print
void print(raw_ostream &os) const
Print the strided metadata range.
Definition
InferStridedMetadataInterface.cpp:18
mlir::raw_ostream
BuiltinTypes.h
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
Generated on
for MLIR by
1.14.0