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 ArrayOperationLinkTests : public CAPITest {};
11
13TEST_F(ArrayOperationLinkTests, IsA_Array_ArrayLengthOp) {
14 auto testOperation = createIndexOperation();
15
16 // This will always return false since `createIndex*` returns an MLIR builtin
17 EXPECT_FALSE(llzkOperationIsA_Array_ArrayLengthOp(testOperation));
18
19 mlirOperationDestroy(testOperation);
20}
21
23TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_Build) {
24 // Returns an `arith.constant` op, which will never match the ArrayLengthOp 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
34 (void)llzkArray_ArrayLengthOpBuild(builder, location, dummyValue, dummyValue);
35 // No need to destroy builder or op since this code never runs.
36 }
37
38 mlirOperationDestroy(testOp);
39}
40
41struct ArrayLengthOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
42 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_ArrayLengthOp(op); }
46 static std::unique_ptr<ArrayLengthOpBuildFuncHelper> get();
47
48protected:
50};
51
54TEST_F(CAPITest, ArrayLengthOp_build_pass) { ArrayLengthOpBuildFuncHelper::get()->run(*this); }
55
56TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_GetArrRef) {
57 auto testOp = createIndexOperation();
58
61 }
62
63 mlirOperationDestroy(testOp);
64}
65
66TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_SetArrRef) {
67 auto testOp = createIndexOperation();
68
70 auto dummyValue = mlirOperationGetResult(testOp, 0);
71 llzkArray_ArrayLengthOpSetArrRef(testOp, dummyValue);
72 }
73
74 mlirOperationDestroy(testOp);
75}
76
77TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_GetDim) {
78 auto testOp = createIndexOperation();
79
82 }
83
84 mlirOperationDestroy(testOp);
85}
86
87TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_SetDim) {
88 auto testOp = createIndexOperation();
89
91 auto dummyValue = mlirOperationGetResult(testOp, 0);
92 llzkArray_ArrayLengthOpSetDim(testOp, dummyValue);
93 }
94
95 mlirOperationDestroy(testOp);
96}
97
98TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_GetLength) {
99 auto testOp = createIndexOperation();
100
103 }
104
105 mlirOperationDestroy(testOp);
106}
107
109TEST_F(ArrayOperationLinkTests, llzk_ArrayLengthOp_GetArrRefType) {
110 auto testOperation = createIndexOperation();
111
112 if (llzkOperationIsA_Array_ArrayLengthOp(testOperation)) {
113
114 (void)llzkArray_ArrayLengthOpGetArrRefType(testOperation);
115 }
116
117 mlirOperationDestroy(testOperation);
118}
119
121TEST_F(ArrayOperationLinkTests, IsA_Array_CreateArrayOp) {
122 auto testOperation = createIndexOperation();
123
124 // This will always return false since `createIndex*` returns an MLIR builtin
125 EXPECT_FALSE(llzkOperationIsA_Array_CreateArrayOp(testOperation));
126
127 mlirOperationDestroy(testOperation);
128}
129
130TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetElementsCount) {
131 auto testOp = createIndexOperation();
132
135 }
136
137 mlirOperationDestroy(testOp);
138}
139
140TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetElementsAt) {
141 auto testOp = createIndexOperation();
142
145 }
146
147 mlirOperationDestroy(testOp);
148}
149
150TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetElements_Variadic) {
151 auto testOp = createIndexOperation();
152
154 auto dummyValue = mlirOperationGetResult(testOp, 0);
155 MlirValue values[] = {dummyValue};
156 llzkArray_CreateArrayOpSetElements(testOp, 1, values);
157 }
158
159 mlirOperationDestroy(testOp);
160}
161
162TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetMapOperandsCount) {
163 auto testOp = createIndexOperation();
164
167 }
168
169 mlirOperationDestroy(testOp);
170}
171
172TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetMapOperandsAt) {
173 auto testOp = createIndexOperation();
174
177 }
178
179 mlirOperationDestroy(testOp);
180}
181
182TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetMapOperands_Variadic) {
183 auto testOp = createIndexOperation();
184
186 auto dummyValue = mlirOperationGetResult(testOp, 0);
187 MlirValue values[] = {dummyValue};
188 llzkArray_CreateArrayOpSetMapOperands(testOp, 1, values);
189 }
190
191 mlirOperationDestroy(testOp);
192}
193
194TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetNumDimsPerMapAttr) {
195 auto testOp = createIndexOperation();
196
199 }
200
201 mlirOperationDestroy(testOp);
202}
203
204TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetNumDimsPerMapAttr) {
205 auto testOp = createIndexOperation();
206
208 llzkArray_CreateArrayOpSetNumDimsPerMap(testOp, createIndexAttribute());
209 }
210
211 mlirOperationDestroy(testOp);
212}
213
214TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetMapOpGroupSizesAttr) {
215 auto testOp = createIndexOperation();
216
219 }
220
221 mlirOperationDestroy(testOp);
222}
223
224TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetMapOpGroupSizesAttr) {
225 auto testOp = createIndexOperation();
226
228 llzkArray_CreateArrayOpSetMapOpGroupSizes(testOp, createIndexAttribute());
229 }
230
231 mlirOperationDestroy(testOp);
232}
233
234TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetResult) {
235 auto testOp = createIndexOperation();
236
239 }
240
241 mlirOperationDestroy(testOp);
242}
243
245TEST_F(ArrayOperationLinkTests, IsA_Array_ExtractArrayOp) {
246 auto testOperation = createIndexOperation();
247
248 // This will always return false since `createIndex*` returns an MLIR builtin
249 EXPECT_FALSE(llzkOperationIsA_Array_ExtractArrayOp(testOperation));
250
251 mlirOperationDestroy(testOperation);
252}
253
255TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_Build) {
256 // Returns an `arith.constant` op, which will never match the ExtractArrayOp dialect check.
257 auto testOp = createIndexOperation();
258
259 // This condition is always false, so the function is never actually called.
260 // We only verify it compiles and links correctly.
262 MlirOpBuilder builder = mlirOpBuilderCreate(context);
263 MlirLocation location = mlirLocationUnknownGet(context);
264 auto dummyValue = mlirOperationGetResult(testOp, 0);
265 auto resultType = createIndexType();
266 MlirValue indicesValues[] = {dummyValue};
267 intptr_t indicesSize = 0;
268
269 (void)llzkArray_ExtractArrayOpBuild(builder, location, resultType, dummyValue, indicesSize, indicesValues);
270 // No need to destroy builder or op since this code never runs.
271 }
272
273 mlirOperationDestroy(testOp);
274}
275
276struct ExtractArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
277 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_ExtractArrayOp(op); }
281 static std::unique_ptr<ExtractArrayOpBuildFuncHelper> get();
282
283protected:
285};
286
289TEST_F(CAPITest, ExtractArrayOp_build_pass) { ExtractArrayOpBuildFuncHelper::get()->run(*this); }
290
291TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetArrRef) {
292 auto testOp = createIndexOperation();
293
296 }
297
298 mlirOperationDestroy(testOp);
299}
300
301TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_SetArrRef) {
302 auto testOp = createIndexOperation();
303
305 auto dummyValue = mlirOperationGetResult(testOp, 0);
306 llzkArray_ExtractArrayOpSetArrRef(testOp, dummyValue);
307 }
308
309 mlirOperationDestroy(testOp);
310}
311
312TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetIndicesCount) {
313 auto testOp = createIndexOperation();
314
317 }
318
319 mlirOperationDestroy(testOp);
320}
321
322TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetIndicesAt) {
323 auto testOp = createIndexOperation();
324
327 }
328
329 mlirOperationDestroy(testOp);
330}
331
332TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_SetIndices_Variadic) {
333 auto testOp = createIndexOperation();
334
336 auto dummyValue = mlirOperationGetResult(testOp, 0);
337 MlirValue values[] = {dummyValue};
338 llzkArray_ExtractArrayOpSetIndices(testOp, 1, values);
339 }
340
341 mlirOperationDestroy(testOp);
342}
343
344TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetResult) {
345 auto testOp = createIndexOperation();
346
349 }
350
351 mlirOperationDestroy(testOp);
352}
353
355TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetArrRefType) {
356 auto testOperation = createIndexOperation();
357
358 if (llzkOperationIsA_Array_ExtractArrayOp(testOperation)) {
359
360 (void)llzkArray_ExtractArrayOpGetArrRefType(testOperation);
361 }
362
363 mlirOperationDestroy(testOperation);
364}
365
367TEST_F(ArrayOperationLinkTests, IsA_Array_InsertArrayOp) {
368 auto testOperation = createIndexOperation();
369
370 // This will always return false since `createIndex*` returns an MLIR builtin
371 EXPECT_FALSE(llzkOperationIsA_Array_InsertArrayOp(testOperation));
372
373 mlirOperationDestroy(testOperation);
374}
375
377TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_Build) {
378 // Returns an `arith.constant` op, which will never match the InsertArrayOp dialect check.
379 auto testOp = createIndexOperation();
380
381 // This condition is always false, so the function is never actually called.
382 // We only verify it compiles and links correctly.
384 MlirOpBuilder builder = mlirOpBuilderCreate(context);
385 MlirLocation location = mlirLocationUnknownGet(context);
386 auto dummyValue = mlirOperationGetResult(testOp, 0);
387 MlirValue indicesValues[] = {dummyValue};
388 intptr_t indicesSize = 0;
389
390 (void)llzkArray_InsertArrayOpBuild(builder, location, dummyValue, indicesSize, indicesValues, dummyValue);
391 // No need to destroy builder or op since this code never runs.
392 }
393
394 mlirOperationDestroy(testOp);
395}
396
397struct InsertArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
398 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_InsertArrayOp(op); }
402 static std::unique_ptr<InsertArrayOpBuildFuncHelper> get();
403
404protected:
406};
407
410TEST_F(CAPITest, InsertArrayOp_build_pass) { InsertArrayOpBuildFuncHelper::get()->run(*this); }
411
412TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetArrRef) {
413 auto testOp = createIndexOperation();
414
417 }
418
419 mlirOperationDestroy(testOp);
420}
421
422TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetArrRef) {
423 auto testOp = createIndexOperation();
424
426 auto dummyValue = mlirOperationGetResult(testOp, 0);
427 llzkArray_InsertArrayOpSetArrRef(testOp, dummyValue);
428 }
429
430 mlirOperationDestroy(testOp);
431}
432
433TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetIndicesCount) {
434 auto testOp = createIndexOperation();
435
438 }
439
440 mlirOperationDestroy(testOp);
441}
442
443TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetIndicesAt) {
444 auto testOp = createIndexOperation();
445
448 }
449
450 mlirOperationDestroy(testOp);
451}
452
453TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetIndices_Variadic) {
454 auto testOp = createIndexOperation();
455
457 auto dummyValue = mlirOperationGetResult(testOp, 0);
458 MlirValue values[] = {dummyValue};
459 llzkArray_InsertArrayOpSetIndices(testOp, 1, values);
460 }
461
462 mlirOperationDestroy(testOp);
463}
464
465TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetRvalue) {
466 auto testOp = createIndexOperation();
467
470 }
471
472 mlirOperationDestroy(testOp);
473}
474
475TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetRvalue) {
476 auto testOp = createIndexOperation();
477
479 auto dummyValue = mlirOperationGetResult(testOp, 0);
480 llzkArray_InsertArrayOpSetRvalue(testOp, dummyValue);
481 }
482
483 mlirOperationDestroy(testOp);
484}
485
487TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetArrRefType) {
488 auto testOperation = createIndexOperation();
489
490 if (llzkOperationIsA_Array_InsertArrayOp(testOperation)) {
491
492 (void)llzkArray_InsertArrayOpGetArrRefType(testOperation);
493 }
494
495 mlirOperationDestroy(testOperation);
496}
497
499TEST_F(ArrayOperationLinkTests, IsA_Array_ReadArrayOp) {
500 auto testOperation = createIndexOperation();
501
502 // This will always return false since `createIndex*` returns an MLIR builtin
503 EXPECT_FALSE(llzkOperationIsA_Array_ReadArrayOp(testOperation));
504
505 mlirOperationDestroy(testOperation);
506}
507
509TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_Build) {
510 // Returns an `arith.constant` op, which will never match the ReadArrayOp dialect check.
511 auto testOp = createIndexOperation();
512
513 // This condition is always false, so the function is never actually called.
514 // We only verify it compiles and links correctly.
516 MlirOpBuilder builder = mlirOpBuilderCreate(context);
517 MlirLocation location = mlirLocationUnknownGet(context);
518 auto dummyValue = mlirOperationGetResult(testOp, 0);
519 auto resultType = createIndexType();
520 MlirValue indicesValues[] = {dummyValue};
521 intptr_t indicesSize = 0;
522
523 (void)llzkArray_ReadArrayOpBuild(builder, location, resultType, dummyValue, indicesSize, indicesValues);
524 // No need to destroy builder or op since this code never runs.
525 }
526
527 mlirOperationDestroy(testOp);
528}
529
530struct ReadArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
531 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_ReadArrayOp(op); }
535 static std::unique_ptr<ReadArrayOpBuildFuncHelper> get();
536
537protected:
539};
540
543TEST_F(CAPITest, ReadArrayOp_build_pass) { ReadArrayOpBuildFuncHelper::get()->run(*this); }
544
545TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetArrRef) {
546 auto testOp = createIndexOperation();
547
549 (void)llzkArray_ReadArrayOpGetArrRef(testOp);
550 }
551
552 mlirOperationDestroy(testOp);
553}
554
555TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_SetArrRef) {
556 auto testOp = createIndexOperation();
557
559 auto dummyValue = mlirOperationGetResult(testOp, 0);
560 llzkArray_ReadArrayOpSetArrRef(testOp, dummyValue);
561 }
562
563 mlirOperationDestroy(testOp);
564}
565
566TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetIndicesCount) {
567 auto testOp = createIndexOperation();
568
571 }
572
573 mlirOperationDestroy(testOp);
574}
575
576TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetIndicesAt) {
577 auto testOp = createIndexOperation();
578
580 (void)llzkArray_ReadArrayOpGetIndicesAt(testOp, 0);
581 }
582
583 mlirOperationDestroy(testOp);
584}
585
586TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_SetIndices_Variadic) {
587 auto testOp = createIndexOperation();
588
590 auto dummyValue = mlirOperationGetResult(testOp, 0);
591 MlirValue values[] = {dummyValue};
592 llzkArray_ReadArrayOpSetIndices(testOp, 1, values);
593 }
594
595 mlirOperationDestroy(testOp);
596}
597
598TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetResult) {
599 auto testOp = createIndexOperation();
600
602 (void)llzkArray_ReadArrayOpGetResult(testOp);
603 }
604
605 mlirOperationDestroy(testOp);
606}
607
609TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetArrRefType) {
610 auto testOperation = createIndexOperation();
611
612 if (llzkOperationIsA_Array_ReadArrayOp(testOperation)) {
613
614 (void)llzkArray_ReadArrayOpGetArrRefType(testOperation);
615 }
616
617 mlirOperationDestroy(testOperation);
618}
619
621TEST_F(ArrayOperationLinkTests, IsA_Array_WriteArrayOp) {
622 auto testOperation = createIndexOperation();
623
624 // This will always return false since `createIndex*` returns an MLIR builtin
625 EXPECT_FALSE(llzkOperationIsA_Array_WriteArrayOp(testOperation));
626
627 mlirOperationDestroy(testOperation);
628}
629
631TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_Build) {
632 // Returns an `arith.constant` op, which will never match the WriteArrayOp dialect check.
633 auto testOp = createIndexOperation();
634
635 // This condition is always false, so the function is never actually called.
636 // We only verify it compiles and links correctly.
638 MlirOpBuilder builder = mlirOpBuilderCreate(context);
639 MlirLocation location = mlirLocationUnknownGet(context);
640 auto dummyValue = mlirOperationGetResult(testOp, 0);
641 MlirValue indicesValues[] = {dummyValue};
642 intptr_t indicesSize = 0;
643
644 (void)llzkArray_WriteArrayOpBuild(builder, location, dummyValue, indicesSize, indicesValues, dummyValue);
645 // No need to destroy builder or op since this code never runs.
646 }
647
648 mlirOperationDestroy(testOp);
649}
650
651struct WriteArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
652 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_WriteArrayOp(op); }
656 static std::unique_ptr<WriteArrayOpBuildFuncHelper> get();
657
658protected:
660};
661
664TEST_F(CAPITest, WriteArrayOp_build_pass) { WriteArrayOpBuildFuncHelper::get()->run(*this); }
665
666TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetArrRef) {
667 auto testOp = createIndexOperation();
668
671 }
672
673 mlirOperationDestroy(testOp);
674}
675
676TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetArrRef) {
677 auto testOp = createIndexOperation();
678
680 auto dummyValue = mlirOperationGetResult(testOp, 0);
681 llzkArray_WriteArrayOpSetArrRef(testOp, dummyValue);
682 }
683
684 mlirOperationDestroy(testOp);
685}
686
687TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetIndicesCount) {
688 auto testOp = createIndexOperation();
689
692 }
693
694 mlirOperationDestroy(testOp);
695}
696
697TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetIndicesAt) {
698 auto testOp = createIndexOperation();
699
701 (void)llzkArray_WriteArrayOpGetIndicesAt(testOp, 0);
702 }
703
704 mlirOperationDestroy(testOp);
705}
706
707TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetIndices_Variadic) {
708 auto testOp = createIndexOperation();
709
711 auto dummyValue = mlirOperationGetResult(testOp, 0);
712 MlirValue values[] = {dummyValue};
713 llzkArray_WriteArrayOpSetIndices(testOp, 1, values);
714 }
715
716 mlirOperationDestroy(testOp);
717}
718
719TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetRvalue) {
720 auto testOp = createIndexOperation();
721
724 }
725
726 mlirOperationDestroy(testOp);
727}
728
729TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetRvalue) {
730 auto testOp = createIndexOperation();
731
733 auto dummyValue = mlirOperationGetResult(testOp, 0);
734 llzkArray_WriteArrayOpSetRvalue(testOp, dummyValue);
735 }
736
737 mlirOperationDestroy(testOp);
738}
739
741TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetArrRefType) {
742 auto testOperation = createIndexOperation();
743
744 if (llzkOperationIsA_Array_WriteArrayOp(testOperation)) {
745
746 (void)llzkArray_WriteArrayOpGetArrRefType(testOperation);
747 }
748
749 mlirOperationDestroy(testOperation);
750}
bool llzkOperationIsA_Array_InsertArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::InsertArrayOp.
MlirValue llzkArray_InsertArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::InsertArrayOp Operation.
MlirValue llzkArray_WriteArrayOpGetRvalue(MlirOperation op)
Get Rvalue operand from llzk::array::WriteArrayOp Operation.
void llzkArray_CreateArrayOpSetNumDimsPerMap(MlirOperation op, MlirAttribute attr)
Set NumDimsPerMap attribute of llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ReadArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ReadArrayOp Operation.
MlirType llzkArray_WriteArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
void llzkArray_InsertArrayOpSetRvalue(MlirOperation op, MlirValue value)
Set Rvalue operand of llzk::array::InsertArrayOp Operation.
void llzkArray_ArrayLengthOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ArrayLengthOp Operation.
intptr_t llzkArray_CreateArrayOpGetElementsCount(MlirOperation op)
Get number of Elements operands in llzk::array::CreateArrayOp Operation.
void llzkArray_ExtractArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ExtractArrayOp Operation.
bool llzkOperationIsA_Array_ExtractArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ExtractArrayOp.
void llzkArray_ArrayLengthOpSetDim(MlirOperation op, MlirValue value)
Set Dim operand of llzk::array::ArrayLengthOp Operation.
void llzkArray_CreateArrayOpSetMapOperands(MlirOperation op, intptr_t count, MlirValue const *values)
Set MapOperands operands of llzk::array::CreateArrayOp Operation.
MlirOperation llzkArray_ArrayLengthOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, MlirValue dim)
Build a llzk::array::ArrayLengthOp Operation.
void llzkArray_CreateArrayOpSetElements(MlirOperation op, intptr_t count, MlirValue const *values)
Set Elements operands of llzk::array::CreateArrayOp Operation.
void llzkArray_WriteArrayOpSetRvalue(MlirOperation op, MlirValue value)
Set Rvalue operand of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_InsertArrayOpGetRvalue(MlirOperation op)
Get Rvalue operand from llzk::array::InsertArrayOp Operation.
bool llzkOperationIsA_Array_ReadArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ReadArrayOp.
intptr_t llzkArray_WriteArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::WriteArrayOp Operation.
MlirType llzkArray_ReadArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_CreateArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::CreateArrayOp Operation.
intptr_t llzkArray_ReadArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::ReadArrayOp Operation.
void llzkArray_ReadArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetLength(MlirOperation op)
Get Length result from llzk::array::ArrayLengthOp Operation.
void llzkArray_InsertArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::InsertArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ExtractArrayOp Operation.
intptr_t llzkArray_ExtractArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::ExtractArrayOp Operation.
MlirType llzkArray_ArrayLengthOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirOperation llzkArray_InsertArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue)
Build a llzk::array::InsertArrayOp Operation.
MlirOperation llzkArray_ExtractArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices)
Build a llzk::array::ExtractArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::ExtractArrayOp Operation.
void llzkArray_ExtractArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::ExtractArrayOp Operation.
MlirType llzkArray_InsertArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_CreateArrayOpGetMapOperandsAt(MlirOperation op, intptr_t index)
Get MapOperands operand at index from llzk::array::CreateArrayOp Operation.
intptr_t llzkArray_InsertArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::InsertArrayOp Operation.
MlirAttribute llzkArray_CreateArrayOpGetMapOpGroupSizes(MlirOperation op)
Get MapOpGroupSizes attribute from llzk::array::CreateArrayOp Operation.
void llzkArray_WriteArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::ExtractArrayOp Operation.
MlirAttribute llzkArray_CreateArrayOpGetNumDimsPerMap(MlirOperation op)
Get NumDimsPerMap attribute from llzk::array::CreateArrayOp Operation.
bool llzkOperationIsA_Array_WriteArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::WriteArrayOp.
void llzkArray_ReadArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ReadArrayOp Operation.
intptr_t llzkArray_CreateArrayOpGetMapOperandsCount(MlirOperation op)
Get number of MapOperands operands in llzk::array::CreateArrayOp Operation.
MlirOperation llzkArray_ReadArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices)
Build a llzk::array::ReadArrayOp Operation.
void llzkArray_WriteArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_WriteArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::WriteArrayOp Operation.
MlirOperation llzkArray_WriteArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue)
Build a llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ArrayLengthOp Operation.
MlirType llzkArray_ExtractArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_WriteArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::WriteArrayOp Operation.
bool llzkOperationIsA_Array_CreateArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::CreateArrayOp.
void llzkArray_InsertArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::InsertArrayOp Operation.
bool llzkOperationIsA_Array_ArrayLengthOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ArrayLengthOp.
MlirValue llzkArray_ReadArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_InsertArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::InsertArrayOp Operation.
void llzkArray_CreateArrayOpSetMapOpGroupSizes(MlirOperation op, MlirAttribute attr)
Set MapOpGroupSizes attribute of llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ReadArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_CreateArrayOpGetElementsAt(MlirOperation op, intptr_t index)
Get Elements operand at index from llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetDim(MlirOperation op)
Get Dim operand from llzk::array::ArrayLengthOp Operation.
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
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< ArrayLengthOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ArrayLengthOpBuildFuncHelper that at least im...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< ExtractArrayOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ExtractArrayOpBuildFuncHelper that at least i...
static std::unique_ptr< InsertArrayOpBuildFuncHelper > get()
This method must be implemented to return a subclass of InsertArrayOpBuildFuncHelper that at least im...
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< ReadArrayOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ReadArrayOpBuildFuncHelper that at least impl...
virtual bool callIsA(MlirOperation op) override
ReadArrayOpBuildFuncHelper()=default
virtual bool callIsA(MlirOperation op) override
static std::unique_ptr< WriteArrayOpBuildFuncHelper > get()
This method must be implemented to return a subclass of WriteArrayOpBuildFuncHelper that at least imp...