LLZK 2.1.1
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_VariadicOfVariadic) {
183 auto testOp = createIndexOperation();
184
186 auto dummyValue = mlirOperationGetResult(testOp, 0);
187 MlirValueRange groups[1];
188 groups[0].values = &dummyValue;
189 groups[0].size = 1;
190 llzkArray_CreateArrayOpSetMapOperands(testOp, 1, groups);
191 }
192
193 mlirOperationDestroy(testOp);
194}
195
196TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetNumDimsPerMapAttr) {
197 auto testOp = createIndexOperation();
198
201 }
202
203 mlirOperationDestroy(testOp);
204}
205
206TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetNumDimsPerMapAttr) {
207 auto testOp = createIndexOperation();
208
210 llzkArray_CreateArrayOpSetNumDimsPerMap(testOp, createIndexAttribute());
211 }
212
213 mlirOperationDestroy(testOp);
214}
215
216TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetMapOpGroupSizesAttr) {
217 auto testOp = createIndexOperation();
218
221 }
222
223 mlirOperationDestroy(testOp);
224}
225
226TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_SetMapOpGroupSizesAttr) {
227 auto testOp = createIndexOperation();
228
230 llzkArray_CreateArrayOpSetMapOpGroupSizes(testOp, createIndexAttribute());
231 }
232
233 mlirOperationDestroy(testOp);
234}
235
236TEST_F(ArrayOperationLinkTests, llzk_CreateArrayOp_GetResult) {
237 auto testOp = createIndexOperation();
238
241 }
242
243 mlirOperationDestroy(testOp);
244}
245
247TEST_F(ArrayOperationLinkTests, IsA_Array_ExtractArrayOp) {
248 auto testOperation = createIndexOperation();
249
250 // This will always return false since `createIndex*` returns an MLIR builtin
251 EXPECT_FALSE(llzkOperationIsA_Array_ExtractArrayOp(testOperation));
252
253 mlirOperationDestroy(testOperation);
254}
255
257TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_Build) {
258 // Returns an `arith.constant` op, which will never match the ExtractArrayOp dialect check.
259 auto testOp = createIndexOperation();
260
261 // This condition is always false, so the function is never actually called.
262 // We only verify it compiles and links correctly.
264 MlirOpBuilder builder = mlirOpBuilderCreate(context);
265 MlirLocation location = mlirLocationUnknownGet(context);
266 auto dummyValue = mlirOperationGetResult(testOp, 0);
267 auto resultType = createIndexType();
268 MlirValue indicesValues[] = {dummyValue};
269 intptr_t indicesSize = 0;
270
271 (void)llzkArray_ExtractArrayOpBuild(builder, location, resultType, dummyValue, indicesSize, indicesValues);
272 // No need to destroy builder or op since this code never runs.
273 }
274
275 mlirOperationDestroy(testOp);
276}
277
278struct ExtractArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
279 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_ExtractArrayOp(op); }
283 static std::unique_ptr<ExtractArrayOpBuildFuncHelper> get();
284
285protected:
287};
288
291TEST_F(CAPITest, ExtractArrayOp_build_pass) { ExtractArrayOpBuildFuncHelper::get()->run(*this); }
292
293TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetArrRef) {
294 auto testOp = createIndexOperation();
295
298 }
299
300 mlirOperationDestroy(testOp);
301}
302
303TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_SetArrRef) {
304 auto testOp = createIndexOperation();
305
307 auto dummyValue = mlirOperationGetResult(testOp, 0);
308 llzkArray_ExtractArrayOpSetArrRef(testOp, dummyValue);
309 }
310
311 mlirOperationDestroy(testOp);
312}
313
314TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetIndicesCount) {
315 auto testOp = createIndexOperation();
316
319 }
320
321 mlirOperationDestroy(testOp);
322}
323
324TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetIndicesAt) {
325 auto testOp = createIndexOperation();
326
329 }
330
331 mlirOperationDestroy(testOp);
332}
333
334TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_SetIndices_Variadic) {
335 auto testOp = createIndexOperation();
336
338 auto dummyValue = mlirOperationGetResult(testOp, 0);
339 MlirValue values[] = {dummyValue};
340 llzkArray_ExtractArrayOpSetIndices(testOp, 1, values);
341 }
342
343 mlirOperationDestroy(testOp);
344}
345
346TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetResult) {
347 auto testOp = createIndexOperation();
348
351 }
352
353 mlirOperationDestroy(testOp);
354}
355
357TEST_F(ArrayOperationLinkTests, llzk_ExtractArrayOp_GetArrRefType) {
358 auto testOperation = createIndexOperation();
359
360 if (llzkOperationIsA_Array_ExtractArrayOp(testOperation)) {
361
362 (void)llzkArray_ExtractArrayOpGetArrRefType(testOperation);
363 }
364
365 mlirOperationDestroy(testOperation);
366}
367
369TEST_F(ArrayOperationLinkTests, IsA_Array_InsertArrayOp) {
370 auto testOperation = createIndexOperation();
371
372 // This will always return false since `createIndex*` returns an MLIR builtin
373 EXPECT_FALSE(llzkOperationIsA_Array_InsertArrayOp(testOperation));
374
375 mlirOperationDestroy(testOperation);
376}
377
379TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_Build) {
380 // Returns an `arith.constant` op, which will never match the InsertArrayOp dialect check.
381 auto testOp = createIndexOperation();
382
383 // This condition is always false, so the function is never actually called.
384 // We only verify it compiles and links correctly.
386 MlirOpBuilder builder = mlirOpBuilderCreate(context);
387 MlirLocation location = mlirLocationUnknownGet(context);
388 auto dummyValue = mlirOperationGetResult(testOp, 0);
389 MlirValue indicesValues[] = {dummyValue};
390 intptr_t indicesSize = 0;
391
392 (void)llzkArray_InsertArrayOpBuild(builder, location, dummyValue, indicesSize, indicesValues, dummyValue);
393 // No need to destroy builder or op since this code never runs.
394 }
395
396 mlirOperationDestroy(testOp);
397}
398
399struct InsertArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
400 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_InsertArrayOp(op); }
404 static std::unique_ptr<InsertArrayOpBuildFuncHelper> get();
405
406protected:
408};
409
412TEST_F(CAPITest, InsertArrayOp_build_pass) { InsertArrayOpBuildFuncHelper::get()->run(*this); }
413
414TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetArrRef) {
415 auto testOp = createIndexOperation();
416
419 }
420
421 mlirOperationDestroy(testOp);
422}
423
424TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetArrRef) {
425 auto testOp = createIndexOperation();
426
428 auto dummyValue = mlirOperationGetResult(testOp, 0);
429 llzkArray_InsertArrayOpSetArrRef(testOp, dummyValue);
430 }
431
432 mlirOperationDestroy(testOp);
433}
434
435TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetIndicesCount) {
436 auto testOp = createIndexOperation();
437
440 }
441
442 mlirOperationDestroy(testOp);
443}
444
445TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetIndicesAt) {
446 auto testOp = createIndexOperation();
447
450 }
451
452 mlirOperationDestroy(testOp);
453}
454
455TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetIndices_Variadic) {
456 auto testOp = createIndexOperation();
457
459 auto dummyValue = mlirOperationGetResult(testOp, 0);
460 MlirValue values[] = {dummyValue};
461 llzkArray_InsertArrayOpSetIndices(testOp, 1, values);
462 }
463
464 mlirOperationDestroy(testOp);
465}
466
467TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetRvalue) {
468 auto testOp = createIndexOperation();
469
472 }
473
474 mlirOperationDestroy(testOp);
475}
476
477TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_SetRvalue) {
478 auto testOp = createIndexOperation();
479
481 auto dummyValue = mlirOperationGetResult(testOp, 0);
482 llzkArray_InsertArrayOpSetRvalue(testOp, dummyValue);
483 }
484
485 mlirOperationDestroy(testOp);
486}
487
489TEST_F(ArrayOperationLinkTests, llzk_InsertArrayOp_GetArrRefType) {
490 auto testOperation = createIndexOperation();
491
492 if (llzkOperationIsA_Array_InsertArrayOp(testOperation)) {
493
494 (void)llzkArray_InsertArrayOpGetArrRefType(testOperation);
495 }
496
497 mlirOperationDestroy(testOperation);
498}
499
501TEST_F(ArrayOperationLinkTests, IsA_Array_ReadArrayOp) {
502 auto testOperation = createIndexOperation();
503
504 // This will always return false since `createIndex*` returns an MLIR builtin
505 EXPECT_FALSE(llzkOperationIsA_Array_ReadArrayOp(testOperation));
506
507 mlirOperationDestroy(testOperation);
508}
509
511TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_Build) {
512 // Returns an `arith.constant` op, which will never match the ReadArrayOp dialect check.
513 auto testOp = createIndexOperation();
514
515 // This condition is always false, so the function is never actually called.
516 // We only verify it compiles and links correctly.
518 MlirOpBuilder builder = mlirOpBuilderCreate(context);
519 MlirLocation location = mlirLocationUnknownGet(context);
520 auto dummyValue = mlirOperationGetResult(testOp, 0);
521 auto resultType = createIndexType();
522 MlirValue indicesValues[] = {dummyValue};
523 intptr_t indicesSize = 0;
524
525 (void)llzkArray_ReadArrayOpBuild(builder, location, resultType, dummyValue, indicesSize, indicesValues);
526 // No need to destroy builder or op since this code never runs.
527 }
528
529 mlirOperationDestroy(testOp);
530}
531
532struct ReadArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
533 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_ReadArrayOp(op); }
537 static std::unique_ptr<ReadArrayOpBuildFuncHelper> get();
538
539protected:
541};
542
545TEST_F(CAPITest, ReadArrayOp_build_pass) { ReadArrayOpBuildFuncHelper::get()->run(*this); }
546
547TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetArrRef) {
548 auto testOp = createIndexOperation();
549
551 (void)llzkArray_ReadArrayOpGetArrRef(testOp);
552 }
553
554 mlirOperationDestroy(testOp);
555}
556
557TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_SetArrRef) {
558 auto testOp = createIndexOperation();
559
561 auto dummyValue = mlirOperationGetResult(testOp, 0);
562 llzkArray_ReadArrayOpSetArrRef(testOp, dummyValue);
563 }
564
565 mlirOperationDestroy(testOp);
566}
567
568TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetIndicesCount) {
569 auto testOp = createIndexOperation();
570
573 }
574
575 mlirOperationDestroy(testOp);
576}
577
578TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetIndicesAt) {
579 auto testOp = createIndexOperation();
580
582 (void)llzkArray_ReadArrayOpGetIndicesAt(testOp, 0);
583 }
584
585 mlirOperationDestroy(testOp);
586}
587
588TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_SetIndices_Variadic) {
589 auto testOp = createIndexOperation();
590
592 auto dummyValue = mlirOperationGetResult(testOp, 0);
593 MlirValue values[] = {dummyValue};
594 llzkArray_ReadArrayOpSetIndices(testOp, 1, values);
595 }
596
597 mlirOperationDestroy(testOp);
598}
599
600TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetResult) {
601 auto testOp = createIndexOperation();
602
604 (void)llzkArray_ReadArrayOpGetResult(testOp);
605 }
606
607 mlirOperationDestroy(testOp);
608}
609
611TEST_F(ArrayOperationLinkTests, llzk_ReadArrayOp_GetArrRefType) {
612 auto testOperation = createIndexOperation();
613
614 if (llzkOperationIsA_Array_ReadArrayOp(testOperation)) {
615
616 (void)llzkArray_ReadArrayOpGetArrRefType(testOperation);
617 }
618
619 mlirOperationDestroy(testOperation);
620}
621
623TEST_F(ArrayOperationLinkTests, IsA_Array_WriteArrayOp) {
624 auto testOperation = createIndexOperation();
625
626 // This will always return false since `createIndex*` returns an MLIR builtin
627 EXPECT_FALSE(llzkOperationIsA_Array_WriteArrayOp(testOperation));
628
629 mlirOperationDestroy(testOperation);
630}
631
633TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_Build) {
634 // Returns an `arith.constant` op, which will never match the WriteArrayOp dialect check.
635 auto testOp = createIndexOperation();
636
637 // This condition is always false, so the function is never actually called.
638 // We only verify it compiles and links correctly.
640 MlirOpBuilder builder = mlirOpBuilderCreate(context);
641 MlirLocation location = mlirLocationUnknownGet(context);
642 auto dummyValue = mlirOperationGetResult(testOp, 0);
643 MlirValue indicesValues[] = {dummyValue};
644 intptr_t indicesSize = 0;
645
646 (void)llzkArray_WriteArrayOpBuild(builder, location, dummyValue, indicesSize, indicesValues, dummyValue);
647 // No need to destroy builder or op since this code never runs.
648 }
649
650 mlirOperationDestroy(testOp);
651}
652
653struct WriteArrayOpBuildFuncHelper : public TestAnyBuildFuncHelper<CAPITest> {
654 virtual bool callIsA(MlirOperation op) override { return llzkOperationIsA_Array_WriteArrayOp(op); }
658 static std::unique_ptr<WriteArrayOpBuildFuncHelper> get();
659
660protected:
662};
663
666TEST_F(CAPITest, WriteArrayOp_build_pass) { WriteArrayOpBuildFuncHelper::get()->run(*this); }
667
668TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetArrRef) {
669 auto testOp = createIndexOperation();
670
673 }
674
675 mlirOperationDestroy(testOp);
676}
677
678TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetArrRef) {
679 auto testOp = createIndexOperation();
680
682 auto dummyValue = mlirOperationGetResult(testOp, 0);
683 llzkArray_WriteArrayOpSetArrRef(testOp, dummyValue);
684 }
685
686 mlirOperationDestroy(testOp);
687}
688
689TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetIndicesCount) {
690 auto testOp = createIndexOperation();
691
694 }
695
696 mlirOperationDestroy(testOp);
697}
698
699TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetIndicesAt) {
700 auto testOp = createIndexOperation();
701
703 (void)llzkArray_WriteArrayOpGetIndicesAt(testOp, 0);
704 }
705
706 mlirOperationDestroy(testOp);
707}
708
709TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetIndices_Variadic) {
710 auto testOp = createIndexOperation();
711
713 auto dummyValue = mlirOperationGetResult(testOp, 0);
714 MlirValue values[] = {dummyValue};
715 llzkArray_WriteArrayOpSetIndices(testOp, 1, values);
716 }
717
718 mlirOperationDestroy(testOp);
719}
720
721TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetRvalue) {
722 auto testOp = createIndexOperation();
723
726 }
727
728 mlirOperationDestroy(testOp);
729}
730
731TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_SetRvalue) {
732 auto testOp = createIndexOperation();
733
735 auto dummyValue = mlirOperationGetResult(testOp, 0);
736 llzkArray_WriteArrayOpSetRvalue(testOp, dummyValue);
737 }
738
739 mlirOperationDestroy(testOp);
740}
741
743TEST_F(ArrayOperationLinkTests, llzk_WriteArrayOp_GetArrRefType) {
744 auto testOperation = createIndexOperation();
745
746 if (llzkOperationIsA_Array_WriteArrayOp(testOperation)) {
747
748 (void)llzkArray_WriteArrayOpGetArrRefType(testOperation);
749 }
750
751 mlirOperationDestroy(testOperation);
752}
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.
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.
void llzkArray_CreateArrayOpSetMapOperands(MlirOperation op, intptr_t groupCount, MlirValueRange const *groups)
Set MapOperands operand groups 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:78
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
Representation of an mlir::ValueRange
Definition Support.h:47
MlirValue const * values
Pointer to the first value in the range.
Definition Support.h:49
intptr_t size
Number of values in the range.
Definition Support.h:51
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...