LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
OpInterfaces.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Interface Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9namespace llzk::felt {
10
13
14} // namespace llzk::felt
15namespace llzk::felt {
16
18namespace detail {
20 struct Concept {
22 ::mlir::Value (*getLhs)(const Concept *impl, ::mlir::Operation *);
23 ::mlir::Value (*getRhs)(const Concept *impl, ::mlir::Operation *);
24 };
25 template<typename ConcreteOp>
26 class Model : public Concept {
27 public:
30
31 static inline ::mlir::Value getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
32 static inline ::mlir::Value getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
33 };
34 template<typename ConcreteOp>
35 class FallbackModel : public Concept {
36 public:
39
40 static inline ::mlir::Value getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
41 static inline ::mlir::Value getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
42 };
43 template<typename ConcreteModel, typename ConcreteOp>
44 class ExternalModel : public FallbackModel<ConcreteModel> {
45 public:
46 using ConcreteEntity = ConcreteOp;
47 };
48};
49template <typename ConcreteOp>
51
52} // namespace detail
53class FeltBinaryOpInterface : public ::mlir::OpInterface<FeltBinaryOpInterface, detail::FeltBinaryOpInterfaceInterfaceTraits> {
54public:
55 using ::mlir::OpInterface<FeltBinaryOpInterface, detail::FeltBinaryOpInterfaceInterfaceTraits>::OpInterface;
56 template <typename ConcreteOp>
57 struct Trait : public detail::FeltBinaryOpInterfaceTrait<ConcreteOp> {};
58
60 ::mlir::Value getLhs();
61
63 ::mlir::Value getRhs();
64};
65
66} // namespace llzk::felt
67namespace llzk::felt::detail {
68
69 template <typename ConcreteOp>
70 struct FeltBinaryOpInterfaceTrait : public ::mlir::OpInterface<FeltBinaryOpInterface, detail::FeltBinaryOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
71 };
72
73} // namespace llzk::felt::detail
74namespace llzk::felt {
75
76template<typename ConcreteOp>
77::mlir::Value detail::FeltBinaryOpInterfaceInterfaceTraits::Model<ConcreteOp>::getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
78 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getLhs();
79}
80template<typename ConcreteOp>
81::mlir::Value detail::FeltBinaryOpInterfaceInterfaceTraits::Model<ConcreteOp>::getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
82 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getRhs();
83}
84template<typename ConcreteOp>
85::mlir::Value detail::FeltBinaryOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
86 return static_cast<const ConcreteOp *>(impl)->getLhs(tablegen_opaque_val);
87}
88template<typename ConcreteOp>
89::mlir::Value detail::FeltBinaryOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
90 return static_cast<const ConcreteOp *>(impl)->getRhs(tablegen_opaque_val);
91}
92
93} // namespace llzk::felt
::mlir::Value getRhs()
Gets the right operand.
::mlir::Value getLhs()
Gets the left operand.
static inline ::mlir::Value getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getRhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::Value getLhs(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
Common interface for binary arithmetic operations on felts.
::mlir::Value(* getRhs)(const Concept *impl, ::mlir::Operation *)
::mlir::Value(* getLhs)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.