Files
gps/tools/local/circt/include/mlir/Dialect/Arith/IR/ArithOpsInterfaces.h.inc
T
2026-07-12 11:01:51 +03:00

533 lines
23 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Interface Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir::arith {
/// Access to operation fastmath flags.
class ArithFastMathInterface;
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op integer overflow flags.
class ArithIntegerOverflowFlagsInterface;
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op non-negative (nneg) flag.
class ArithNonNegFlagInterface;
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op rounding mode.
class ArithRoundingModeInterface;
} // namespace mlir::arith
namespace mlir::arith {
/// Access to operation fastmath flags.
namespace detail {
struct ArithFastMathInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
FastMathFlagsAttr (*getFastMathFlagsAttr)(const Concept *impl, ::mlir::Operation *);
StringRef (*getFastMathAttrName)();
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::arith::ArithFastMathInterface;
Model() : Concept{getFastMathFlagsAttr, getFastMathAttrName} {}
static inline FastMathFlagsAttr getFastMathFlagsAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getFastMathAttrName();
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::arith::ArithFastMathInterface;
FallbackModel() : Concept{getFastMathFlagsAttr, getFastMathAttrName} {}
static inline FastMathFlagsAttr getFastMathFlagsAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getFastMathAttrName();
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
FastMathFlagsAttr getFastMathFlagsAttr(::mlir::Operation *tablegen_opaque_val) const;
static StringRef getFastMathAttrName();
};
};
template <typename ConcreteOp>
struct ArithFastMathInterfaceTrait;
} // namespace detail
class ArithFastMathInterface : public ::mlir::OpInterface<ArithFastMathInterface, detail::ArithFastMathInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<ArithFastMathInterface, detail::ArithFastMathInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::ArithFastMathInterfaceTrait<ConcreteOp> {};
/// Returns a FastMathFlagsAttr attribute for the operation
FastMathFlagsAttr getFastMathFlagsAttr();
/// Returns the name of the FastMathFlagsAttr attribute
/// for the operation
StringRef getFastMathAttrName();
};
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op integer overflow flags.
namespace detail {
struct ArithIntegerOverflowFlagsInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
IntegerOverflowFlagsAttr (*getOverflowAttr)(const Concept *impl, ::mlir::Operation *);
bool (*hasNoUnsignedWrap)(const Concept *impl, ::mlir::Operation *);
bool (*hasNoSignedWrap)(const Concept *impl, ::mlir::Operation *);
StringRef (*getIntegerOverflowAttrName)();
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::arith::ArithIntegerOverflowFlagsInterface;
Model() : Concept{getOverflowAttr, hasNoUnsignedWrap, hasNoSignedWrap, getIntegerOverflowAttrName} {}
static inline IntegerOverflowFlagsAttr getOverflowAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline bool hasNoUnsignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline bool hasNoSignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getIntegerOverflowAttrName();
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::arith::ArithIntegerOverflowFlagsInterface;
FallbackModel() : Concept{getOverflowAttr, hasNoUnsignedWrap, hasNoSignedWrap, getIntegerOverflowAttrName} {}
static inline IntegerOverflowFlagsAttr getOverflowAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline bool hasNoUnsignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline bool hasNoSignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getIntegerOverflowAttrName();
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
IntegerOverflowFlagsAttr getOverflowAttr(::mlir::Operation *tablegen_opaque_val) const;
bool hasNoUnsignedWrap(::mlir::Operation *tablegen_opaque_val) const;
bool hasNoSignedWrap(::mlir::Operation *tablegen_opaque_val) const;
static StringRef getIntegerOverflowAttrName();
};
};
template <typename ConcreteOp>
struct ArithIntegerOverflowFlagsInterfaceTrait;
} // namespace detail
class ArithIntegerOverflowFlagsInterface : public ::mlir::OpInterface<ArithIntegerOverflowFlagsInterface, detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<ArithIntegerOverflowFlagsInterface, detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::ArithIntegerOverflowFlagsInterfaceTrait<ConcreteOp> {};
/// Returns an IntegerOverflowFlagsAttr attribute for the operation
IntegerOverflowFlagsAttr getOverflowAttr();
/// Returns whether the operation has the No Unsigned Wrap keyword
bool hasNoUnsignedWrap();
/// Returns whether the operation has the No Signed Wrap keyword
bool hasNoSignedWrap();
/// Returns the name of the IntegerOverflowFlagsAttr attribute
/// for the operation
StringRef getIntegerOverflowAttrName();
};
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op non-negative (nneg) flag.
namespace detail {
struct ArithNonNegFlagInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
bool (*getNonNeg)(const Concept *impl, ::mlir::Operation *);
void (*setNonNeg)(const Concept *impl, ::mlir::Operation *, bool);
StringRef (*getNonNegFlagAttrName)();
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::arith::ArithNonNegFlagInterface;
Model() : Concept{getNonNeg, setNonNeg, getNonNegFlagAttrName} {}
static inline bool getNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline void setNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, bool nonNeg);
static inline StringRef getNonNegFlagAttrName();
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::arith::ArithNonNegFlagInterface;
FallbackModel() : Concept{getNonNeg, setNonNeg, getNonNegFlagAttrName} {}
static inline bool getNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline void setNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, bool nonNeg);
static inline StringRef getNonNegFlagAttrName();
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
bool getNonNeg(::mlir::Operation *tablegen_opaque_val) const;
void setNonNeg(::mlir::Operation *tablegen_opaque_val, bool nonNeg) const;
static StringRef getNonNegFlagAttrName();
};
};
template <typename ConcreteOp>
struct ArithNonNegFlagInterfaceTrait;
} // namespace detail
class ArithNonNegFlagInterface : public ::mlir::OpInterface<ArithNonNegFlagInterface, detail::ArithNonNegFlagInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<ArithNonNegFlagInterface, detail::ArithNonNegFlagInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::ArithNonNegFlagInterfaceTrait<ConcreteOp> {};
/// Returns whether the operation has the nneg flag set
bool getNonNeg();
/// Set the nneg flag for the operation
void setNonNeg(bool nonNeg);
/// Returns the name of the NonNeg flag attribute for
/// the operation
StringRef getNonNegFlagAttrName();
};
} // namespace mlir::arith
namespace mlir::arith {
/// Access to op rounding mode.
namespace detail {
struct ArithRoundingModeInterfaceInterfaceTraits {
struct Concept {
/// The methods defined by the interface.
RoundingModeAttr (*getRoundingModeAttr)(const Concept *impl, ::mlir::Operation *);
StringRef (*getRoundingModeAttrName)();
};
template<typename ConcreteOp>
class Model : public Concept {
public:
using Interface = ::mlir::arith::ArithRoundingModeInterface;
Model() : Concept{getRoundingModeAttr, getRoundingModeAttrName} {}
static inline RoundingModeAttr getRoundingModeAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getRoundingModeAttrName();
};
template<typename ConcreteOp>
class FallbackModel : public Concept {
public:
using Interface = ::mlir::arith::ArithRoundingModeInterface;
FallbackModel() : Concept{getRoundingModeAttr, getRoundingModeAttrName} {}
static inline RoundingModeAttr getRoundingModeAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
static inline StringRef getRoundingModeAttrName();
};
template<typename ConcreteModel, typename ConcreteOp>
class ExternalModel : public FallbackModel<ConcreteModel> {
public:
using ConcreteEntity = ConcreteOp;
RoundingModeAttr getRoundingModeAttr(::mlir::Operation *tablegen_opaque_val) const;
static StringRef getRoundingModeAttrName();
};
};
template <typename ConcreteOp>
struct ArithRoundingModeInterfaceTrait;
} // namespace detail
class ArithRoundingModeInterface : public ::mlir::OpInterface<ArithRoundingModeInterface, detail::ArithRoundingModeInterfaceInterfaceTraits> {
public:
using ::mlir::OpInterface<ArithRoundingModeInterface, detail::ArithRoundingModeInterfaceInterfaceTraits>::OpInterface;
template <typename ConcreteOp>
struct Trait : public detail::ArithRoundingModeInterfaceTrait<ConcreteOp> {};
/// Returns a RoundingModeAttr attribute for the operation
RoundingModeAttr getRoundingModeAttr();
/// Returns the name of the RoundingModeAttr attribute for
/// the operation
StringRef getRoundingModeAttrName();
};
} // namespace mlir::arith
namespace mlir::arith::detail {
template <typename ConcreteOp>
struct ArithFastMathInterfaceTrait : public ::mlir::OpInterface<ArithFastMathInterface, detail::ArithFastMathInterfaceInterfaceTraits>::Trait<ConcreteOp> {
/// Returns a FastMathFlagsAttr attribute for the operation
FastMathFlagsAttr getFastMathFlagsAttr() {
ConcreteOp op = cast<ConcreteOp>(this->getOperation());
return op.getFastmathAttr();
}
/// Returns the name of the FastMathFlagsAttr attribute
/// for the operation
static StringRef getFastMathAttrName() {
return "fastmath";
}
};
} // namespace mlir::arith::detail
namespace mlir::arith::detail {
template <typename ConcreteOp>
struct ArithIntegerOverflowFlagsInterfaceTrait : public ::mlir::OpInterface<ArithIntegerOverflowFlagsInterface, detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits>::Trait<ConcreteOp> {
/// Returns an IntegerOverflowFlagsAttr attribute for the operation
IntegerOverflowFlagsAttr getOverflowAttr() {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getOverflowFlagsAttr();
}
/// Returns whether the operation has the No Unsigned Wrap keyword
bool hasNoUnsignedWrap() {
auto op = cast<ConcreteOp>(this->getOperation());
IntegerOverflowFlags flags = op.getOverflowFlagsAttr().getValue();
return bitEnumContainsAll(flags, IntegerOverflowFlags::nuw);
}
/// Returns whether the operation has the No Signed Wrap keyword
bool hasNoSignedWrap() {
auto op = cast<ConcreteOp>(this->getOperation());
IntegerOverflowFlags flags = op.getOverflowFlagsAttr().getValue();
return bitEnumContainsAll(flags, IntegerOverflowFlags::nsw);
}
/// Returns the name of the IntegerOverflowFlagsAttr attribute
/// for the operation
static StringRef getIntegerOverflowAttrName() {
return "overflowFlags";
}
};
} // namespace mlir::arith::detail
namespace mlir::arith::detail {
template <typename ConcreteOp>
struct ArithNonNegFlagInterfaceTrait : public ::mlir::OpInterface<ArithNonNegFlagInterface, detail::ArithNonNegFlagInterfaceInterfaceTraits>::Trait<ConcreteOp> {
/// Returns whether the operation has the nneg flag set
bool getNonNeg() {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getNonNegAttr() != nullptr;
}
/// Set the nneg flag for the operation
void setNonNeg(bool nonNeg) {
auto op = cast<ConcreteOp>(this->getOperation());
if (nonNeg)
op.setNonNegAttr(UnitAttr::get(op->getContext()));
else
op.removeNonNegAttr();
}
/// Returns the name of the NonNeg flag attribute for
/// the operation
static StringRef getNonNegFlagAttrName() {
return "nonNeg";
}
};
} // namespace mlir::arith::detail
namespace mlir::arith::detail {
template <typename ConcreteOp>
struct ArithRoundingModeInterfaceTrait : public ::mlir::OpInterface<ArithRoundingModeInterface, detail::ArithRoundingModeInterfaceInterfaceTraits>::Trait<ConcreteOp> {
/// Returns a RoundingModeAttr attribute for the operation
RoundingModeAttr getRoundingModeAttr() {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getRoundingmodeAttr();
}
/// Returns the name of the RoundingModeAttr attribute for
/// the operation
static StringRef getRoundingModeAttrName() {
return "roundingmode";
}
};
} // namespace mlir::arith::detail
namespace mlir::arith {
template<typename ConcreteOp>
FastMathFlagsAttr detail::ArithFastMathInterfaceInterfaceTraits::Model<ConcreteOp>::getFastMathFlagsAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getFastMathFlagsAttr();
}
template<typename ConcreteOp>
StringRef detail::ArithFastMathInterfaceInterfaceTraits::Model<ConcreteOp>::getFastMathAttrName() {
return ConcreteOp::getFastMathAttrName();
}
template<typename ConcreteOp>
FastMathFlagsAttr detail::ArithFastMathInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFastMathFlagsAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->getFastMathFlagsAttr(tablegen_opaque_val);
}
template<typename ConcreteOp>
StringRef detail::ArithFastMathInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getFastMathAttrName() {
return ConcreteOp::getFastMathAttrName();
}
template<typename ConcreteModel, typename ConcreteOp>
FastMathFlagsAttr detail::ArithFastMathInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getFastMathFlagsAttr(::mlir::Operation *tablegen_opaque_val) const {
ConcreteOp op = cast<ConcreteOp>(this->getOperation());
return op.getFastmathAttr();
}
template<typename ConcreteModel, typename ConcreteOp>
StringRef detail::ArithFastMathInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getFastMathAttrName() {
return "fastmath";
}
} // namespace mlir::arith
namespace mlir::arith {
template<typename ConcreteOp>
IntegerOverflowFlagsAttr detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::Model<ConcreteOp>::getOverflowAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getOverflowAttr();
}
template<typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::Model<ConcreteOp>::hasNoUnsignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).hasNoUnsignedWrap();
}
template<typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::Model<ConcreteOp>::hasNoSignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).hasNoSignedWrap();
}
template<typename ConcreteOp>
StringRef detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::Model<ConcreteOp>::getIntegerOverflowAttrName() {
return ConcreteOp::getIntegerOverflowAttrName();
}
template<typename ConcreteOp>
IntegerOverflowFlagsAttr detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getOverflowAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->getOverflowAttr(tablegen_opaque_val);
}
template<typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::hasNoUnsignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->hasNoUnsignedWrap(tablegen_opaque_val);
}
template<typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::hasNoSignedWrap(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->hasNoSignedWrap(tablegen_opaque_val);
}
template<typename ConcreteOp>
StringRef detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getIntegerOverflowAttrName() {
return ConcreteOp::getIntegerOverflowAttrName();
}
template<typename ConcreteModel, typename ConcreteOp>
IntegerOverflowFlagsAttr detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getOverflowAttr(::mlir::Operation *tablegen_opaque_val) const {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getOverflowFlagsAttr();
}
template<typename ConcreteModel, typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::hasNoUnsignedWrap(::mlir::Operation *tablegen_opaque_val) const {
auto op = cast<ConcreteOp>(this->getOperation());
IntegerOverflowFlags flags = op.getOverflowFlagsAttr().getValue();
return bitEnumContainsAll(flags, IntegerOverflowFlags::nuw);
}
template<typename ConcreteModel, typename ConcreteOp>
bool detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::hasNoSignedWrap(::mlir::Operation *tablegen_opaque_val) const {
auto op = cast<ConcreteOp>(this->getOperation());
IntegerOverflowFlags flags = op.getOverflowFlagsAttr().getValue();
return bitEnumContainsAll(flags, IntegerOverflowFlags::nsw);
}
template<typename ConcreteModel, typename ConcreteOp>
StringRef detail::ArithIntegerOverflowFlagsInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getIntegerOverflowAttrName() {
return "overflowFlags";
}
} // namespace mlir::arith
namespace mlir::arith {
template<typename ConcreteOp>
bool detail::ArithNonNegFlagInterfaceInterfaceTraits::Model<ConcreteOp>::getNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getNonNeg();
}
template<typename ConcreteOp>
void detail::ArithNonNegFlagInterfaceInterfaceTraits::Model<ConcreteOp>::setNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, bool nonNeg) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setNonNeg(nonNeg);
}
template<typename ConcreteOp>
StringRef detail::ArithNonNegFlagInterfaceInterfaceTraits::Model<ConcreteOp>::getNonNegFlagAttrName() {
return ConcreteOp::getNonNegFlagAttrName();
}
template<typename ConcreteOp>
bool detail::ArithNonNegFlagInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->getNonNeg(tablegen_opaque_val);
}
template<typename ConcreteOp>
void detail::ArithNonNegFlagInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setNonNeg(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, bool nonNeg) {
return static_cast<const ConcreteOp *>(impl)->setNonNeg(tablegen_opaque_val, nonNeg);
}
template<typename ConcreteOp>
StringRef detail::ArithNonNegFlagInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getNonNegFlagAttrName() {
return ConcreteOp::getNonNegFlagAttrName();
}
template<typename ConcreteModel, typename ConcreteOp>
bool detail::ArithNonNegFlagInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getNonNeg(::mlir::Operation *tablegen_opaque_val) const {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getNonNegAttr() != nullptr;
}
template<typename ConcreteModel, typename ConcreteOp>
void detail::ArithNonNegFlagInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::setNonNeg(::mlir::Operation *tablegen_opaque_val, bool nonNeg) const {
auto op = cast<ConcreteOp>(this->getOperation());
if (nonNeg)
op.setNonNegAttr(UnitAttr::get(op->getContext()));
else
op.removeNonNegAttr();
}
template<typename ConcreteModel, typename ConcreteOp>
StringRef detail::ArithNonNegFlagInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getNonNegFlagAttrName() {
return "nonNeg";
}
} // namespace mlir::arith
namespace mlir::arith {
template<typename ConcreteOp>
RoundingModeAttr detail::ArithRoundingModeInterfaceInterfaceTraits::Model<ConcreteOp>::getRoundingModeAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getRoundingModeAttr();
}
template<typename ConcreteOp>
StringRef detail::ArithRoundingModeInterfaceInterfaceTraits::Model<ConcreteOp>::getRoundingModeAttrName() {
return ConcreteOp::getRoundingModeAttrName();
}
template<typename ConcreteOp>
RoundingModeAttr detail::ArithRoundingModeInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getRoundingModeAttr(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
return static_cast<const ConcreteOp *>(impl)->getRoundingModeAttr(tablegen_opaque_val);
}
template<typename ConcreteOp>
StringRef detail::ArithRoundingModeInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getRoundingModeAttrName() {
return ConcreteOp::getRoundingModeAttrName();
}
template<typename ConcreteModel, typename ConcreteOp>
RoundingModeAttr detail::ArithRoundingModeInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getRoundingModeAttr(::mlir::Operation *tablegen_opaque_val) const {
auto op = cast<ConcreteOp>(this->getOperation());
return op.getRoundingmodeAttr();
}
template<typename ConcreteModel, typename ConcreteOp>
StringRef detail::ArithRoundingModeInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getRoundingModeAttrName() {
return "roundingmode";
}
} // namespace mlir::arith