Skip to content
Snippets Groups Projects
Commit 1ac85f6d authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Generate good index rank mismatch errors in bounds check.

parent 50971dec
No related branches found
No related tags found
No related merge requests found
...@@ -254,6 +254,12 @@ class _AccessCheckMapper(WalkMapper): ...@@ -254,6 +254,12 @@ class _AccessCheckMapper(WalkMapper):
access_range = access_map.range() access_range = access_map.range()
if dims != len(shape):
raise RuntimeError("subscript to '%s' in '%s' has the wrong "
"number of indices (got: %d, expected: %d)" % (
expr.aggregate.name, expr,
dims, len(shape)))
shape_domain = isl.BasicSet.universe(access_range.get_space()) shape_domain = isl.BasicSet.universe(access_range.get_space())
for idim in xrange(dims): for idim in xrange(dims):
from loopy.isl_helpers import make_slab from loopy.isl_helpers import make_slab
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment