typedef struct isl_basic_map isl_basic_map;
struct isl_basic_set;
typedef struct isl_basic_set isl_basic_set;
-
-/* A "map" is a (disjoint) union of basic maps.
- *
- * Currently, the isl_set structure is identical to the isl_map structure
- * and the library depends on this correspondence internally.
- * However, users should not depend on this correspondence.
- */
-struct isl_map {
- int ref;
-#define ISL_MAP_DISJOINT (1 << 0)
-#define ISL_MAP_NORMALIZED (1 << 1)
- unsigned flags;
-
- struct isl_ctx *ctx;
-
- struct isl_dim *dim;
-
- int n;
-
- size_t size;
- struct isl_basic_map *p[1];
-};
+struct isl_map;
typedef struct isl_map isl_map;
struct isl_set;
typedef struct isl_set isl_set;
__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink,
void *sink_user, isl_access_level_before fn, int max_source)
{
+ isl_ctx *ctx;
struct isl_access_info *acc;
if (!sink)
return NULL;
- isl_assert(sink->ctx, max_source >= 0, goto error);
+ ctx = isl_map_get_ctx(sink);
+ isl_assert(ctx, max_source >= 0, goto error);
- acc = isl_alloc(sink->ctx, struct isl_access_info,
+ acc = isl_alloc(ctx, struct isl_access_info,
sizeof(struct isl_access_info) +
(max_source - 1) * sizeof(struct isl_labeled_map));
if (!acc)
__isl_take isl_access_info *acc, __isl_take isl_map *source,
int must, void *source_user)
{
+ isl_ctx *ctx;
+
if (!acc)
return NULL;
- isl_assert(acc->sink.map->ctx,
- acc->n_must + acc->n_may < acc->max_source, goto error);
+ ctx = isl_map_get_ctx(acc->sink.map);
+ isl_assert(ctx, acc->n_must + acc->n_may < acc->max_source, goto error);
if (must) {
if (acc->n_may)
__isl_take isl_access_info *acc)
{
int i;
+ isl_ctx *ctx;
struct isl_access_sort_info *array;
if (!acc)
if (acc->n_must <= 1)
return acc;
- array = isl_alloc_array(acc->sink.map->ctx,
- struct isl_access_sort_info, acc->n_must);
+ ctx = isl_map_get_ctx(acc->sink.map);
+ array = isl_alloc_array(ctx, struct isl_access_sort_info, acc->n_must);
if (!array)
goto error;
if (!acc)
return NULL;
- ctx = acc->sink.map->ctx;
+ ctx = isl_map_get_ctx(acc->sink.map);
dep = isl_calloc_type(ctx, struct isl_flow);
if (!dep)
return NULL;
res = isl_flow_alloc(acc);
if (!res)
goto error;
- ctx = acc->sink.map->ctx;
+ ctx = isl_map_get_ctx(acc->sink.map);
depth = 2 * isl_map_dim(acc->sink.map, isl_dim_in) + 1;
mustdo = isl_map_domain(isl_map_copy(acc->sink.map));
struct isl_blk block2;
};
+/* A "map" is a (disjoint) union of basic maps.
+ *
+ * Currently, the isl_set structure is identical to the isl_map structure
+ * and the library depends on this correspondence internally.
+ * However, users should not depend on this correspondence.
+ */
+struct isl_map {
+ int ref;
+#define ISL_MAP_DISJOINT (1 << 0)
+#define ISL_MAP_NORMALIZED (1 << 1)
+ unsigned flags;
+
+ struct isl_ctx *ctx;
+
+ struct isl_dim *dim;
+
+ int n;
+
+ size_t size;
+ struct isl_basic_map *p[1];
+};
+
/* A "set" is a (possibly disjoint) union of basic sets.
*
* See the documentation of isl_map.