blob: 5eda355f56d439e7b249a6b46187b0091be32199 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
//===- ShapedOpInterfaces.cpp - Interfaces for Shaped Ops -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "mlir/Interfaces/ShapedOpInterfaces.h"
using namespace mlir;
//===----------------------------------------------------------------------===//
// ShapedDimOpInterface
//===----------------------------------------------------------------------===//
LogicalResult mlir::detail::verifyShapedDimOpInterface(Operation *op) {
if (op->getNumResults() != 1)
return op->emitError("expected single op result");
if (!op->getResult(0).getType().isIndex())
return op->emitError("expect index result type");
return success();
}
/// Include the definitions of the interface.
#include "mlir/Interfaces/ShapedOpInterfaces.cpp.inc"
|