1 //===- ShapedOpInterfaces.cpp - Interfaces for Shaped Ops -----------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "mlir/Interfaces/ShapedOpInterfaces.h"
13 //===----------------------------------------------------------------------===//
14 // ShapedDimOpInterface
15 //===----------------------------------------------------------------------===//
17 LogicalResult
mlir::detail::verifyShapedDimOpInterface(Operation
*op
) {
18 if (op
->getNumResults() != 1)
19 return op
->emitError("expected single op result");
20 if (!op
->getResult(0).getType().isIndex())
21 return op
->emitError("expect index result type");
25 /// Include the definitions of the interface.
26 #include "mlir/Interfaces/ShapedOpInterfaces.cpp.inc"