the operation's offsets, sizes and strides arguments.
The SubView operation supports the following arguments:
- *) Memref: the "base" memref on which to create a "view" memref.
- *) Offsets: memref-rank number of dynamic offsets or static integer
- attributes into the "base" memref at which to create the "view"
- memref.
- *) Sizes: memref-rank number of dynamic sizes or static integer attributes
- which specify the sizes of the result "view" memref type.
- *) Strides: memref-rank number of dynamic strides or static integer
- attributes multiplicatively to the base memref strides in each
- dimension.
+
+ * Memref: the "base" memref on which to create a "view" memref.
+ * Offsets: memref-rank number of dynamic offsets or static integer
+ attributes into the "base" memref at which to create the "view"
+ memref.
+ * Sizes: memref-rank number of dynamic sizes or static integer attributes
+ which specify the sizes of the result "view" memref type.
+ * Strides: memref-rank number of dynamic strides or static integer
+ attributes multiplicatively to the base memref strides in each
+ dimension.
Example 1:
The "view" operation extracts an N-D contiguous memref with empty layout map
with arbitrary element type from a 1-D contiguous memref with empty layout
map of i8 element type. The ViewOp supports the following arguments:
- *) A single dynamic byte-shift operand must be specified which represents a
- a shift of the base 1-D memref pointer from which to create the resulting
- contiguous memref view with identity layout.
- *) A dynamic size operand that must be specified for each dynamic dimension
- in the resulting view memref type.
+
+ * A single dynamic byte-shift operand must be specified which represents a
+ a shift of the base 1-D memref pointer from which to create the resulting
+ contiguous memref view with identity layout.
+ * A dynamic size operand that must be specified for each dynamic dimension
+ in the resulting view memref type.
The "view" operation gives a structured indexing form to a flat 1-D buffer.
Unlike "subview" it can perform a type change. The type change behavior
requires the op to have special semantics because, e.g. a byte shift of 3
cannot be represented as an offset on f64.
For now, a "view" op:
- 1) Only takes a contiguous source memref with 0 offset and empty layout.
- 2) Must specify a byte_shift operand (in the future, a special integer
- attribute may be added to support the folded case).
- 3) Returns a contiguous memref with 0 offset and empty layout.
+
+ 1. Only takes a contiguous source memref with 0 offset and empty layout.
+ 2. Must specify a byte_shift operand (in the future, a special integer
+ attribute may be added to support the folded case).
+ 3. Returns a contiguous memref with 0 offset and empty layout.
Example: