LLZK 2.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.capi.test.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op C API Tests *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10class FeltOperationLinkTests : public CAPITest {};
11
13TEST_F(FeltOperationLinkTests, IsA_Felt_AddFeltOp) {
14 auto testOperation = createIndexOperation();
15
16 // This will always return false since `createIndex*` returns an MLIR builtin
17 EXPECT_FALSE(llzkOperationIsA_Felt_AddFeltOp(testOperation));
18
19 mlirOperationDestroy(testOperation);
20}
21
23TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_Build) {
24 // Returns an `arith.constant` op, which will never match the AddFeltOp dialect check.
25 auto testOp = createIndexOperation();
26
27 // This condition is always false, so the function is never actually called.
28 // We only verify it compiles and links correctly.
30 MlirOpBuilder builder = mlirOpBuilderCreate(context);
31 MlirLocation location = mlirLocationUnknownGet(context);
32 auto dummyValue = mlirOperationGetResult(testOp, 0);
33 auto resultType = createIndexType();
34
35 (void)llzkFelt_AddFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
36 // No need to destroy builder or op since this code never runs.
37 }
38
39 mlirOperationDestroy(testOp);
40}
41
42struct AddFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
43 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_AddFeltOp(op); }
47 static std::unique_ptr<AddFeltOpBuildFuncHelper> get();
48
49protected:
51};
52
55TEST_F(CAPITest, AddFeltOp_build_pass) { AddFeltOpBuildFuncHelper::get()->run(*this); }
56
57TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_GetLhs) {
58 auto testOp = createIndexOperation();
59
61 (void)llzkFelt_AddFeltOpGetLhs(testOp);
62 }
63
64 mlirOperationDestroy(testOp);
65}
66
67TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_SetLhs) {
68 auto testOp = createIndexOperation();
69
71 auto dummyValue = mlirOperationGetResult(testOp, 0);
72 llzkFelt_AddFeltOpSetLhs(testOp, dummyValue);
73 }
74
75 mlirOperationDestroy(testOp);
76}
77
78TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_GetRhs) {
79 auto testOp = createIndexOperation();
80
82 (void)llzkFelt_AddFeltOpGetRhs(testOp);
83 }
84
85 mlirOperationDestroy(testOp);
86}
87
88TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_SetRhs) {
89 auto testOp = createIndexOperation();
90
92 auto dummyValue = mlirOperationGetResult(testOp, 0);
93 llzkFelt_AddFeltOpSetRhs(testOp, dummyValue);
94 }
95
96 mlirOperationDestroy(testOp);
97}
98
99TEST_F(FeltOperationLinkTests, llzk_AddFeltOp_GetResult) {
100 auto testOp = createIndexOperation();
101
103 (void)llzkFelt_AddFeltOpGetResult(testOp);
104 }
105
106 mlirOperationDestroy(testOp);
107}
108
110TEST_F(FeltOperationLinkTests, IsA_Felt_AndFeltOp) {
111 auto testOperation = createIndexOperation();
112
113 // This will always return false since `createIndex*` returns an MLIR builtin
114 EXPECT_FALSE(llzkOperationIsA_Felt_AndFeltOp(testOperation));
115
116 mlirOperationDestroy(testOperation);
117}
118
120TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_Build) {
121 // Returns an `arith.constant` op, which will never match the AndFeltOp dialect check.
122 auto testOp = createIndexOperation();
123
124 // This condition is always false, so the function is never actually called.
125 // We only verify it compiles and links correctly.
127 MlirOpBuilder builder = mlirOpBuilderCreate(context);
128 MlirLocation location = mlirLocationUnknownGet(context);
129 auto dummyValue = mlirOperationGetResult(testOp, 0);
130 auto resultType = createIndexType();
131
132 (void)llzkFelt_AndFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
133 // No need to destroy builder or op since this code never runs.
134 }
135
136 mlirOperationDestroy(testOp);
137}
138
139struct AndFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
140 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_AndFeltOp(op); }
144 static std::unique_ptr<AndFeltOpBuildFuncHelper> get();
145
146protected:
148};
149
152TEST_F(CAPITest, AndFeltOp_build_pass) { AndFeltOpBuildFuncHelper::get()->run(*this); }
153
154TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_GetLhs) {
155 auto testOp = createIndexOperation();
156
158 (void)llzkFelt_AndFeltOpGetLhs(testOp);
159 }
160
161 mlirOperationDestroy(testOp);
162}
163
164TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_SetLhs) {
165 auto testOp = createIndexOperation();
166
168 auto dummyValue = mlirOperationGetResult(testOp, 0);
169 llzkFelt_AndFeltOpSetLhs(testOp, dummyValue);
170 }
171
172 mlirOperationDestroy(testOp);
173}
174
175TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_GetRhs) {
176 auto testOp = createIndexOperation();
177
179 (void)llzkFelt_AndFeltOpGetRhs(testOp);
180 }
181
182 mlirOperationDestroy(testOp);
183}
184
185TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_SetRhs) {
186 auto testOp = createIndexOperation();
187
189 auto dummyValue = mlirOperationGetResult(testOp, 0);
190 llzkFelt_AndFeltOpSetRhs(testOp, dummyValue);
191 }
192
193 mlirOperationDestroy(testOp);
194}
195
196TEST_F(FeltOperationLinkTests, llzk_AndFeltOp_GetResult) {
197 auto testOp = createIndexOperation();
198
200 (void)llzkFelt_AndFeltOpGetResult(testOp);
201 }
202
203 mlirOperationDestroy(testOp);
204}
205
207TEST_F(FeltOperationLinkTests, IsA_Felt_DivFeltOp) {
208 auto testOperation = createIndexOperation();
209
210 // This will always return false since `createIndex*` returns an MLIR builtin
211 EXPECT_FALSE(llzkOperationIsA_Felt_DivFeltOp(testOperation));
212
213 mlirOperationDestroy(testOperation);
214}
215
217TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_Build) {
218 // Returns an `arith.constant` op, which will never match the DivFeltOp dialect check.
219 auto testOp = createIndexOperation();
220
221 // This condition is always false, so the function is never actually called.
222 // We only verify it compiles and links correctly.
224 MlirOpBuilder builder = mlirOpBuilderCreate(context);
225 MlirLocation location = mlirLocationUnknownGet(context);
226 auto dummyValue = mlirOperationGetResult(testOp, 0);
227 auto resultType = createIndexType();
228
229 (void)llzkFelt_DivFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
230 // No need to destroy builder or op since this code never runs.
231 }
232
233 mlirOperationDestroy(testOp);
234}
235
236struct DivFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
237 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_DivFeltOp(op); }
241 static std::unique_ptr<DivFeltOpBuildFuncHelper> get();
242
243protected:
245};
246
249TEST_F(CAPITest, DivFeltOp_build_pass) { DivFeltOpBuildFuncHelper::get()->run(*this); }
250
251TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_GetLhs) {
252 auto testOp = createIndexOperation();
253
255 (void)llzkFelt_DivFeltOpGetLhs(testOp);
256 }
257
258 mlirOperationDestroy(testOp);
259}
260
261TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_SetLhs) {
262 auto testOp = createIndexOperation();
263
265 auto dummyValue = mlirOperationGetResult(testOp, 0);
266 llzkFelt_DivFeltOpSetLhs(testOp, dummyValue);
267 }
268
269 mlirOperationDestroy(testOp);
270}
271
272TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_GetRhs) {
273 auto testOp = createIndexOperation();
274
276 (void)llzkFelt_DivFeltOpGetRhs(testOp);
277 }
278
279 mlirOperationDestroy(testOp);
280}
281
282TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_SetRhs) {
283 auto testOp = createIndexOperation();
284
286 auto dummyValue = mlirOperationGetResult(testOp, 0);
287 llzkFelt_DivFeltOpSetRhs(testOp, dummyValue);
288 }
289
290 mlirOperationDestroy(testOp);
291}
292
293TEST_F(FeltOperationLinkTests, llzk_DivFeltOp_GetResult) {
294 auto testOp = createIndexOperation();
295
297 (void)llzkFelt_DivFeltOpGetResult(testOp);
298 }
299
300 mlirOperationDestroy(testOp);
301}
302
304TEST_F(FeltOperationLinkTests, IsA_Felt_FeltConstantOp) {
305 auto testOperation = createIndexOperation();
306
307 // This will always return false since `createIndex*` returns an MLIR builtin
308 EXPECT_FALSE(llzkOperationIsA_Felt_FeltConstantOp(testOperation));
309
310 mlirOperationDestroy(testOperation);
311}
312
314TEST_F(FeltOperationLinkTests, llzk_FeltConstantOp_Build) {
315 // Returns an `arith.constant` op, which will never match the FeltConstantOp dialect check.
316 auto testOp = createIndexOperation();
317
318 // This condition is always false, so the function is never actually called.
319 // We only verify it compiles and links correctly.
321 MlirOpBuilder builder = mlirOpBuilderCreate(context);
322 MlirLocation location = mlirLocationUnknownGet(context);
323 auto dummyValue = mlirOperationGetResult(testOp, 0);
324 auto resultType = createIndexType();
325 auto valueAttr = createIndexAttribute();
326
327 (void)llzkFelt_FeltConstantOpBuild(builder, location, resultType, valueAttr);
328 // No need to destroy builder or op since this code never runs.
329 }
330
331 mlirOperationDestroy(testOp);
332}
333
334struct FeltConstantOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
335 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_FeltConstantOp(op); }
339 static std::unique_ptr<FeltConstantOpBuildFuncHelper> get();
340
341protected:
343};
344
347TEST_F(CAPITest, FeltConstantOp_build_pass) { FeltConstantOpBuildFuncHelper::get()->run(*this); }
348
349TEST_F(FeltOperationLinkTests, llzk_FeltConstantOp_GetValueAttr) {
350 auto testOp = createIndexOperation();
351
354 }
355
356 mlirOperationDestroy(testOp);
357}
358
359TEST_F(FeltOperationLinkTests, llzk_FeltConstantOp_SetValueAttr) {
360 auto testOp = createIndexOperation();
361
363 llzkFelt_FeltConstantOpSetValue(testOp, createIndexAttribute());
364 }
365
366 mlirOperationDestroy(testOp);
367}
368
369TEST_F(FeltOperationLinkTests, llzk_FeltConstantOp_GetResult) {
370 auto testOp = createIndexOperation();
371
374 }
375
376 mlirOperationDestroy(testOp);
377}
378
380TEST_F(FeltOperationLinkTests, IsA_Felt_InvFeltOp) {
381 auto testOperation = createIndexOperation();
382
383 // This will always return false since `createIndex*` returns an MLIR builtin
384 EXPECT_FALSE(llzkOperationIsA_Felt_InvFeltOp(testOperation));
385
386 mlirOperationDestroy(testOperation);
387}
388
390TEST_F(FeltOperationLinkTests, llzk_InvFeltOp_Build) {
391 // Returns an `arith.constant` op, which will never match the InvFeltOp dialect check.
392 auto testOp = createIndexOperation();
393
394 // This condition is always false, so the function is never actually called.
395 // We only verify it compiles and links correctly.
397 MlirOpBuilder builder = mlirOpBuilderCreate(context);
398 MlirLocation location = mlirLocationUnknownGet(context);
399 auto dummyValue = mlirOperationGetResult(testOp, 0);
400 auto resultType = createIndexType();
401
402 (void)llzkFelt_InvFeltOpBuild(builder, location, resultType, dummyValue);
403 // No need to destroy builder or op since this code never runs.
404 }
405
406 mlirOperationDestroy(testOp);
407}
408
409struct InvFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
410 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_InvFeltOp(op); }
414 static std::unique_ptr<InvFeltOpBuildFuncHelper> get();
415
416protected:
418};
419
422TEST_F(CAPITest, InvFeltOp_build_pass) { InvFeltOpBuildFuncHelper::get()->run(*this); }
423
424TEST_F(FeltOperationLinkTests, llzk_InvFeltOp_GetOperand) {
425 auto testOp = createIndexOperation();
426
428 (void)llzkFelt_InvFeltOpGetOperand(testOp);
429 }
430
431 mlirOperationDestroy(testOp);
432}
433
434TEST_F(FeltOperationLinkTests, llzk_InvFeltOp_SetOperand) {
435 auto testOp = createIndexOperation();
436
438 auto dummyValue = mlirOperationGetResult(testOp, 0);
439 llzkFelt_InvFeltOpSetOperand(testOp, dummyValue);
440 }
441
442 mlirOperationDestroy(testOp);
443}
444
445TEST_F(FeltOperationLinkTests, llzk_InvFeltOp_GetResult) {
446 auto testOp = createIndexOperation();
447
449 (void)llzkFelt_InvFeltOpGetResult(testOp);
450 }
451
452 mlirOperationDestroy(testOp);
453}
454
456TEST_F(FeltOperationLinkTests, IsA_Felt_MulFeltOp) {
457 auto testOperation = createIndexOperation();
458
459 // This will always return false since `createIndex*` returns an MLIR builtin
460 EXPECT_FALSE(llzkOperationIsA_Felt_MulFeltOp(testOperation));
461
462 mlirOperationDestroy(testOperation);
463}
464
466TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_Build) {
467 // Returns an `arith.constant` op, which will never match the MulFeltOp dialect check.
468 auto testOp = createIndexOperation();
469
470 // This condition is always false, so the function is never actually called.
471 // We only verify it compiles and links correctly.
473 MlirOpBuilder builder = mlirOpBuilderCreate(context);
474 MlirLocation location = mlirLocationUnknownGet(context);
475 auto dummyValue = mlirOperationGetResult(testOp, 0);
476 auto resultType = createIndexType();
477
478 (void)llzkFelt_MulFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
479 // No need to destroy builder or op since this code never runs.
480 }
481
482 mlirOperationDestroy(testOp);
483}
484
485struct MulFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
486 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_MulFeltOp(op); }
490 static std::unique_ptr<MulFeltOpBuildFuncHelper> get();
491
492protected:
494};
495
498TEST_F(CAPITest, MulFeltOp_build_pass) { MulFeltOpBuildFuncHelper::get()->run(*this); }
499
500TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_GetLhs) {
501 auto testOp = createIndexOperation();
502
504 (void)llzkFelt_MulFeltOpGetLhs(testOp);
505 }
506
507 mlirOperationDestroy(testOp);
508}
509
510TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_SetLhs) {
511 auto testOp = createIndexOperation();
512
514 auto dummyValue = mlirOperationGetResult(testOp, 0);
515 llzkFelt_MulFeltOpSetLhs(testOp, dummyValue);
516 }
517
518 mlirOperationDestroy(testOp);
519}
520
521TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_GetRhs) {
522 auto testOp = createIndexOperation();
523
525 (void)llzkFelt_MulFeltOpGetRhs(testOp);
526 }
527
528 mlirOperationDestroy(testOp);
529}
530
531TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_SetRhs) {
532 auto testOp = createIndexOperation();
533
535 auto dummyValue = mlirOperationGetResult(testOp, 0);
536 llzkFelt_MulFeltOpSetRhs(testOp, dummyValue);
537 }
538
539 mlirOperationDestroy(testOp);
540}
541
542TEST_F(FeltOperationLinkTests, llzk_MulFeltOp_GetResult) {
543 auto testOp = createIndexOperation();
544
546 (void)llzkFelt_MulFeltOpGetResult(testOp);
547 }
548
549 mlirOperationDestroy(testOp);
550}
551
553TEST_F(FeltOperationLinkTests, IsA_Felt_NegFeltOp) {
554 auto testOperation = createIndexOperation();
555
556 // This will always return false since `createIndex*` returns an MLIR builtin
557 EXPECT_FALSE(llzkOperationIsA_Felt_NegFeltOp(testOperation));
558
559 mlirOperationDestroy(testOperation);
560}
561
563TEST_F(FeltOperationLinkTests, llzk_NegFeltOp_Build) {
564 // Returns an `arith.constant` op, which will never match the NegFeltOp dialect check.
565 auto testOp = createIndexOperation();
566
567 // This condition is always false, so the function is never actually called.
568 // We only verify it compiles and links correctly.
570 MlirOpBuilder builder = mlirOpBuilderCreate(context);
571 MlirLocation location = mlirLocationUnknownGet(context);
572 auto dummyValue = mlirOperationGetResult(testOp, 0);
573 auto resultType = createIndexType();
574
575 (void)llzkFelt_NegFeltOpBuild(builder, location, resultType, dummyValue);
576 // No need to destroy builder or op since this code never runs.
577 }
578
579 mlirOperationDestroy(testOp);
580}
581
582struct NegFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
583 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_NegFeltOp(op); }
587 static std::unique_ptr<NegFeltOpBuildFuncHelper> get();
588
589protected:
591};
592
595TEST_F(CAPITest, NegFeltOp_build_pass) { NegFeltOpBuildFuncHelper::get()->run(*this); }
596
597TEST_F(FeltOperationLinkTests, llzk_NegFeltOp_GetOperand) {
598 auto testOp = createIndexOperation();
599
601 (void)llzkFelt_NegFeltOpGetOperand(testOp);
602 }
603
604 mlirOperationDestroy(testOp);
605}
606
607TEST_F(FeltOperationLinkTests, llzk_NegFeltOp_SetOperand) {
608 auto testOp = createIndexOperation();
609
611 auto dummyValue = mlirOperationGetResult(testOp, 0);
612 llzkFelt_NegFeltOpSetOperand(testOp, dummyValue);
613 }
614
615 mlirOperationDestroy(testOp);
616}
617
618TEST_F(FeltOperationLinkTests, llzk_NegFeltOp_GetResult) {
619 auto testOp = createIndexOperation();
620
622 (void)llzkFelt_NegFeltOpGetResult(testOp);
623 }
624
625 mlirOperationDestroy(testOp);
626}
627
629TEST_F(FeltOperationLinkTests, IsA_Felt_NotFeltOp) {
630 auto testOperation = createIndexOperation();
631
632 // This will always return false since `createIndex*` returns an MLIR builtin
633 EXPECT_FALSE(llzkOperationIsA_Felt_NotFeltOp(testOperation));
634
635 mlirOperationDestroy(testOperation);
636}
637
639TEST_F(FeltOperationLinkTests, llzk_NotFeltOp_Build) {
640 // Returns an `arith.constant` op, which will never match the NotFeltOp dialect check.
641 auto testOp = createIndexOperation();
642
643 // This condition is always false, so the function is never actually called.
644 // We only verify it compiles and links correctly.
646 MlirOpBuilder builder = mlirOpBuilderCreate(context);
647 MlirLocation location = mlirLocationUnknownGet(context);
648 auto dummyValue = mlirOperationGetResult(testOp, 0);
649 auto resultType = createIndexType();
650
651 (void)llzkFelt_NotFeltOpBuild(builder, location, resultType, dummyValue);
652 // No need to destroy builder or op since this code never runs.
653 }
654
655 mlirOperationDestroy(testOp);
656}
657
658struct NotFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
659 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_NotFeltOp(op); }
663 static std::unique_ptr<NotFeltOpBuildFuncHelper> get();
664
665protected:
667};
668
671TEST_F(CAPITest, NotFeltOp_build_pass) { NotFeltOpBuildFuncHelper::get()->run(*this); }
672
673TEST_F(FeltOperationLinkTests, llzk_NotFeltOp_GetOperand) {
674 auto testOp = createIndexOperation();
675
677 (void)llzkFelt_NotFeltOpGetOperand(testOp);
678 }
679
680 mlirOperationDestroy(testOp);
681}
682
683TEST_F(FeltOperationLinkTests, llzk_NotFeltOp_SetOperand) {
684 auto testOp = createIndexOperation();
685
687 auto dummyValue = mlirOperationGetResult(testOp, 0);
688 llzkFelt_NotFeltOpSetOperand(testOp, dummyValue);
689 }
690
691 mlirOperationDestroy(testOp);
692}
693
694TEST_F(FeltOperationLinkTests, llzk_NotFeltOp_GetResult) {
695 auto testOp = createIndexOperation();
696
698 (void)llzkFelt_NotFeltOpGetResult(testOp);
699 }
700
701 mlirOperationDestroy(testOp);
702}
703
705TEST_F(FeltOperationLinkTests, IsA_Felt_OrFeltOp) {
706 auto testOperation = createIndexOperation();
707
708 // This will always return false since `createIndex*` returns an MLIR builtin
709 EXPECT_FALSE(llzkOperationIsA_Felt_OrFeltOp(testOperation));
710
711 mlirOperationDestroy(testOperation);
712}
713
715TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_Build) {
716 // Returns an `arith.constant` op, which will never match the OrFeltOp dialect check.
717 auto testOp = createIndexOperation();
718
719 // This condition is always false, so the function is never actually called.
720 // We only verify it compiles and links correctly.
721 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
722 MlirOpBuilder builder = mlirOpBuilderCreate(context);
723 MlirLocation location = mlirLocationUnknownGet(context);
724 auto dummyValue = mlirOperationGetResult(testOp, 0);
725 auto resultType = createIndexType();
726
727 (void)llzkFelt_OrFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
728 // No need to destroy builder or op since this code never runs.
729 }
730
731 mlirOperationDestroy(testOp);
732}
733
734struct OrFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
735 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_OrFeltOp(op); }
739 static std::unique_ptr<OrFeltOpBuildFuncHelper> get();
740
741protected:
743};
744
747TEST_F(CAPITest, OrFeltOp_build_pass) { OrFeltOpBuildFuncHelper::get()->run(*this); }
748
749TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_GetLhs) {
750 auto testOp = createIndexOperation();
751
752 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
753 (void)llzkFelt_OrFeltOpGetLhs(testOp);
754 }
755
756 mlirOperationDestroy(testOp);
757}
758
759TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_SetLhs) {
760 auto testOp = createIndexOperation();
761
762 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
763 auto dummyValue = mlirOperationGetResult(testOp, 0);
764 llzkFelt_OrFeltOpSetLhs(testOp, dummyValue);
765 }
766
767 mlirOperationDestroy(testOp);
768}
769
770TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_GetRhs) {
771 auto testOp = createIndexOperation();
772
773 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
774 (void)llzkFelt_OrFeltOpGetRhs(testOp);
775 }
776
777 mlirOperationDestroy(testOp);
778}
779
780TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_SetRhs) {
781 auto testOp = createIndexOperation();
782
783 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
784 auto dummyValue = mlirOperationGetResult(testOp, 0);
785 llzkFelt_OrFeltOpSetRhs(testOp, dummyValue);
786 }
787
788 mlirOperationDestroy(testOp);
789}
790
791TEST_F(FeltOperationLinkTests, llzk_OrFeltOp_GetResult) {
792 auto testOp = createIndexOperation();
793
794 if (llzkOperationIsA_Felt_OrFeltOp(testOp)) {
795 (void)llzkFelt_OrFeltOpGetResult(testOp);
796 }
797
798 mlirOperationDestroy(testOp);
799}
800
802TEST_F(FeltOperationLinkTests, IsA_Felt_PowFeltOp) {
803 auto testOperation = createIndexOperation();
804
805 // This will always return false since `createIndex*` returns an MLIR builtin
806 EXPECT_FALSE(llzkOperationIsA_Felt_PowFeltOp(testOperation));
807
808 mlirOperationDestroy(testOperation);
809}
810
812TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_Build) {
813 // Returns an `arith.constant` op, which will never match the PowFeltOp dialect check.
814 auto testOp = createIndexOperation();
815
816 // This condition is always false, so the function is never actually called.
817 // We only verify it compiles and links correctly.
819 MlirOpBuilder builder = mlirOpBuilderCreate(context);
820 MlirLocation location = mlirLocationUnknownGet(context);
821 auto dummyValue = mlirOperationGetResult(testOp, 0);
822 auto resultType = createIndexType();
823
824 (void)llzkFelt_PowFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
825 // No need to destroy builder or op since this code never runs.
826 }
827
828 mlirOperationDestroy(testOp);
829}
830
831struct PowFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
832 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_PowFeltOp(op); }
836 static std::unique_ptr<PowFeltOpBuildFuncHelper> get();
837
838protected:
840};
841
844TEST_F(CAPITest, PowFeltOp_build_pass) { PowFeltOpBuildFuncHelper::get()->run(*this); }
845
846TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_GetLhs) {
847 auto testOp = createIndexOperation();
848
850 (void)llzkFelt_PowFeltOpGetLhs(testOp);
851 }
852
853 mlirOperationDestroy(testOp);
854}
855
856TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_SetLhs) {
857 auto testOp = createIndexOperation();
858
860 auto dummyValue = mlirOperationGetResult(testOp, 0);
861 llzkFelt_PowFeltOpSetLhs(testOp, dummyValue);
862 }
863
864 mlirOperationDestroy(testOp);
865}
866
867TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_GetRhs) {
868 auto testOp = createIndexOperation();
869
871 (void)llzkFelt_PowFeltOpGetRhs(testOp);
872 }
873
874 mlirOperationDestroy(testOp);
875}
876
877TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_SetRhs) {
878 auto testOp = createIndexOperation();
879
881 auto dummyValue = mlirOperationGetResult(testOp, 0);
882 llzkFelt_PowFeltOpSetRhs(testOp, dummyValue);
883 }
884
885 mlirOperationDestroy(testOp);
886}
887
888TEST_F(FeltOperationLinkTests, llzk_PowFeltOp_GetResult) {
889 auto testOp = createIndexOperation();
890
892 (void)llzkFelt_PowFeltOpGetResult(testOp);
893 }
894
895 mlirOperationDestroy(testOp);
896}
897
899TEST_F(FeltOperationLinkTests, IsA_Felt_ShlFeltOp) {
900 auto testOperation = createIndexOperation();
901
902 // This will always return false since `createIndex*` returns an MLIR builtin
903 EXPECT_FALSE(llzkOperationIsA_Felt_ShlFeltOp(testOperation));
904
905 mlirOperationDestroy(testOperation);
906}
907
909TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_Build) {
910 // Returns an `arith.constant` op, which will never match the ShlFeltOp dialect check.
911 auto testOp = createIndexOperation();
912
913 // This condition is always false, so the function is never actually called.
914 // We only verify it compiles and links correctly.
916 MlirOpBuilder builder = mlirOpBuilderCreate(context);
917 MlirLocation location = mlirLocationUnknownGet(context);
918 auto dummyValue = mlirOperationGetResult(testOp, 0);
919 auto resultType = createIndexType();
920
921 (void)llzkFelt_ShlFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
922 // No need to destroy builder or op since this code never runs.
923 }
924
925 mlirOperationDestroy(testOp);
926}
927
928struct ShlFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
929 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_ShlFeltOp(op); }
933 static std::unique_ptr<ShlFeltOpBuildFuncHelper> get();
934
935protected:
937};
938
941TEST_F(CAPITest, ShlFeltOp_build_pass) { ShlFeltOpBuildFuncHelper::get()->run(*this); }
942
943TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_GetLhs) {
944 auto testOp = createIndexOperation();
945
947 (void)llzkFelt_ShlFeltOpGetLhs(testOp);
948 }
949
950 mlirOperationDestroy(testOp);
951}
952
953TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_SetLhs) {
954 auto testOp = createIndexOperation();
955
957 auto dummyValue = mlirOperationGetResult(testOp, 0);
958 llzkFelt_ShlFeltOpSetLhs(testOp, dummyValue);
959 }
960
961 mlirOperationDestroy(testOp);
962}
963
964TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_GetRhs) {
965 auto testOp = createIndexOperation();
966
968 (void)llzkFelt_ShlFeltOpGetRhs(testOp);
969 }
970
971 mlirOperationDestroy(testOp);
972}
973
974TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_SetRhs) {
975 auto testOp = createIndexOperation();
976
978 auto dummyValue = mlirOperationGetResult(testOp, 0);
979 llzkFelt_ShlFeltOpSetRhs(testOp, dummyValue);
980 }
981
982 mlirOperationDestroy(testOp);
983}
984
985TEST_F(FeltOperationLinkTests, llzk_ShlFeltOp_GetResult) {
986 auto testOp = createIndexOperation();
987
989 (void)llzkFelt_ShlFeltOpGetResult(testOp);
990 }
991
992 mlirOperationDestroy(testOp);
993}
994
996TEST_F(FeltOperationLinkTests, IsA_Felt_ShrFeltOp) {
997 auto testOperation = createIndexOperation();
998
999 // This will always return false since `createIndex*` returns an MLIR builtin
1000 EXPECT_FALSE(llzkOperationIsA_Felt_ShrFeltOp(testOperation));
1001
1002 mlirOperationDestroy(testOperation);
1003}
1004
1006TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_Build) {
1007 // Returns an `arith.constant` op, which will never match the ShrFeltOp dialect check.
1008 auto testOp = createIndexOperation();
1009
1010 // This condition is always false, so the function is never actually called.
1011 // We only verify it compiles and links correctly.
1012 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1013 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1014 MlirLocation location = mlirLocationUnknownGet(context);
1015 auto dummyValue = mlirOperationGetResult(testOp, 0);
1016 auto resultType = createIndexType();
1017
1018 (void)llzkFelt_ShrFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1019 // No need to destroy builder or op since this code never runs.
1020 }
1021
1022 mlirOperationDestroy(testOp);
1023}
1024
1025struct ShrFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1026 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_ShrFeltOp(op); }
1030 static std::unique_ptr<ShrFeltOpBuildFuncHelper> get();
1031
1032protected:
1034};
1035
1038TEST_F(CAPITest, ShrFeltOp_build_pass) { ShrFeltOpBuildFuncHelper::get()->run(*this); }
1039
1040TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_GetLhs) {
1041 auto testOp = createIndexOperation();
1042
1043 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1044 (void)llzkFelt_ShrFeltOpGetLhs(testOp);
1045 }
1046
1047 mlirOperationDestroy(testOp);
1048}
1049
1050TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_SetLhs) {
1051 auto testOp = createIndexOperation();
1052
1053 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1054 auto dummyValue = mlirOperationGetResult(testOp, 0);
1055 llzkFelt_ShrFeltOpSetLhs(testOp, dummyValue);
1056 }
1057
1058 mlirOperationDestroy(testOp);
1059}
1060
1061TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_GetRhs) {
1062 auto testOp = createIndexOperation();
1063
1064 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1065 (void)llzkFelt_ShrFeltOpGetRhs(testOp);
1066 }
1067
1068 mlirOperationDestroy(testOp);
1069}
1070
1071TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_SetRhs) {
1072 auto testOp = createIndexOperation();
1073
1074 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1075 auto dummyValue = mlirOperationGetResult(testOp, 0);
1076 llzkFelt_ShrFeltOpSetRhs(testOp, dummyValue);
1077 }
1078
1079 mlirOperationDestroy(testOp);
1080}
1081
1082TEST_F(FeltOperationLinkTests, llzk_ShrFeltOp_GetResult) {
1083 auto testOp = createIndexOperation();
1084
1085 if (llzkOperationIsA_Felt_ShrFeltOp(testOp)) {
1086 (void)llzkFelt_ShrFeltOpGetResult(testOp);
1087 }
1088
1089 mlirOperationDestroy(testOp);
1090}
1091
1093TEST_F(FeltOperationLinkTests, IsA_Felt_SignedIntDivFeltOp) {
1094 auto testOperation = createIndexOperation();
1095
1096 // This will always return false since `createIndex*` returns an MLIR builtin
1097 EXPECT_FALSE(llzkOperationIsA_Felt_SignedIntDivFeltOp(testOperation));
1098
1099 mlirOperationDestroy(testOperation);
1100}
1101
1103TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_Build) {
1104 // Returns an `arith.constant` op, which will never match the SignedIntDivFeltOp dialect check.
1105 auto testOp = createIndexOperation();
1106
1107 // This condition is always false, so the function is never actually called.
1108 // We only verify it compiles and links correctly.
1110 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1111 MlirLocation location = mlirLocationUnknownGet(context);
1112 auto dummyValue = mlirOperationGetResult(testOp, 0);
1113 auto resultType = createIndexType();
1114
1115 (void)llzkFelt_SignedIntDivFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1116 // No need to destroy builder or op since this code never runs.
1117 }
1118
1119 mlirOperationDestroy(testOp);
1120}
1121
1122struct SignedIntDivFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1123 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_SignedIntDivFeltOp(op); }
1127 static std::unique_ptr<SignedIntDivFeltOpBuildFuncHelper> get();
1128
1129protected:
1131};
1132
1135TEST_F(CAPITest, SignedIntDivFeltOp_build_pass) { SignedIntDivFeltOpBuildFuncHelper::get()->run(*this); }
1136
1137TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_GetLhs) {
1138 auto testOp = createIndexOperation();
1139
1142 }
1143
1144 mlirOperationDestroy(testOp);
1145}
1146
1147TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_SetLhs) {
1148 auto testOp = createIndexOperation();
1149
1151 auto dummyValue = mlirOperationGetResult(testOp, 0);
1152 llzkFelt_SignedIntDivFeltOpSetLhs(testOp, dummyValue);
1153 }
1154
1155 mlirOperationDestroy(testOp);
1156}
1157
1158TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_GetRhs) {
1159 auto testOp = createIndexOperation();
1160
1163 }
1164
1165 mlirOperationDestroy(testOp);
1166}
1167
1168TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_SetRhs) {
1169 auto testOp = createIndexOperation();
1170
1172 auto dummyValue = mlirOperationGetResult(testOp, 0);
1173 llzkFelt_SignedIntDivFeltOpSetRhs(testOp, dummyValue);
1174 }
1175
1176 mlirOperationDestroy(testOp);
1177}
1178
1179TEST_F(FeltOperationLinkTests, llzk_SignedIntDivFeltOp_GetResult) {
1180 auto testOp = createIndexOperation();
1181
1184 }
1185
1186 mlirOperationDestroy(testOp);
1187}
1188
1190TEST_F(FeltOperationLinkTests, IsA_Felt_SignedModFeltOp) {
1191 auto testOperation = createIndexOperation();
1192
1193 // This will always return false since `createIndex*` returns an MLIR builtin
1194 EXPECT_FALSE(llzkOperationIsA_Felt_SignedModFeltOp(testOperation));
1195
1196 mlirOperationDestroy(testOperation);
1197}
1198
1200TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_Build) {
1201 // Returns an `arith.constant` op, which will never match the SignedModFeltOp dialect check.
1202 auto testOp = createIndexOperation();
1203
1204 // This condition is always false, so the function is never actually called.
1205 // We only verify it compiles and links correctly.
1207 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1208 MlirLocation location = mlirLocationUnknownGet(context);
1209 auto dummyValue = mlirOperationGetResult(testOp, 0);
1210 auto resultType = createIndexType();
1211
1212 (void)llzkFelt_SignedModFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1213 // No need to destroy builder or op since this code never runs.
1214 }
1215
1216 mlirOperationDestroy(testOp);
1217}
1218
1219struct SignedModFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1220 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_SignedModFeltOp(op); }
1224 static std::unique_ptr<SignedModFeltOpBuildFuncHelper> get();
1225
1226protected:
1228};
1229
1232TEST_F(CAPITest, SignedModFeltOp_build_pass) { SignedModFeltOpBuildFuncHelper::get()->run(*this); }
1233
1234TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_GetLhs) {
1235 auto testOp = createIndexOperation();
1236
1238 (void)llzkFelt_SignedModFeltOpGetLhs(testOp);
1239 }
1240
1241 mlirOperationDestroy(testOp);
1242}
1243
1244TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_SetLhs) {
1245 auto testOp = createIndexOperation();
1246
1248 auto dummyValue = mlirOperationGetResult(testOp, 0);
1249 llzkFelt_SignedModFeltOpSetLhs(testOp, dummyValue);
1250 }
1251
1252 mlirOperationDestroy(testOp);
1253}
1254
1255TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_GetRhs) {
1256 auto testOp = createIndexOperation();
1257
1259 (void)llzkFelt_SignedModFeltOpGetRhs(testOp);
1260 }
1261
1262 mlirOperationDestroy(testOp);
1263}
1264
1265TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_SetRhs) {
1266 auto testOp = createIndexOperation();
1267
1269 auto dummyValue = mlirOperationGetResult(testOp, 0);
1270 llzkFelt_SignedModFeltOpSetRhs(testOp, dummyValue);
1271 }
1272
1273 mlirOperationDestroy(testOp);
1274}
1275
1276TEST_F(FeltOperationLinkTests, llzk_SignedModFeltOp_GetResult) {
1277 auto testOp = createIndexOperation();
1278
1281 }
1282
1283 mlirOperationDestroy(testOp);
1284}
1285
1287TEST_F(FeltOperationLinkTests, IsA_Felt_SubFeltOp) {
1288 auto testOperation = createIndexOperation();
1289
1290 // This will always return false since `createIndex*` returns an MLIR builtin
1291 EXPECT_FALSE(llzkOperationIsA_Felt_SubFeltOp(testOperation));
1292
1293 mlirOperationDestroy(testOperation);
1294}
1295
1297TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_Build) {
1298 // Returns an `arith.constant` op, which will never match the SubFeltOp dialect check.
1299 auto testOp = createIndexOperation();
1300
1301 // This condition is always false, so the function is never actually called.
1302 // We only verify it compiles and links correctly.
1303 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1304 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1305 MlirLocation location = mlirLocationUnknownGet(context);
1306 auto dummyValue = mlirOperationGetResult(testOp, 0);
1307 auto resultType = createIndexType();
1308
1309 (void)llzkFelt_SubFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1310 // No need to destroy builder or op since this code never runs.
1311 }
1312
1313 mlirOperationDestroy(testOp);
1314}
1315
1316struct SubFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1317 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_SubFeltOp(op); }
1321 static std::unique_ptr<SubFeltOpBuildFuncHelper> get();
1322
1323protected:
1325};
1326
1329TEST_F(CAPITest, SubFeltOp_build_pass) { SubFeltOpBuildFuncHelper::get()->run(*this); }
1330
1331TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_GetLhs) {
1332 auto testOp = createIndexOperation();
1333
1334 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1335 (void)llzkFelt_SubFeltOpGetLhs(testOp);
1336 }
1337
1338 mlirOperationDestroy(testOp);
1339}
1340
1341TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_SetLhs) {
1342 auto testOp = createIndexOperation();
1343
1344 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1345 auto dummyValue = mlirOperationGetResult(testOp, 0);
1346 llzkFelt_SubFeltOpSetLhs(testOp, dummyValue);
1347 }
1348
1349 mlirOperationDestroy(testOp);
1350}
1351
1352TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_GetRhs) {
1353 auto testOp = createIndexOperation();
1354
1355 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1356 (void)llzkFelt_SubFeltOpGetRhs(testOp);
1357 }
1358
1359 mlirOperationDestroy(testOp);
1360}
1361
1362TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_SetRhs) {
1363 auto testOp = createIndexOperation();
1364
1365 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1366 auto dummyValue = mlirOperationGetResult(testOp, 0);
1367 llzkFelt_SubFeltOpSetRhs(testOp, dummyValue);
1368 }
1369
1370 mlirOperationDestroy(testOp);
1371}
1372
1373TEST_F(FeltOperationLinkTests, llzk_SubFeltOp_GetResult) {
1374 auto testOp = createIndexOperation();
1375
1376 if (llzkOperationIsA_Felt_SubFeltOp(testOp)) {
1377 (void)llzkFelt_SubFeltOpGetResult(testOp);
1378 }
1379
1380 mlirOperationDestroy(testOp);
1381}
1382
1384TEST_F(FeltOperationLinkTests, IsA_Felt_UnsignedIntDivFeltOp) {
1385 auto testOperation = createIndexOperation();
1386
1387 // This will always return false since `createIndex*` returns an MLIR builtin
1388 EXPECT_FALSE(llzkOperationIsA_Felt_UnsignedIntDivFeltOp(testOperation));
1389
1390 mlirOperationDestroy(testOperation);
1391}
1392
1394TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_Build) {
1395 // Returns an `arith.constant` op, which will never match the UnsignedIntDivFeltOp dialect check.
1396 auto testOp = createIndexOperation();
1397
1398 // This condition is always false, so the function is never actually called.
1399 // We only verify it compiles and links correctly.
1401 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1402 MlirLocation location = mlirLocationUnknownGet(context);
1403 auto dummyValue = mlirOperationGetResult(testOp, 0);
1404 auto resultType = createIndexType();
1405
1406 (void)llzkFelt_UnsignedIntDivFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1407 // No need to destroy builder or op since this code never runs.
1408 }
1409
1410 mlirOperationDestroy(testOp);
1411}
1412
1413struct UnsignedIntDivFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1414 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_UnsignedIntDivFeltOp(op); }
1418 static std::unique_ptr<UnsignedIntDivFeltOpBuildFuncHelper> get();
1419
1420protected:
1422};
1423
1426TEST_F(CAPITest, UnsignedIntDivFeltOp_build_pass) { UnsignedIntDivFeltOpBuildFuncHelper::get()->run(*this); }
1427
1428TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_GetLhs) {
1429 auto testOp = createIndexOperation();
1430
1433 }
1434
1435 mlirOperationDestroy(testOp);
1436}
1437
1438TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_SetLhs) {
1439 auto testOp = createIndexOperation();
1440
1442 auto dummyValue = mlirOperationGetResult(testOp, 0);
1443 llzkFelt_UnsignedIntDivFeltOpSetLhs(testOp, dummyValue);
1444 }
1445
1446 mlirOperationDestroy(testOp);
1447}
1448
1449TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_GetRhs) {
1450 auto testOp = createIndexOperation();
1451
1454 }
1455
1456 mlirOperationDestroy(testOp);
1457}
1458
1459TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_SetRhs) {
1460 auto testOp = createIndexOperation();
1461
1463 auto dummyValue = mlirOperationGetResult(testOp, 0);
1464 llzkFelt_UnsignedIntDivFeltOpSetRhs(testOp, dummyValue);
1465 }
1466
1467 mlirOperationDestroy(testOp);
1468}
1469
1470TEST_F(FeltOperationLinkTests, llzk_UnsignedIntDivFeltOp_GetResult) {
1471 auto testOp = createIndexOperation();
1472
1475 }
1476
1477 mlirOperationDestroy(testOp);
1478}
1479
1481TEST_F(FeltOperationLinkTests, IsA_Felt_UnsignedModFeltOp) {
1482 auto testOperation = createIndexOperation();
1483
1484 // This will always return false since `createIndex*` returns an MLIR builtin
1485 EXPECT_FALSE(llzkOperationIsA_Felt_UnsignedModFeltOp(testOperation));
1486
1487 mlirOperationDestroy(testOperation);
1488}
1489
1491TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_Build) {
1492 // Returns an `arith.constant` op, which will never match the UnsignedModFeltOp dialect check.
1493 auto testOp = createIndexOperation();
1494
1495 // This condition is always false, so the function is never actually called.
1496 // We only verify it compiles and links correctly.
1498 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1499 MlirLocation location = mlirLocationUnknownGet(context);
1500 auto dummyValue = mlirOperationGetResult(testOp, 0);
1501 auto resultType = createIndexType();
1502
1503 (void)llzkFelt_UnsignedModFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1504 // No need to destroy builder or op since this code never runs.
1505 }
1506
1507 mlirOperationDestroy(testOp);
1508}
1509
1510struct UnsignedModFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1511 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_UnsignedModFeltOp(op); }
1515 static std::unique_ptr<UnsignedModFeltOpBuildFuncHelper> get();
1516
1517protected:
1519};
1520
1523TEST_F(CAPITest, UnsignedModFeltOp_build_pass) { UnsignedModFeltOpBuildFuncHelper::get()->run(*this); }
1524
1525TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_GetLhs) {
1526 auto testOp = createIndexOperation();
1527
1530 }
1531
1532 mlirOperationDestroy(testOp);
1533}
1534
1535TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_SetLhs) {
1536 auto testOp = createIndexOperation();
1537
1539 auto dummyValue = mlirOperationGetResult(testOp, 0);
1540 llzkFelt_UnsignedModFeltOpSetLhs(testOp, dummyValue);
1541 }
1542
1543 mlirOperationDestroy(testOp);
1544}
1545
1546TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_GetRhs) {
1547 auto testOp = createIndexOperation();
1548
1551 }
1552
1553 mlirOperationDestroy(testOp);
1554}
1555
1556TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_SetRhs) {
1557 auto testOp = createIndexOperation();
1558
1560 auto dummyValue = mlirOperationGetResult(testOp, 0);
1561 llzkFelt_UnsignedModFeltOpSetRhs(testOp, dummyValue);
1562 }
1563
1564 mlirOperationDestroy(testOp);
1565}
1566
1567TEST_F(FeltOperationLinkTests, llzk_UnsignedModFeltOp_GetResult) {
1568 auto testOp = createIndexOperation();
1569
1572 }
1573
1574 mlirOperationDestroy(testOp);
1575}
1576
1578TEST_F(FeltOperationLinkTests, IsA_Felt_XorFeltOp) {
1579 auto testOperation = createIndexOperation();
1580
1581 // This will always return false since `createIndex*` returns an MLIR builtin
1582 EXPECT_FALSE(llzkOperationIsA_Felt_XorFeltOp(testOperation));
1583
1584 mlirOperationDestroy(testOperation);
1585}
1586
1588TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_Build) {
1589 // Returns an `arith.constant` op, which will never match the XorFeltOp dialect check.
1590 auto testOp = createIndexOperation();
1591
1592 // This condition is always false, so the function is never actually called.
1593 // We only verify it compiles and links correctly.
1594 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1595 MlirOpBuilder builder = mlirOpBuilderCreate(context);
1596 MlirLocation location = mlirLocationUnknownGet(context);
1597 auto dummyValue = mlirOperationGetResult(testOp, 0);
1598 auto resultType = createIndexType();
1599
1600 (void)llzkFelt_XorFeltOpBuild(builder, location, resultType, dummyValue, dummyValue);
1601 // No need to destroy builder or op since this code never runs.
1602 }
1603
1604 mlirOperationDestroy(testOp);
1605}
1606
1607struct XorFeltOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
1608 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Felt_XorFeltOp(op); }
1612 static std::unique_ptr<XorFeltOpBuildFuncHelper> get();
1613
1614protected:
1616};
1617
1620TEST_F(CAPITest, XorFeltOp_build_pass) { XorFeltOpBuildFuncHelper::get()->run(*this); }
1621
1622TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_GetLhs) {
1623 auto testOp = createIndexOperation();
1624
1625 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1626 (void)llzkFelt_XorFeltOpGetLhs(testOp);
1627 }
1628
1629 mlirOperationDestroy(testOp);
1630}
1631
1632TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_SetLhs) {
1633 auto testOp = createIndexOperation();
1634
1635 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1636 auto dummyValue = mlirOperationGetResult(testOp, 0);
1637 llzkFelt_XorFeltOpSetLhs(testOp, dummyValue);
1638 }
1639
1640 mlirOperationDestroy(testOp);
1641}
1642
1643TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_GetRhs) {
1644 auto testOp = createIndexOperation();
1645
1646 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1647 (void)llzkFelt_XorFeltOpGetRhs(testOp);
1648 }
1649
1650 mlirOperationDestroy(testOp);
1651}
1652
1653TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_SetRhs) {
1654 auto testOp = createIndexOperation();
1655
1656 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1657 auto dummyValue = mlirOperationGetResult(testOp, 0);
1658 llzkFelt_XorFeltOpSetRhs(testOp, dummyValue);
1659 }
1660
1661 mlirOperationDestroy(testOp);
1662}
1663
1664TEST_F(FeltOperationLinkTests, llzk_XorFeltOp_GetResult) {
1665 auto testOp = createIndexOperation();
1666
1667 if (llzkOperationIsA_Felt_XorFeltOp(testOp)) {
1668 (void)llzkFelt_XorFeltOpGetResult(testOp);
1669 }
1670
1671 mlirOperationDestroy(testOp);
1672}
TEST_F(ArrayOperationLinkTests, IsA_Array_ArrayLengthOp)
This test ensures llzkOperationIsA_Array_ArrayLengthOp links properly.
MlirOpBuilder mlirOpBuilderCreate(MlirContext ctx)
Creates a new OpBuilder for the given MLIR context.
Definition Builder.cpp:62
MlirValue llzkFelt_AddFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::XorFeltOp Operation.
MlirOperation llzkFelt_SignedIntDivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_ShrFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::ShrFeltOp Operation.
void llzkFelt_UnsignedModFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SubFeltOp Operation.
bool llzkOperationIsA_Felt_SubFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SubFeltOp.
bool llzkOperationIsA_Felt_ShlFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::ShlFeltOp.
void llzkFelt_SubFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SubFeltOp Operation.
MlirOperation llzkFelt_PowFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::PowFeltOp Operation.
void llzkFelt_AddFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_PowFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::PowFeltOp Operation.
MlirOperation llzkFelt_AddFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::AddFeltOp Operation.
void llzkFelt_ShrFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_NegFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::NegFeltOp Operation.
void llzkFelt_UnsignedIntDivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::MulFeltOp Operation.
MlirOperation llzkFelt_NotFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_FeltConstantOpGetResult(MlirOperation op)
Get Result result from llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_MulFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::MulFeltOp.
bool llzkOperationIsA_Felt_SignedModFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SignedModFeltOp.
MlirValue llzkFelt_ShrFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::ShrFeltOp Operation.
bool llzkOperationIsA_Felt_FeltConstantOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::FeltConstantOp.
MlirValue llzkFelt_PowFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::PowFeltOp Operation.
MlirValue llzkFelt_InvFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::InvFeltOp Operation.
MlirValue llzkFelt_DivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_PowFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::PowFeltOp Operation.
MlirOperation llzkFelt_XorFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::XorFeltOp Operation.
MlirValue llzkFelt_InvFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::InvFeltOp Operation.
void llzkFelt_SignedIntDivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SignedIntDivFeltOp Operation.
void llzkFelt_DivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_UnsignedModFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_SignedModFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_OrFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_NegFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::NegFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_ShrFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_AndFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::AndFeltOp Operation.
void llzkFelt_InvFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::InvFeltOp Operation.
void llzkFelt_SubFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_DivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::DivFeltOp Operation.
bool llzkOperationIsA_Felt_ShrFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::ShrFeltOp.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::ShlFeltOp Operation.
void llzkFelt_MulFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::MulFeltOp Operation.
bool llzkOperationIsA_Felt_DivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::DivFeltOp.
MlirValue llzkFelt_AddFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_NotFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::NotFeltOp Operation.
bool llzkOperationIsA_Felt_NegFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::NegFeltOp.
MlirOperation llzkFelt_SubFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::XorFeltOp Operation.
MlirOperation llzkFelt_OrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_NegFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::NegFeltOp Operation.
MlirOperation llzkFelt_ShlFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SubFeltOp Operation.
void llzkFelt_OrFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::OrFeltOp Operation.
MlirOperation llzkFelt_InvFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::InvFeltOp Operation.
void llzkFelt_SignedModFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SignedModFeltOp Operation.
void llzkFelt_UnsignedModFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::UnsignedModFeltOp Operation.
void llzkFelt_SignedModFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SignedModFeltOp Operation.
MlirValue llzkFelt_AddFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::AddFeltOp Operation.
MlirOperation llzkFelt_UnsignedIntDivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::UnsignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_AndFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::AndFeltOp.
MlirOperation llzkFelt_SignedModFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SignedModFeltOp Operation.
MlirOperation llzkFelt_ShrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_DivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::DivFeltOp Operation.
void llzkFelt_FeltConstantOpSetValue(MlirOperation op, MlirAttribute attr)
Set Value attribute of llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_XorFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::XorFeltOp.
MlirValue llzkFelt_SignedIntDivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::XorFeltOp Operation.
void llzkFelt_PowFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::PowFeltOp Operation.
void llzkFelt_XorFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::XorFeltOp Operation.
void llzkFelt_NotFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_SignedIntDivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_PowFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::PowFeltOp.
void llzkFelt_XorFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::XorFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::MulFeltOp Operation.
void llzkFelt_ShlFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::ShlFeltOp Operation.
void llzkFelt_SignedIntDivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_SignedModFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_UnsignedIntDivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::UnsignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_UnsignedModFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::UnsignedModFeltOp.
void llzkFelt_ShlFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_UnsignedModFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::OrFeltOp Operation.
bool llzkOperationIsA_Felt_InvFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::InvFeltOp.
bool llzkOperationIsA_Felt_OrFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::OrFeltOp.
MlirValue llzkFelt_UnsignedModFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::UnsignedModFeltOp Operation.
bool llzkOperationIsA_Felt_NotFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::NotFeltOp.
MlirAttribute llzkFelt_FeltConstantOpGetValue(MlirOperation op)
Get Value attribute from llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_SignedIntDivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SignedIntDivFeltOp.
MlirValue llzkFelt_DivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::DivFeltOp Operation.
void llzkFelt_AndFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::ShlFeltOp Operation.
void llzkFelt_AddFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::AddFeltOp Operation.
bool llzkOperationIsA_Felt_UnsignedIntDivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::UnsignedIntDivFeltOp.
MlirValue llzkFelt_SignedModFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_DivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::AndFeltOp Operation.
void llzkFelt_MulFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::MulFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::OrFeltOp Operation.
void llzkFelt_ShrFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::ShrFeltOp Operation.
MlirValue llzkFelt_NotFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_SignedIntDivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SignedIntDivFeltOp Operation.
MlirOperation llzkFelt_FeltConstantOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirAttribute value)
Build a llzk::felt::FeltConstantOp Operation.
MlirOperation llzkFelt_MulFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::MulFeltOp Operation.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::UnsignedIntDivFeltOp Operation.
void llzkFelt_AndFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::MulFeltOp Operation.
MlirOperation llzkFelt_UnsignedModFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::UnsignedModFeltOp Operation.
bool llzkOperationIsA_Felt_AddFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::AddFeltOp.
void llzkFelt_NegFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::NegFeltOp Operation.
void llzkFelt_PowFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::PowFeltOp Operation.
static std::unique_ptr< AddFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of AddFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
AddFeltOpBuildFuncHelper()=default
AndFeltOpBuildFuncHelper()=default
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< AndFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of AndFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
DivFeltOpBuildFuncHelper()=default
static std::unique_ptr< DivFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of DivFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< FeltConstantOpBuildFuncHelper > get()
This method must be implemented to return a subclass of FeltConstantOpBuildFuncHelper that at least i...
static std::unique_ptr< InvFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of InvFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
InvFeltOpBuildFuncHelper()=default
MulFeltOpBuildFuncHelper()=default
static std::unique_ptr< MulFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of MulFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
NegFeltOpBuildFuncHelper()=default
static std::unique_ptr< NegFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of NegFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
NotFeltOpBuildFuncHelper()=default
static std::unique_ptr< NotFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of NotFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
OrFeltOpBuildFuncHelper()=default
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< OrFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of OrFeltOpBuildFuncHelper that at least impleme...
virtual bool callIsA(MlirOperation op) override
PowFeltOpBuildFuncHelper()=default
static std::unique_ptr< PowFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of PowFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
ShlFeltOpBuildFuncHelper()=default
static std::unique_ptr< ShlFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ShlFeltOpBuildFuncHelper that at least implem...
ShrFeltOpBuildFuncHelper()=default
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< ShrFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ShrFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< SignedIntDivFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of SignedIntDivFeltOpBuildFuncHelper that at lea...
static std::unique_ptr< SignedModFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of SignedModFeltOpBuildFuncHelper that at least ...
virtual bool callIsA(MlirOperation op) override
virtual bool callIsA(MlirOperation op) override
SubFeltOpBuildFuncHelper()=default
static std::unique_ptr< SubFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of SubFeltOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< UnsignedIntDivFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of UnsignedIntDivFeltOpBuildFuncHelper that at l...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< UnsignedModFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of UnsignedModFeltOpBuildFuncHelper that at leas...
static std::unique_ptr< XorFeltOpBuildFuncHelper > get()
This method must be implemented to return a subclass of XorFeltOpBuildFuncHelper that at least implem...
XorFeltOpBuildFuncHelper()=default
virtual bool callIsA(MlirOperation op) override