Some of the isl_*_list types were declared together in isl/list.h.
It seems cleaner to declare them together with the corresponding isl_* instead.
Similarly, these types were defined together in isl_list_private.h and
are now defined together with the corresponding isl_*.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_hmap_map_basic_set.h \
isl_ilp.c \
isl_input.c \
- isl_list.c \
- isl_list_private.h \
isl_local_space_private.h \
isl_local_space.c \
isl_lp.c \
isl_scan.h \
isl_schedule.c \
isl_schedule_private.h \
+ isl_set_list.c \
isl_sort.c \
isl_sort.h \
isl_space.c \
#ifndef ISL_AFF_TYPE_H
#define ISL_AFF_TYPE_H
+#include <isl/list.h>
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
struct isl_aff;
typedef struct isl_aff isl_aff;
+ISL_DECLARE_LIST(aff)
+
struct isl_pw_aff;
typedef struct isl_pw_aff isl_pw_aff;
+ISL_DECLARE_LIST(pw_aff)
+
struct isl_multi_aff;
typedef struct isl_multi_aff isl_multi_aff;
struct isl_multi_pw_aff;
typedef struct isl_multi_pw_aff isl_multi_pw_aff;
+#if defined(__cplusplus)
+}
+#endif
+
#endif
struct isl_band;
typedef struct isl_band isl_band;
+ISL_DECLARE_LIST(band)
+
__isl_give isl_band *isl_band_copy(__isl_keep isl_band *band);
void *isl_band_free(__isl_take isl_band *band);
#include <isl/space.h>
#include <isl/aff_type.h>
#include <isl/set_type.h>
+#include <isl/list.h>
#include <isl/printer.h>
#if defined(__cplusplus)
struct isl_constraint;
typedef struct isl_constraint isl_constraint;
+ISL_DECLARE_LIST(constraint)
+
isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c);
__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls);
#define ISL_ID_H
#include <isl/ctx.h>
+#include <isl/list.h>
#include <isl/printer.h>
#if defined(__cplusplus)
struct isl_id;
typedef struct isl_id isl_id;
+ISL_DECLARE_LIST(id)
+
isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id);
__isl_give isl_id *isl_id_alloc(isl_ctx *ctx,
extern "C" {
#endif
-#define ISL_DECLARE_LIST(EL) \
+#define ISL_DECLARE_LIST_TYPE(EL) \
struct isl_##EL; \
struct isl_##EL##_list; \
-typedef struct isl_##EL##_list isl_##EL##_list; \
+typedef struct isl_##EL##_list isl_##EL##_list;
+#define ISL_DECLARE_LIST_FN(EL) \
isl_ctx *isl_##EL##_list_get_ctx(__isl_keep isl_##EL##_list *list); \
__isl_give isl_##EL##_list *isl_##EL##_list_from_##EL( \
__isl_take struct isl_##EL *el); \
__isl_take isl_printer *p, __isl_keep isl_##EL##_list *list); \
void isl_##EL##_list_dump(__isl_keep isl_##EL##_list *list);
-ISL_DECLARE_LIST(id)
-ISL_DECLARE_LIST(constraint)
-ISL_DECLARE_LIST(basic_set)
-ISL_DECLARE_LIST(set)
-ISL_DECLARE_LIST(aff)
-ISL_DECLARE_LIST(pw_aff)
-ISL_DECLARE_LIST(band)
+#define ISL_DECLARE_LIST(EL) \
+ ISL_DECLARE_LIST_TYPE(EL) \
+ ISL_DECLARE_LIST_FN(EL)
#if defined(__cplusplus)
}
#define ISL_MAP_TYPE_H
#include <isl/ctx.h>
+#include <isl/list.h>
#if defined(__cplusplus)
extern "C" {
#ifndef isl_basic_set
struct __isl_subclass(isl_set) isl_basic_set;
typedef struct isl_basic_set isl_basic_set;
+ISL_DECLARE_LIST_TYPE(basic_set)
#endif
+
#ifndef isl_set
struct __isl_subclass(isl_union_set) isl_set;
typedef struct isl_set isl_set;
+ISL_DECLARE_LIST_TYPE(set)
#endif
+ISL_DECLARE_LIST_FN(basic_set)
+ISL_DECLARE_LIST_FN(set)
+
#if defined(__cplusplus)
}
#endif
#include <isl_space_private.h>
#include <isl_local_space_private.h>
#include <isl_mat_private.h>
-#include <isl_list_private.h>
#include <isl/constraint.h>
#include <isl/seq.h>
#include <isl/set.h>
#include <isl_config.h>
+#undef BASE
+#define BASE aff
+
+#include <isl_list_templ.c>
+
+#undef BASE
+#define BASE pw_aff
+
+#include <isl_list_templ.c>
+
__isl_give isl_aff *isl_aff_alloc_vec(__isl_take isl_local_space *ls,
__isl_take isl_vec *v)
{
isl_vec *v;
};
+#undef EL
+#define EL isl_aff
+
+#include <isl_list_templ.h>
+
struct isl_pw_aff_piece {
struct isl_set *set;
struct isl_aff *aff;
struct isl_pw_aff_piece p[1];
};
+#undef EL
+#define EL isl_pw_aff
+
+#include <isl_list_templ.h>
+
struct isl_pw_multi_aff_piece {
isl_set *set;
isl_multi_aff *maff;
#include <isl_ast_private.h>
-#include <isl_list_private.h>
#undef BASE
#define BASE ast_expr
#include <isl_band_private.h>
#include <isl_schedule_private.h>
-#include <isl_list_private.h>
+
+#undef BASE
+#define BASE band
+
+#include <isl_list_templ.c>
isl_ctx *isl_band_get_ctx(__isl_keep isl_band *band)
{
isl_band_list *children;
};
+#undef EL
+#define EL isl_band
+
+#include <isl_list_templ.h>
+
__isl_give isl_band *isl_band_alloc(isl_ctx *ctx);
__isl_give isl_union_map *isl_band_list_get_suffix_schedule(
#include <isl_aff_private.h>
#include <isl_local_space_private.h>
+#undef BASE
+#define BASE constraint
+
+#include <isl_list_templ.c>
+
isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c)
{
return c ? isl_local_space_get_ctx(c->ls) : NULL;
isl_vec *v;
};
+#undef EL
+#define EL isl_constraint
+
+#include <isl_list_templ.h>
+
struct isl_constraint *isl_basic_set_constraint(struct isl_basic_set *bset,
isl_int **line);
#include <isl_ctx_private.h>
#include <isl_id_private.h>
+#undef BASE
+#define BASE id
+
+#include <isl_list_templ.c>
+
/* A special, static isl_id to use as domains (and ranges)
* of sets and parameters domains.
* The user should never get a hold on this isl_id.
__isl_give void (*free_user)(void *user);
};
+#undef EL
+#define EL isl_id
+
+#include <isl_list_templ.h>
+
uint32_t isl_hash_id(uint32_t hash, __isl_keep isl_id *id);
extern isl_id isl_id_none;
+++ /dev/null
-/*
- * Copyright 2008-2009 Katholieke Universiteit Leuven
- *
- * 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
- */
-
-#include <isl_list_private.h>
-#include <isl/constraint.h>
-#include <isl/set.h>
-#include <isl/aff.h>
-#include <isl/band.h>
-
-#undef BASE
-#define BASE constraint
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE basic_set
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE set
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE aff
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE pw_aff
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE band
-
-#include <isl_list_templ.c>
-
-#undef BASE
-#define BASE id
-
-#include <isl_list_templ.c>
+++ /dev/null
-#ifndef ISL_LIST_PRIVATE_H
-#define ISL_LIST_PRIVATE_H
-
-#include <isl/list.h>
-
-#undef EL
-#define EL isl_constraint
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_basic_set
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_set
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_aff
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_pw_aff
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_band
-
-#include <isl_list_templ.h>
-
-#undef EL
-#define EL isl_id
-
-#include <isl_list_templ.h>
-
-#endif
struct EL *p[1];
};
-#define ISL_DECLARE_LIST_PRIVATE(EL) \
-__isl_give isl_##EL##_list *isl_##EL##_list_dup( \
- __isl_keep isl_##EL##_list *list);
-
-ISL_DECLARE_LIST_PRIVATE(basic_set)
-ISL_DECLARE_LIST_PRIVATE(set)
-ISL_DECLARE_LIST_PRIVATE(aff)
-ISL_DECLARE_LIST_PRIVATE(pw_aff)
-ISL_DECLARE_LIST_PRIVATE(band)
+__isl_give LIST(EL) *FN(LIST(EL),dup)(__isl_keep LIST(EL) *list);
#include <isl/blk.h>
#include "isl_space_private.h"
#include "isl_equalities.h"
-#include <isl_list_private.h>
#include <isl/lp.h>
#include <isl/seq.h>
#include <isl/set.h>
#define isl_basic_set isl_basic_map
#define isl_set isl_map
#define isl_basic_set_list isl_basic_map_list
+#define isl_set_list isl_map_list
+#include <isl/list.h>
+ISL_DECLARE_LIST(basic_map)
+ISL_DECLARE_LIST(map)
#include <isl/set.h>
#include <isl/map.h>
#include <isl_reordering.h>
struct isl_blk block2;
};
+#undef EL
+#define EL isl_basic_set
+
+#include <isl_list_templ.h>
+
/* A "map" is a (possibly disjoint) union of basic maps.
* A "set" is a (possibly disjoint) union of basic sets.
*
struct isl_basic_map *p[1];
};
+#undef EL
+#define EL isl_set
+
+#include <isl_list_templ.h>
+
__isl_give isl_map *isl_map_realign(__isl_take isl_map *map,
__isl_take isl_reordering *r);
__isl_give isl_set *isl_set_realign(__isl_take isl_set *set,
*/
#include <isl_ctx_private.h>
+#include <isl_map_private.h>
#include <isl/space.h>
#include <isl/seq.h>
#include <isl_mat_private.h>
-#include "isl_map_private.h"
#include <isl_space_private.h>
isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat)
#include <isl_sort.h>
#include <isl_schedule_private.h>
#include <isl_band_private.h>
-#include <isl_list_private.h>
#include <isl_options_private.h>
#include <isl_tarjan.h>
--- /dev/null
+#include <isl/set.h>
+
+#undef EL
+#define EL isl_basic_set
+
+#include <isl_list_templ.h>
+
+#undef EL
+#define EL isl_set
+
+#include <isl_list_templ.h>
+
+#undef BASE
+#define BASE basic_set
+
+#include <isl_list_templ.c>
+
+#undef BASE
+#define BASE set
+
+#include <isl_list_templ.c>