Skip to content

Commit

Permalink
cpp/python: export isl_space
Browse files Browse the repository at this point in the history
isl_space is a documented isl data type required to programmatically
generate isl objects. It is required to generate empty and universe sets
and maps.

To construct an isl_space this commit also exports three allocators,
isl_[set|map]_alloc_noparams that allow the convenient construction of
spaces without parameter dimensions.

These constructors are exported as unnamed constructors. This is
according to the isl interface guidelines, as each given set of argument
types uniquely identifies the constructed space. Hence, there is no
ambiguity and an unnamed constructor can be used.

Spaces with named parameter dimensions can currently be obtained by using
isl::manage or isl::manage_copy. After isl_id and isl_id_list have been
exposed additional constructors that allow construction with named
parameter lists can be exposed.

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Reviewed-by: Oleksandr Zinenko <oleksandr.zinenko@inria.fr>
  • Loading branch information
tobiasgrosser committed Aug 18, 2017
1 parent c13f218 commit bdc468d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/isl/space.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
extern "C" {
#endif

struct isl_space;
struct __isl_export isl_space;
typedef struct isl_space isl_space;

enum isl_dim_type {
Expand All @@ -38,10 +38,13 @@ __isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx,
unsigned nparam, unsigned dim);
__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam);

__isl_constructor
__isl_give isl_space *isl_space_map_alloc_noparams(isl_ctx *ctx,
unsigned n_in, unsigned n_out);
__isl_constructor
__isl_give isl_space *isl_space_set_alloc_noparams(isl_ctx *ctx,
unsigned n_set);
__isl_constructor
__isl_give isl_space *isl_space_params_alloc_empty(isl_ctx *ctx);

__isl_give isl_space *isl_space_map_alloc_from_id_list(
Expand Down

0 comments on commit bdc468d

Please sign in to comment.