/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// An interface for ops that return the dimension of a shaped value (such as a /// tensor or a memref). It provides access to the source shaped value and to /// the dimension. class ShapedDimOpInterface; } // namespace mlir namespace mlir { /// An interface for ops that return the dimension of a shaped value (such as a /// tensor or a memref). It provides access to the source shaped value and to /// the dimension. namespace detail { struct ShapedDimOpInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::mlir::Value (*getShapedValue)(const Concept *impl, ::mlir::Operation *); ::mlir::OpFoldResult (*getDimension)(const Concept *impl, ::mlir::Operation *); }; template class Model : public Concept { public: using Interface = ::mlir::ShapedDimOpInterface; Model() : Concept{getShapedValue, getDimension} {} static inline ::mlir::Value getShapedValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val); static inline ::mlir::OpFoldResult getDimension(const Concept *impl, ::mlir::Operation *tablegen_opaque_val); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::ShapedDimOpInterface; FallbackModel() : Concept{getShapedValue, getDimension} {} static inline ::mlir::Value getShapedValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val); static inline ::mlir::OpFoldResult getDimension(const Concept *impl, ::mlir::Operation *tablegen_opaque_val); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteOp; }; }; template struct ShapedDimOpInterfaceTrait; } // namespace detail class ShapedDimOpInterface : public ::mlir::OpInterface { public: using ::mlir::OpInterface::OpInterface; template struct Trait : public detail::ShapedDimOpInterfaceTrait {}; /// Return the shaped value operand. This is the value that the dimension /// is taken from. ::mlir::Value getShapedValue(); /// Return the dimension operand. This can be a constant or an SSA value. ::mlir::OpFoldResult getDimension(); }; } // namespace mlir namespace mlir::detail { template struct ShapedDimOpInterfaceTrait : public ::mlir::OpInterface::Trait { static ::llvm::LogicalResult verifyTrait(::mlir::Operation *op) { return verifyShapedDimOpInterface(op); } }; } // namespace mlir::detail namespace mlir { template ::mlir::Value detail::ShapedDimOpInterfaceInterfaceTraits::Model::getShapedValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) { return (llvm::cast(tablegen_opaque_val)).getShapedValue(); } template ::mlir::OpFoldResult detail::ShapedDimOpInterfaceInterfaceTraits::Model::getDimension(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) { return (llvm::cast(tablegen_opaque_val)).getDimension(); } template ::mlir::Value detail::ShapedDimOpInterfaceInterfaceTraits::FallbackModel::getShapedValue(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) { return static_cast(impl)->getShapedValue(tablegen_opaque_val); } template ::mlir::OpFoldResult detail::ShapedDimOpInterfaceInterfaceTraits::FallbackModel::getDimension(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) { return static_cast(impl)->getDimension(tablegen_opaque_val); } } // namespace mlir