#include "isl_basis_reduction.h"
#include <isl_factorization.h>
#include <isl_point_private.h>
+#include <isl_options_private.h>
static struct isl_vec *empty_sample(struct isl_basic_set *bset)
{
bset = isl_basic_set_simplify(bset);
if (!bset)
return NULL;
- if (isl_basic_set_fast_is_empty(bset))
+ if (isl_basic_set_plain_is_empty(bset))
return empty_sample(bset);
if (bset->n_eq == 0 && bset->n_ineq == 0)
return zero_sample(bset);
if (!bset)
return NULL;
- if (isl_basic_set_fast_is_empty(bset))
+ if (isl_basic_set_plain_is_empty(bset))
return empty_sample(bset);
dim = isl_basic_set_total_dim(bset);
ctx = bset->ctx;
- tab = isl_tab_from_basic_set(bset);
+ tab = isl_tab_from_basic_set(bset, 1);
if (tab && tab->empty) {
isl_tab_free(tab);
ISL_F_SET(bset, ISL_BASIC_SET_EMPTY);
return sample;
}
- if (isl_tab_track_bset(tab, isl_basic_set_copy(bset)) < 0)
- goto error;
if (!ISL_F_ISSET(bset, ISL_BASIC_SET_NO_IMPLICIT))
if (isl_tab_detect_implicit_equalities(tab) < 0)
goto error;
if (!bset)
return NULL;
- tab = isl_tab_from_basic_set(bset);
+ tab = isl_tab_from_basic_set(bset, 0);
sample = isl_tab_get_sample_value(tab);
isl_tab_free(tab);
total = isl_basic_set_total_dim(cone);
- shift = isl_basic_set_alloc_dim(isl_basic_set_get_dim(cone),
+ shift = isl_basic_set_alloc_space(isl_basic_set_get_space(cone),
0, 0, cone->n_ineq);
for (i = 0; i < cone->n_ineq; ++i) {
total = isl_basic_set_total_dim(cone);
cone_dim = total - cone->n_eq;
- M = isl_mat_sub_alloc(bset->ctx, cone->eq, 0, cone->n_eq, 1, total);
+ M = isl_mat_sub_alloc6(bset->ctx, cone->eq, 0, cone->n_eq, 1, total);
M = isl_mat_left_hermite(M, 0, &U, NULL);
if (!M)
goto error;
return NULL;
ctx = bset->ctx;
- if (isl_basic_set_fast_is_empty(bset))
+ if (isl_basic_set_plain_is_empty(bset))
return empty_sample(bset);
dim = isl_basic_set_n_dim(bset);
return NULL;
}
+__isl_give isl_basic_set *isl_basic_set_sample(__isl_take isl_basic_set *bset)
+{
+ return isl_basic_map_sample(bset);
+}
+
__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map)
{
int i;
__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset)
{
isl_vec *vec;
- isl_dim *dim;
+ isl_space *dim;
- dim = isl_basic_set_get_dim(bset);
+ dim = isl_basic_set_get_space(bset);
bset = isl_basic_set_underlying_set(bset);
vec = isl_basic_set_sample_vec(bset);
isl_point_free(pnt);
}
if (i == set->n)
- pnt = isl_point_void(isl_set_get_dim(set));
+ pnt = isl_point_void(isl_set_get_space(set));
isl_set_free(set);
return pnt;