Negative strides are useful for creating reverse-view of array. We don't have specific example for negative offset yet but will add it for consistency.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/IR/BuiltinAttributes.cpp | ||
---|---|---|
273 | If negative strides supported to represent reversed arrays, maybe zero strides should be also supported to represent broadcasted arrays? |
mlir/lib/IR/BuiltinAttributes.cpp | ||
---|---|---|
273 | There is a fundamental difference between the two and they shouldn't be equated. Negative strides still imply a one-to-one function. However, zero strides make the mapping many-to-one. |
Comment Actions
Thanks Ivan!
mlir/lib/IR/BuiltinAttributes.cpp | ||
---|---|---|
273 | +1 to @bondhugula's comment, the indexing scheme is still expected to not have internal aliasing. |
If negative strides supported to represent reversed arrays, maybe zero strides should be also supported to represent broadcasted arrays?