28 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "mlir/Interfaces/ParallelCombiningOpInterface.h"10 11using namespace mlir;12 13//===----------------------------------------------------------------------===//14// InParallelOpInterface (formerly ParallelCombiningOpInterface)15//===----------------------------------------------------------------------===//16 17// TODO: Single region single block interface on interfaces ?18LogicalResult mlir::detail::verifyInParallelOpInterface(Operation *op) {19 if (op->getNumRegions() != 1)20 return op->emitError("expected single region op");21 if (!op->getRegion(0).hasOneBlock())22 return op->emitError("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