/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Interface Declarations                                                     *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

namespace mlir {

/// Allows operations to participate in integer divisibility analysis.
class InferIntDivisibilityOpInterface;

} // namespace mlir
namespace mlir {

/// Allows operations to participate in integer divisibility analysis.
namespace detail {
struct InferIntDivisibilityOpInterfaceInterfaceTraits {
  struct Concept {
    /// The methods defined by the interface.
    void (*inferResultDivisibility)(const Concept *impl, ::mlir::Operation *, ::llvm::ArrayRef<::mlir::IntegerDivisibility>, ::mlir::SetIntDivisibilityFn);
  };
  template<typename ConcreteOp>
  class Model : public Concept {
  public:
    using Interface = ::mlir::InferIntDivisibilityOpInterface;
    Model() : Concept{inferResultDivisibility} {}

    static inline void inferResultDivisibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::ArrayRef<::mlir::IntegerDivisibility> argDivs, ::mlir::SetIntDivisibilityFn setResultDivs);
  };
  template<typename ConcreteOp>
  class FallbackModel : public Concept {
  public:
    using Interface = ::mlir::InferIntDivisibilityOpInterface;
    FallbackModel() : Concept{inferResultDivisibility} {}

    static inline void inferResultDivisibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::ArrayRef<::mlir::IntegerDivisibility> argDivs, ::mlir::SetIntDivisibilityFn setResultDivs);
  };
  template<typename ConcreteModel, typename ConcreteOp>
  class ExternalModel : public FallbackModel<ConcreteModel> {
  public:
    using ConcreteEntity = ConcreteOp;
  };
};
template <typename ConcreteOp>
struct InferIntDivisibilityOpInterfaceTrait;

} // namespace detail
class InferIntDivisibilityOpInterface : public ::mlir::OpInterface<InferIntDivisibilityOpInterface, detail::InferIntDivisibilityOpInterfaceInterfaceTraits> {
public:
  using ::mlir::OpInterface<InferIntDivisibilityOpInterface, detail::InferIntDivisibilityOpInterfaceInterfaceTraits>::OpInterface;
  template <typename ConcreteOp>
  struct Trait : public detail::InferIntDivisibilityOpInterfaceTrait<ConcreteOp> {};

  /// Infer the divisibility of the results of this op given the
  /// divisibility of its arguments. For each result value, the method
  /// should call `setResultDivs` with that `Value` as an argument.
  void inferResultDivisibility(::llvm::ArrayRef<::mlir::IntegerDivisibility> argDivs, ::mlir::SetIntDivisibilityFn setResultDivs);
};

} // namespace mlir
namespace mlir::detail {

  template <typename ConcreteOp>
  struct InferIntDivisibilityOpInterfaceTrait : public ::mlir::OpInterface<InferIntDivisibilityOpInterface, detail::InferIntDivisibilityOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
  };

} // namespace mlir::detail
namespace mlir {

template<typename ConcreteOp>
void detail::InferIntDivisibilityOpInterfaceInterfaceTraits::Model<ConcreteOp>::inferResultDivisibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::ArrayRef<::mlir::IntegerDivisibility> argDivs, ::mlir::SetIntDivisibilityFn setResultDivs) {
  return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).inferResultDivisibility(argDivs, setResultDivs);
}
template<typename ConcreteOp>
void detail::InferIntDivisibilityOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::inferResultDivisibility(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, ::llvm::ArrayRef<::mlir::IntegerDivisibility> argDivs, ::mlir::SetIntDivisibilityFn setResultDivs) {
  return static_cast<const ConcreteOp *>(impl)->inferResultDivisibility(tablegen_opaque_val, argDivs, setResultDivs);
}

} // namespace mlir
