Skip to content

Commit 9a7e7af

Browse files
committed
[NFC][mlir][emitc] add right example for global array initialization
1 parent cf88e69 commit 9a7e7af

File tree

1 file changed

+2
-0
lines changed
  • mlir/include/mlir/Dialect/EmitC/IR

1 file changed

+2
-0
lines changed

mlir/include/mlir/Dialect/EmitC/IR/EmitC.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,8 @@ def EmitC_GlobalOp : EmitC_Op<"global", [Symbol]> {
11111111
```mlir
11121112
// Global variable with an initial value.
11131113
emitc.global @x : !emitc.array<2xf32> = dense<0.0>
1114+
// Global variable with an initial values.
1115+
emitc.global @x : !emitc.array<3xi32> = dense<[0, 1, 2]>
11141116
// External global variable
11151117
emitc.global extern @x : !emitc.array<2xf32>
11161118
// Constant global variable with internal linkage

0 commit comments

Comments
 (0)