1 #include "isl_sample.h"
2 #include "isl_sample_piplib.h"
5 #include "isl_map_private.h"
6 #include "isl_equalities.h"
8 struct isl_vec *isl_basic_set_sample(struct isl_ctx *ctx,
9 struct isl_basic_set *bset)
14 if (F_ISSET(bset, ISL_BASIC_SET_EMPTY)) {
15 isl_basic_set_free(ctx, bset);
16 return isl_vec_alloc(ctx, 0);
19 isl_assert(ctx, bset->nparam == 0, goto error);
20 isl_assert(ctx, bset->n_div == 0, goto error);
24 struct isl_vec *sample;
26 bset = isl_basic_set_remove_equalities(ctx, bset, &T, NULL);
27 sample = isl_basic_set_sample(ctx, bset);
28 if (sample && sample->size != 0)
29 sample = isl_mat_vec_product(ctx, T, sample);
34 return isl_pip_basic_set_sample(ctx, bset);
36 isl_basic_set_free(ctx, bset);