add isl_aff_mod_val
[platform/upstream/isl.git] / isl_sample_piplib.c
index d7c1a73..4970cd5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright 2008-2009 Katholieke Universiteit Leuven
  *
- * Use of this software is governed by the GNU LGPLv2.1 license
+ * Use of this software is governed by the MIT license
  *
  * Written by Sven Verdoolaege, K.U.Leuven, Departement
  * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
@@ -24,9 +24,9 @@ struct isl_vec *isl_pip_basic_set_sample(struct isl_basic_set *bset)
 
        if (!bset)
                goto error;
-       ctx = bset->ctx;
+       ctx = isl_basic_set_get_ctx(bset);
        isl_assert(ctx, isl_basic_set_n_param(bset) == 0, goto error);
-       isl_assert(ctx, bset->n_div == 0, goto error);
+       isl_assert(ctx, isl_basic_set_dim(bset, isl_dim_div) == 0, goto error);
        dim = isl_basic_set_n_dim(bset);
        domain = isl_basic_map_to_pip((struct isl_basic_map *)bset, 0, 0, 0);
        if (!domain)