1//===- ParallelCombiningOpInterface.cpp - Parallel combining op 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/ParallelCombiningOpInterface.h"
10
11using namespace mlir;
12
13//===----------------------------------------------------------------------===//
14// ParallelCombiningOpInterface
15//===----------------------------------------------------------------------===//
16
17// TODO: Single region single block interface on interfaces ?
18LogicalResult mlir::detail::verifyParallelCombiningOpInterface(Operation *op) {
19 if (op->getNumRegions() != 1)
20 return op->emitError(message: "expected single region op");
21 if (!op->getRegion(index: 0).hasOneBlock())
22 return op->emitError(message: "expected single block op region");
23 return success();
24}
25
26/// Include the definitions of the interface.
27#include "mlir/Interfaces/ParallelCombiningOpInterface.cpp.inc"
28

source code of mlir/lib/Interfaces/ParallelCombiningOpInterface.cpp