add isl_vec_cmp_element
[platform/upstream/isl.git] / doc / user.pod
index f5396fe..5468621 100644 (file)
@@ -2060,6 +2060,36 @@ is already known to be empty.
 Check if the relation obviously lies on a hyperplane where the given dimension
 has a fixed value and if so, return that value in C<*val>.
 
+       __isl_give isl_val *
+       isl_basic_map_plain_get_val_if_fixed(
+               __isl_keep isl_basic_map *bmap,
+               enum isl_dim_type type, unsigned pos);
+       __isl_give isl_val *isl_set_plain_get_val_if_fixed(
+               __isl_keep isl_set *set,
+               enum isl_dim_type type, unsigned pos);
+       __isl_give isl_val *isl_map_plain_get_val_if_fixed(
+               __isl_keep isl_map *map,
+               enum isl_dim_type type, unsigned pos);
+
+If the set or relation obviously lies on a hyperplane where the given dimension
+has a fixed value, then return that value.
+Otherwise return NaN.
+
+=item * Stride
+
+       int isl_set_dim_residue_class_val(
+               __isl_keep isl_set *set,
+               int pos, __isl_give isl_val **modulo,
+               __isl_give isl_val **residue);
+
+Check if the values of the given set dimension are equal to a fixed
+value modulo some integer value.  If so, assign the modulo to C<*modulo>
+and the fixed value to C<*residue>.  If the given dimension attains only
+a single value, then assign C<0> to C<*modulo> and the fixed value to
+C<*residue>.
+If the dimension does not attain only a single value and if no modulo
+can be found then assign C<1> to C<*modulo> and C<1> to C<*residue>.
+
 =item * Space
 
 To check whether a set is a parameter domain, use this function:
@@ -2283,19 +2313,35 @@ without removing the dimensions.
        __isl_give isl_basic_set *isl_basic_set_fix_si(
                __isl_take isl_basic_set *bset,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_basic_set *isl_basic_set_fix_val(
+               __isl_take isl_basic_set *bset,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *v);
        __isl_give isl_set *isl_set_fix(__isl_take isl_set *set,
                enum isl_dim_type type, unsigned pos,
                isl_int value);
        __isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_set *isl_set_fix_val(
+               __isl_take isl_set *set,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *v);
        __isl_give isl_basic_map *isl_basic_map_fix_si(
                __isl_take isl_basic_map *bmap,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_basic_map *isl_basic_map_fix_val(
+               __isl_take isl_basic_map *bmap,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *v);
        __isl_give isl_map *isl_map_fix(__isl_take isl_map *map,
                enum isl_dim_type type, unsigned pos,
                isl_int value);
        __isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_map *isl_map_fix_val(
+               __isl_take isl_map *map,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *v);
 
 Intersect the set or relation with the hyperplane where the given
 dimension has the fixed given value.
@@ -2313,6 +2359,10 @@ dimension has the fixed given value.
        __isl_give isl_set *isl_set_lower_bound_si(
                __isl_take isl_set *set,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_set *isl_set_lower_bound_val(
+               __isl_take isl_set *set,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *value);
        __isl_give isl_map *isl_map_lower_bound_si(
                __isl_take isl_map *map,
                enum isl_dim_type type, unsigned pos, int value);
@@ -2323,12 +2373,16 @@ dimension has the fixed given value.
        __isl_give isl_set *isl_set_upper_bound_si(
                __isl_take isl_set *set,
                enum isl_dim_type type, unsigned pos, int value);
+       __isl_give isl_set *isl_set_upper_bound_val(
+               __isl_take isl_set *set,
+               enum isl_dim_type type, unsigned pos,
+               __isl_take isl_val *value);
        __isl_give isl_map *isl_map_upper_bound_si(
                __isl_take isl_map *map,
                enum isl_dim_type type, unsigned pos, int value);
 
 Intersect the set or relation with the half-space where the given
-dimension has a value bounded by the fixed given value.
+dimension has a value bounded by the fixed given integer value.
 
        __isl_give isl_set *isl_set_equate(__isl_take isl_set *set,
                enum isl_dim_type type1, int pos1,
@@ -2576,15 +2630,28 @@ a singleton subset of the input.  Otherwise, return an empty set.
        enum isl_lp_result isl_basic_set_max(
                __isl_keep isl_basic_set *bset,
                __isl_keep isl_aff *obj, isl_int *opt)
+       __isl_give isl_val *isl_basic_set_max_val(
+               __isl_keep isl_basic_set *bset,
+               __isl_keep isl_aff *obj);
        enum isl_lp_result isl_set_min(__isl_keep isl_set *set,
                __isl_keep isl_aff *obj, isl_int *opt);
+       __isl_give isl_val *isl_set_min_val(
+               __isl_keep isl_set *set,
+               __isl_keep isl_aff *obj);
        enum isl_lp_result isl_set_max(__isl_keep isl_set *set,
                __isl_keep isl_aff *obj, isl_int *opt);
+       __isl_give isl_val *isl_set_max_val(
+               __isl_keep isl_set *set,
+               __isl_keep isl_aff *obj);
 
 Compute the minimum or maximum of the integer affine expression C<obj>
 over the points in C<set>, returning the result in C<opt>.
 The return value may be one of C<isl_lp_error>,
-C<isl_lp_ok>, C<isl_lp_unbounded> or C<isl_lp_empty>.
+C<isl_lp_ok>, C<isl_lp_unbounded> or C<isl_lp_empty>, in case of
+an C<isl_lp_result>.  If the result is an C<isl_val> then
+the result is C<NULL> in case of an error, the optimal value in case
+there is one, negative infinity or infinity if the problem is unbounded and
+NaN if the problem is empty.
 
 =item * Parametric optimization
 
@@ -2630,8 +2697,15 @@ dualization algorithms or skip the elimination step.
 
        __isl_give isl_map *isl_map_fixed_power(
                __isl_take isl_map *map, isl_int exp);
+       __isl_give isl_map *isl_map_fixed_power_val(
+               __isl_take isl_map *map,
+               __isl_take isl_val *exp);
        __isl_give isl_union_map *isl_union_map_fixed_power(
                __isl_take isl_union_map *umap, isl_int exp);
+       __isl_give isl_union_map *
+       isl_union_map_fixed_power_val(
+               __isl_take isl_union_map *umap,
+               __isl_take isl_val *exp);
 
 Compute the given power of C<map>, where C<exp> is assumed to be non-zero.
 If the exponent C<exp> is negative, then the -C<exp> th power of the inverse
@@ -3473,6 +3547,8 @@ The elements can be changed and inspected using the following functions.
                int v);
        __isl_give isl_vec *isl_vec_set_val(
                __isl_take isl_vec *vec, __isl_take isl_val *v);
+       int isl_vec_cmp_element(__isl_keep isl_vec *vec1,
+               __isl_keep isl_vec *vec2, int pos);
        __isl_give isl_vec *isl_vec_fdiv_r(__isl_take isl_vec *vec,
                isl_int m);
 
@@ -3790,6 +3866,9 @@ Operations include
                __isl_take isl_val *mod);
        __isl_give isl_pw_aff *isl_pw_aff_mod(
                __isl_take isl_pw_aff *pwaff, isl_int mod);
+       __isl_give isl_pw_aff *isl_pw_aff_mod_val(
+               __isl_take isl_pw_aff *pa,
+               __isl_take isl_val *mod);
        __isl_give isl_aff *isl_aff_scale(__isl_take isl_aff *aff,
                isl_int f);
        __isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff,
@@ -3806,6 +3885,9 @@ Operations include
                __isl_take isl_aff *aff, __isl_take isl_val *v);
        __isl_give isl_pw_aff *isl_pw_aff_scale_down(
                __isl_take isl_pw_aff *pwaff, isl_int f);
+       __isl_give isl_pw_aff *isl_pw_aff_scale_down_val(
+               __isl_take isl_pw_aff *pa,
+               __isl_take isl_val *f);
 
        __isl_give isl_pw_aff *isl_pw_aff_list_min(
                __isl_take isl_pw_aff_list *list);
@@ -4784,6 +4866,10 @@ obviously equal, use
        __isl_give isl_qpolynomial *isl_qpolynomial_pow(
                __isl_take isl_qpolynomial *qp, unsigned exponent);
 
+       __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_val(
+               __isl_take isl_pw_qpolynomial *pwqp,
+               enum isl_dim_type type, unsigned n,
+               __isl_take isl_val *v);
        __isl_give isl_pw_qpolynomial *
        isl_pw_qpolynomial_scale_val(
                __isl_take isl_pw_qpolynomial *pwqp,