isl_id_private.h \
isl_obj.c \
isl_options.c \
+ isl_options_private.h \
isl_output.c \
isl_qsort.c \
isl_qsort.h \
#include <stdlib.h>
#include <isl_ctx_private.h>
#include <isl_map_private.h>
+#include <isl_options_private.h>
#include "isl_basis_reduction.h"
static void save_alpha(GBR_LP *lp, int first, int n, GBR_type *alpha)
#include <isl/stream.h>
#include <isl_polynomial_private.h>
#include <isl_scan.h>
+#include <isl/options.h>
struct bound_options {
struct isl_options *isl;
#include <isl/obj.h>
#include <isl/printer.h>
#include <isl/stream.h>
+#include <isl/options.h>
struct isl_arg_choice cat_format[] = {
{"isl", ISL_FORMAT_ISL},
#include <assert.h>
#include <isl/map.h>
+#include <isl/options.h>
int main(int argc, char **argv)
{
__isl_take isl_printer *p,
__isl_keep isl_band *band);
+=head3 Options
+
+ #include <isl/schedule.h>
+ int isl_options_set_schedule_outer_zero_distance(
+ isl_ctx *ctx, int val);
+ int isl_options_get_schedule_outer_zero_distance(
+ isl_ctx *ctx);
+
+=over
+
+=item * schedule_outer_zero_distance
+
+It this option is set, then we try to construct schedules
+where the outermost scheduling dimension in each band
+results in a zero dependence distance over the proximity
+dependences.
+
+=back
+
=head2 Parametric Vertex Enumeration
The parametric vertex enumeration described in this section
#include <stdlib.h>
#include <isl/int.h>
-#include <isl/options.h>
#include <isl/blk.h>
+#include <isl/arg.h>
#include <isl/hash.h>
#include <isl/config.h>
return (st *)isl_ctx_peek_options(ctx, &(args)); \
}
+#define ISL_CTX_GET_BOOL_DEF(prefix,st,args,field) \
+int prefix ## _get_ ## field(isl_ctx *ctx) \
+{ \
+ st *options; \
+ options = isl_ctx_peek_ ## prefix(ctx); \
+ if (!options) \
+ isl_die(ctx, isl_error_invalid, \
+ "isl_ctx does not reference " #prefix, \
+ return -1); \
+ return options->field; \
+}
+
+#define ISL_CTX_SET_BOOL_DEF(prefix,st,args,field) \
+int prefix ## _set_ ## field(isl_ctx *ctx, int val) \
+{ \
+ st *options; \
+ options = isl_ctx_peek_ ## prefix(ctx); \
+ if (!options) \
+ isl_die(ctx, isl_error_invalid, \
+ "isl_ctx does not reference " #prefix, \
+ return -1); \
+ options->field = val; \
+ return 0; \
+}
+
+#define ISL_CTX_GET_CHOICE_DEF(prefix,st,args,field) \
+int prefix ## _get_ ## field(isl_ctx *ctx) \
+{ \
+ st *options; \
+ options = isl_ctx_peek_ ## prefix(ctx); \
+ if (!options) \
+ isl_die(ctx, isl_error_invalid, \
+ "isl_ctx does not reference " #prefix, \
+ return -1); \
+ return options->field; \
+}
+
+#define ISL_CTX_SET_CHOICE_DEF(prefix,st,args,field) \
+int prefix ## _set_ ## field(isl_ctx *ctx, int val) \
+{ \
+ st *options; \
+ options = isl_ctx_peek_ ## prefix(ctx); \
+ if (!options) \
+ isl_die(ctx, isl_error_invalid, \
+ "isl_ctx does not reference " #prefix, \
+ return -1); \
+ options->field = val; \
+ return 0; \
+}
+
enum isl_error isl_ctx_last_error(isl_ctx *ctx);
void isl_ctx_reset_error(isl_ctx *ctx);
void isl_ctx_set_error(isl_ctx *ctx, enum isl_error error);
#define ISL_OPTIONS_H
#include <isl/arg.h>
+#include <isl/ctx.h>
#if defined(__cplusplus)
extern "C" {
#endif
-struct isl_options {
- #define ISL_LP_TAB 0
- #define ISL_LP_PIP 1
- unsigned lp_solver;
+struct isl_options;
- #define ISL_ILP_GBR 0
- #define ISL_ILP_PIP 1
- unsigned ilp_solver;
-
- #define ISL_PIP_TAB 0
- #define ISL_PIP_PIP 1
- unsigned pip;
-
- #define ISL_CONTEXT_GBR 0
- #define ISL_CONTEXT_LEXMIN 1
- unsigned context;
-
- #define ISL_GBR_NEVER 0
- #define ISL_GBR_ONCE 1
- #define ISL_GBR_ALWAYS 2
- unsigned gbr;
- unsigned gbr_only_first;
-
- #define ISL_CLOSURE_ISL 0
- #define ISL_CLOSURE_BOX 1
- unsigned closure;
-
- #define ISL_BOUND_BERNSTEIN 0
- #define ISL_BOUND_RANGE 1
- int bound;
-
- #define ISL_BERNSTEIN_FACTORS 1
- #define ISL_BERNSTEIN_INTERVALS 2
- int bernstein_recurse;
-
- int bernstein_triangulate;
-
- int pip_symmetry;
-
- #define ISL_CONVEX_HULL_WRAP 0
- #define ISL_CONVEX_HULL_FM 1
- int convex;
+ISL_ARG_DECL(isl_options, struct isl_options, isl_options_args)
- int schedule_parametric;
- int schedule_outer_zero_distance;
- int schedule_maximize_band_depth;
- int schedule_split_parallel;
-};
+#define ISL_BOUND_BERNSTEIN 0
+#define ISL_BOUND_RANGE 1
+int isl_options_set_bound(isl_ctx *ctx, int val);
+int isl_options_get_bound(isl_ctx *ctx);
-ISL_ARG_DECL(isl_options, struct isl_options, isl_options_args)
+int isl_options_set_gbr_only_first(isl_ctx *ctx, int val);
+int isl_options_get_gbr_only_first(isl_ctx *ctx);
#if defined(__cplusplus)
}
struct isl_schedule;
typedef struct isl_schedule isl_schedule;
+int isl_options_set_schedule_outer_zero_distance(isl_ctx *ctx, int val);
+int isl_options_get_schedule_outer_zero_distance(isl_ctx *ctx);
+
__isl_give isl_schedule *isl_union_set_compute_schedule(
__isl_take isl_union_set *domain,
__isl_take isl_union_map *validity,
#include <isl_factorization.h>
#include <isl_vertices_private.h>
#include <isl_polynomial_private.h>
+#include <isl_options_private.h>
#include <isl_bernstein.h>
struct bernstein_data {
#include <isl_bernstein.h>
#include <isl_range.h>
#include <isl_polynomial_private.h>
+#include <isl_options_private.h>
/* Compute a bound on the polynomial defined over the parametric polytope
* using either range propagation or bernstein expansion and
#include <isl_mat_private.h>
#include <isl/set.h>
#include <isl/seq.h>
+#include <isl_options_private.h>
#include "isl_equalities.h"
#include "isl_tab.h"
#include <isl_ctx_private.h>
#include <isl/vec.h>
+#include <isl/options.h>
static struct isl_options *find_nested_options(struct isl_args *args,
void *opt, struct isl_args *wanted)
#include "isl_lp_piplib.h"
#include <isl/seq.h>
#include "isl_tab.h"
+#include <isl_options_private.h>
enum isl_lp_result isl_tab_solve_lp(struct isl_basic_map *bmap, int maximize,
isl_int *f, isl_int denom, isl_int *opt,
#include <isl_dim_map.h>
#include <isl_local_space_private.h>
#include <isl_aff_private.h>
+#include <isl_options_private.h>
static unsigned n(__isl_keep isl_space *dim, enum isl_dim_type type)
{
#include <string.h>
#include <isl/ctx.h>
-#include <isl/options.h>
+#include <isl_options_private.h>
#include <isl/version.h>
struct isl_arg_choice isl_lp_solver_choice[] = {
ISL_ARGS_END
ISL_ARG_DEF(isl_options, struct isl_options, isl_options_args)
+
+ISL_ARG_CTX_DEF(isl_options, struct isl_options, isl_options_args)
+
+ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound)
+ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound)
+
+ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+ gbr_only_first)
+ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+ gbr_only_first)
+
+ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+ schedule_outer_zero_distance)
+ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+ schedule_outer_zero_distance)
--- /dev/null
+#ifndef ISL_OPTIONS_PRIVATE_H
+#define ISL_OPTIONS_PRIVATE_H
+
+#include <isl/options.h>
+
+struct isl_options {
+ #define ISL_LP_TAB 0
+ #define ISL_LP_PIP 1
+ unsigned lp_solver;
+
+ #define ISL_ILP_GBR 0
+ #define ISL_ILP_PIP 1
+ unsigned ilp_solver;
+
+ #define ISL_PIP_TAB 0
+ #define ISL_PIP_PIP 1
+ unsigned pip;
+
+ #define ISL_CONTEXT_GBR 0
+ #define ISL_CONTEXT_LEXMIN 1
+ unsigned context;
+
+ #define ISL_GBR_NEVER 0
+ #define ISL_GBR_ONCE 1
+ #define ISL_GBR_ALWAYS 2
+ unsigned gbr;
+ unsigned gbr_only_first;
+
+ #define ISL_CLOSURE_ISL 0
+ #define ISL_CLOSURE_BOX 1
+ unsigned closure;
+
+ int bound;
+
+ #define ISL_BERNSTEIN_FACTORS 1
+ #define ISL_BERNSTEIN_INTERVALS 2
+ int bernstein_recurse;
+
+ int bernstein_triangulate;
+
+ int pip_symmetry;
+
+ #define ISL_CONVEX_HULL_WRAP 0
+ #define ISL_CONVEX_HULL_FM 1
+ int convex;
+
+ int schedule_parametric;
+ int schedule_outer_zero_distance;
+ int schedule_maximize_band_depth;
+ int schedule_split_parallel;
+};
+
+#endif
#include "isl_basis_reduction.h"
#include <isl_factorization.h>
#include <isl_point_private.h>
+#include <isl_options_private.h>
static struct isl_vec *empty_sample(struct isl_basic_set *bset)
{
#include <isl_schedule_private.h>
#include <isl_band_private.h>
#include <isl_list_private.h>
+#include <isl_options_private.h>
/*
* The scheduling algorithm implemented in this file was inspired by
#include "isl_sample.h"
#include <isl_mat_private.h>
#include <isl_aff_private.h>
+#include <isl_options_private.h>
#include <isl_config.h>
/*
#include <isl/union_map.h>
#include <isl_factorization.h>
#include <isl/schedule.h>
+#include <isl_options_private.h>
static char *srcdir;
#include <isl/lp.h>
#include <isl/union_map.h>
#include <isl_mat_private.h>
+#include <isl_options_private.h>
int isl_map_is_transitively_closed(__isl_keep isl_map *map)
{
#include <isl/ilp.h>
#include <isl/printer.h>
#include <isl_point_private.h>
+#include <isl/options.h>
/* The input of this program is the same as that of the "example" program
* from the PipLib distribution, except that the "big parameter column"