-/* Return 1 if "bmap" contains the point "point".
- * "bmap" is assumed to have known divs.
- * The point is first extended with the divs and then passed
- * to basic_map_contains.
- */
-static int basic_map_contains_point(__isl_keep isl_basic_map *bmap,
- __isl_keep isl_vec *point)
-{
- int i;
- struct isl_vec *vec;
- unsigned dim;
- int contains;
-
- if (!bmap || !point)
- return -1;
- if (bmap->n_div == 0)
- return isl_basic_map_contains(bmap, point);
-
- dim = isl_basic_map_total_dim(bmap) - bmap->n_div;
- vec = isl_vec_alloc(bmap->ctx, 1 + dim + bmap->n_div);
- if (!vec)
- return -1;
-
- isl_seq_cpy(vec->el, point->el, point->size);
- for (i = 0; i < bmap->n_div; ++i) {
- isl_seq_inner_product(bmap->div[i] + 1, vec->el,
- 1 + dim + i, &vec->el[1+dim+i]);
- isl_int_fdiv_q(vec->el[1+dim+i], vec->el[1+dim+i],
- bmap->div[i][0]);
- }
-
- contains = isl_basic_map_contains(bmap, vec);
-
- isl_vec_free(vec);
- return contains;
-}
-