add isl_*_list_sort
[platform/upstream/isl.git] / doc / user.pod
index e8969c6..6ab3507 100644 (file)
@@ -950,6 +950,9 @@ They can be inspected, modified, copied and freed using the following functions.
                __isl_keep isl_local_space *ls);
        void *isl_local_space_free(__isl_take isl_local_space *ls);
 
+Note that C<isl_local_space_get_div> can only be used on local spaces
+of sets.
+
 Two local spaces can be compared using
 
        int isl_local_space_is_equal(__isl_keep isl_local_space *ls1,
@@ -2332,6 +2335,11 @@ per space.
                __isl_take isl_basic_set *bset,
                enum isl_dim_type type,
                unsigned first, unsigned n);
+       __isl_give isl_basic_map *
+       isl_basic_map_drop_constraints_involving_dims(
+               __isl_take isl_basic_map *bmap,
+               enum isl_dim_type type,
+               unsigned first, unsigned n);
        __isl_give isl_basic_set *
        isl_basic_set_drop_constraints_not_involving_dims(
                __isl_take isl_basic_set *bset,
@@ -2565,6 +2573,8 @@ interchange the range of the domain with the domain of the range.
                __isl_take isl_map *map);
        __isl_give isl_union_map *isl_union_map_curry(
                __isl_take isl_union_map *umap);
+       __isl_give isl_union_map *isl_union_map_uncurry(
+               __isl_take isl_union_map *umap);
 
 Given a relation with a nested relation for domain,
 the C<curry> functions
@@ -3056,6 +3066,10 @@ returning a basic set or relation.
                __isl_take isl_basic_map *bmap,
                __isl_take isl_basic_set *dom,
                __isl_give isl_set **empty);
+       __isl_give isl_pw_multi_aff *isl_set_lexmin_pw_multi_aff(
+               __isl_take isl_set *set);
+       __isl_give isl_pw_multi_aff *isl_set_lexmax_pw_multi_aff(
+               __isl_take isl_set *set);
        __isl_give isl_pw_multi_aff *isl_map_lexmin_pw_multi_aff(
                __isl_take isl_map *map);
        __isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff(
@@ -3091,6 +3105,11 @@ Lists can be created, copied, modified and freed using the following functions.
        __isl_give isl_set_list *isl_set_list_concat(
                __isl_take isl_set_list *list1,
                __isl_take isl_set_list *list2);
+       __isl_give isl_set_list *isl_set_list_sort(
+               __isl_take isl_set_list *list,
+               int (*cmp)(__isl_keep isl_set *a,
+                       __isl_keep isl_set *b, void *user),
+               void *user);
        void *isl_set_list_free(__isl_take isl_set_list *list);
 
 C<isl_set_list_alloc> creates an empty list with a capacity for
@@ -3702,12 +3721,21 @@ can be created using the following functions.
 A piecewise multiple quasi affine expression can also be initialized
 from an C<isl_set> or C<isl_map>, provided the C<isl_set> is a singleton
 and the C<isl_map> is single-valued.
+In case of a conversion from an C<isl_union_set> or an C<isl_union_map>
+to an C<isl_union_pw_multi_aff>, these properties need to hold in each space.
 
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(
                __isl_take isl_set *set);
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(
                __isl_take isl_map *map);
 
+       __isl_give isl_union_pw_multi_aff *
+       isl_union_pw_multi_aff_from_union_set(
+               __isl_take isl_union_set *uset);
+       __isl_give isl_union_pw_multi_aff *
+       isl_union_pw_multi_aff_from_union_map(
+               __isl_take isl_union_map *umap);
+
 Multiple quasi affine expressions can be copied and freed using
 
        #include <isl/aff.h>
@@ -3870,15 +3898,44 @@ Operations include
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add(
                __isl_take isl_pw_multi_aff *pma1,
                __isl_take isl_pw_multi_aff *pma2);
+       __isl_give isl_multi_aff *isl_multi_aff_sub(
+               __isl_take isl_multi_aff *ma1,
+               __isl_take isl_multi_aff *ma2);
+       __isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub(
+               __isl_take isl_pw_multi_aff *pma1,
+               __isl_take isl_pw_multi_aff *pma2);
+       __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub(
+               __isl_take isl_union_pw_multi_aff *upma1,
+               __isl_take isl_union_pw_multi_aff *upma2);
+
+C<isl_multi_aff_sub> subtracts the second argument from the first.
+
        __isl_give isl_multi_aff *isl_multi_aff_scale(
                __isl_take isl_multi_aff *maff,
                isl_int f);
+       __isl_give isl_multi_aff *isl_multi_aff_scale_vec(
+               __isl_take isl_multi_aff *ma,
+               __isl_take isl_vec *v);
+       __isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_vec(
+               __isl_take isl_pw_multi_aff *pma,
+               __isl_take isl_vec *v);
+       __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_vec(
+               __isl_take isl_union_pw_multi_aff *upma,
+               __isl_take isl_vec *v);
+
+C<isl_multi_aff_scale_vec> scales the first elements of C<ma>
+by the corresponding elements of C<v>.
+
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params(
                __isl_take isl_pw_multi_aff *pma,
                __isl_take isl_set *set);
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain(
                __isl_take isl_pw_multi_aff *pma,
                __isl_take isl_set *set);
+       __isl_give isl_union_pw_multi_aff *
+       isl_union_pw_multi_aff_intersect_domain(
+               __isl_take isl_union_pw_multi_aff *upma,
+               __isl_take isl_union_set *uset);
        __isl_give isl_multi_aff *isl_multi_aff_lift(
                __isl_take isl_multi_aff *maff,
                __isl_give isl_local_space **ls);
@@ -3997,6 +4054,9 @@ An expression can be read from input using
                isl_ctx *ctx, const char *str);
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(
                isl_ctx *ctx, const char *str);
+       __isl_give isl_union_pw_multi_aff *
+       isl_union_pw_multi_aff_read_from_str(
+               isl_ctx *ctx, const char *str);
 
 An expression can be printed using
 
@@ -5069,6 +5129,9 @@ A band can be tiled using the following function.
        int isl_options_set_tile_scale_tile_loops(isl_ctx *ctx,
                int val);
        int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx);
+       int isl_options_set_tile_shift_point_loops(isl_ctx *ctx,
+               int val);
+       int isl_options_get_tile_shift_point_loops(isl_ctx *ctx);
 
 The C<isl_band_tile> function tiles the band using the given tile sizes
 inside its schedule.
@@ -5076,6 +5139,15 @@ A new child band is created to represent the point loops and it is
 inserted between the modified band and its children.
 The C<tile_scale_tile_loops> option specifies whether the tile
 loops iterators should be scaled by the tile sizes.
+If the C<tile_shift_point_loops> option is set, then the point loops
+are shifted to start at zero.
+
+A band can be split into two nested bands using the following function.
+
+       int isl_band_split(__isl_keep isl_band *band, int pos);
+
+The resulting outer band contains the first C<pos> dimensions of C<band>
+while the inner band contains the remaining dimensions.
 
 A representation of the band can be printed using
 
@@ -5541,15 +5613,15 @@ More advanced printing can be performed using the following functions.
        __isl_give isl_printer *isl_ast_node_print(
                __isl_keep isl_ast_node *node,
                __isl_take isl_printer *p,
-               __isl_keep isl_ast_print_options *options);
+               __isl_take isl_ast_print_options *options);
        __isl_give isl_printer *isl_ast_node_for_print(
                __isl_keep isl_ast_node *node,
                __isl_take isl_printer *p,
-               __isl_keep isl_ast_print_options *options);
+               __isl_take isl_ast_print_options *options);
        __isl_give isl_printer *isl_ast_node_if_print(
                __isl_keep isl_ast_node *node,
                __isl_take isl_printer *p,
-               __isl_keep isl_ast_print_options *options);
+               __isl_take isl_ast_print_options *options);
 
 While printing an C<isl_ast_node> in C<ISL_FORMAT_C>,
 C<isl> may print out an AST that makes use of macros such
@@ -5571,6 +5643,9 @@ This object can be created using the following functions.
        #include <isl/ast.h>
        __isl_give isl_ast_print_options *
        isl_ast_print_options_alloc(isl_ctx *ctx);
+       __isl_give isl_ast_print_options *
+       isl_ast_print_options_copy(
+               __isl_keep isl_ast_print_options *options);
        void *isl_ast_print_options_free(
                __isl_take isl_ast_print_options *options);
 
@@ -5579,6 +5654,7 @@ This object can be created using the following functions.
                __isl_take isl_ast_print_options *options,
                __isl_give isl_printer *(*print_user)(
                        __isl_take isl_printer *p,
+                       __isl_take isl_ast_print_options *options,
                        __isl_keep isl_ast_node *node, void *user),
                void *user);
        __isl_give isl_ast_print_options *
@@ -5586,10 +5662,11 @@ This object can be created using the following functions.
                __isl_take isl_ast_print_options *options,
                __isl_give isl_printer *(*print_for)(
                        __isl_take isl_printer *p,
+                       __isl_take isl_ast_print_options *options,
                        __isl_keep isl_ast_node *node, void *user),
                void *user);
 
-The callback set by C<isl_ast_print_options_set_print_domain>
+The callback set by C<isl_ast_print_options_set_print_user>
 is called whenever a node of type C<isl_ast_node_user> needs to
 be printed.
 The callback set by C<isl_ast_print_options_set_print_for>
@@ -5635,6 +5712,9 @@ while printing the AST.
        int isl_options_set_ast_build_allow_else(isl_ctx *ctx,
                int val);
        int isl_options_get_ast_build_allow_else(isl_ctx *ctx);
+       int isl_options_set_ast_build_allow_or(isl_ctx *ctx,
+               int val);
+       int isl_options_get_ast_build_allow_or(isl_ctx *ctx);
 
 =over
 
@@ -5733,6 +5813,11 @@ to scale down iterators of strided loops.
 This option specifies whether the AST generator is allowed
 to construct if statements with else branches.
 
+=item * ast_build_allow_or
+
+This option specifies whether the AST generator is allowed
+to construct if conditions with disjunctions.
+
 =back
 
 =head3 Fine-grained Control over AST Generation