document that isl_local_space_get_div cannot be used on map spaces
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 15 Feb 2013 15:05:25 +0000 (15 16:05 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Tue, 19 Feb 2013 18:39:55 +0000 (19 19:39 +0100)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
isl_local_space.c

index a183d3f..42d9c43 100644 (file)
@@ -950,6 +950,9 @@ They can be inspected, modified, copied and freed using the following functions.
                __isl_keep isl_local_space *ls);
        void *isl_local_space_free(__isl_take isl_local_space *ls);
 
+Note that C<isl_local_space_get_div> can only be used on local spaces
+of sets.
+
 Two local spaces can be compared using
 
        int isl_local_space_is_equal(__isl_keep isl_local_space *ls1,
index 6c4fb84..c9d6d75 100644 (file)
@@ -219,6 +219,9 @@ __isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls,
        if (isl_int_is_zero(ls->div->row[pos][0]))
                isl_die(isl_local_space_get_ctx(ls), isl_error_invalid,
                        "expression of div unknown", return NULL);
+       if (!isl_local_space_is_set(ls))
+               isl_die(isl_local_space_get_ctx(ls), isl_error_invalid,
+                       "cannot represent divs of map spaces", return NULL);
 
        aff = isl_aff_alloc(isl_local_space_copy(ls));
        if (!aff)