doc: fix typo
[platform/upstream/isl.git] / doc / user.pod
index 5468621..1815c17 100644 (file)
@@ -363,8 +363,14 @@ Specific integer values can be created using the following functions.
                long i);
        __isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx,
                unsigned long u);
+       __isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx,
+               size_t n, size_t size, const void *chunks);
 
-They can be copied and freed using the following functions.
+The function C<isl_val_int_from_chunks> constructs an C<isl_val>
+from the C<n> I<digits>, each consisting of C<size> bytes, stored at C<chunks>.
+The least significant digit is assumed to be stored first.
+
+Value objects can be copied and freed using the following functions.
 
        #include <isl/val.h>
        __isl_give isl_val *isl_val_copy(__isl_keep isl_val *v);
@@ -377,9 +383,20 @@ They can be inspected using the following functions.
        long isl_val_get_num_si(__isl_keep isl_val *v);
        long isl_val_get_den_si(__isl_keep isl_val *v);
        double isl_val_get_d(__isl_keep isl_val *v);
-
-Note that C<isl_val_get_num_si>, C<isl_val_get_den_si> and
-C<isl_val_get_d> can only be applied to rational values.
+       size_t isl_val_n_abs_num_chunks(__isl_keep isl_val *v,
+               size_t size);
+       int isl_val_get_abs_num_chunks(__isl_keep isl_val *v,
+               size_t size, void *chunks);
+
+C<isl_val_n_abs_num_chunks> returns the number of I<digits>
+of C<size> bytes needed to store the absolute value of the
+numerator of C<v>.
+C<isl_val_get_abs_num_chunks> stores these digits at C<chunks>,
+which is assumed to have been preallocated by the caller.
+The least significant digit is stored first.
+Note that C<isl_val_get_num_si>, C<isl_val_get_den_si>,
+C<isl_val_get_d>, C<isl_val_n_abs_num_chunks>
+and C<isl_val_get_abs_num_chunks> can only be applied to rational values.
 
 An C<isl_val> can be modified using the following function.
 
@@ -520,16 +537,27 @@ C<GMP> values using the following functions.
        int isl_val_get_num_gmp(__isl_keep isl_val *v, mpz_t z);
        int isl_val_get_den_gmp(__isl_keep isl_val *v, mpz_t z);
 
+=head3 Conversion from C<isl_int>
+
+The following functions are only temporarily available to ease
+the transition from C<isl_int> to C<isl_val>.  They will be removed
+in the next release.
+
+       #include <isl/val_int.h>
+       __isl_give isl_val *isl_val_int_from_isl_int(isl_ctx *ctx,
+               isl_int n);
+       int isl_val_get_num_isl_int(__isl_keep isl_val *v,
+               isl_int *n);
+
 =head2 Integers (obsolescent)
 
-All operations on integers, mainly the coefficients
-of the constraints describing the sets and relations,
-are performed in exact integer arithmetic using C<GMP>.
-However, to allow future versions of C<isl> to optionally
-support fixed integer arithmetic, all calls to C<GMP>
-are wrapped inside C<isl> specific macros.
-The basic type is C<isl_int> and the operations below
-are available on this type.
+In previous versions of C<isl>, integers were represented
+in the external interface using the C<isl_int> type.
+This type has now been superseded by C<isl_val>.
+The C<isl_int> type will be removed from the external interface
+in future releases.  New code should not use C<isl_int>.
+
+The operations below are currently available on C<isl_int>s.
 The meanings of these operations are essentially the same
 as their C<GMP> C<mpz_> counterparts.
 As always with C<GMP> types, C<isl_int>s need to be
@@ -3514,6 +3542,9 @@ Operations include
        __isl_give isl_multi_val *isl_multi_val_scale_val(
                __isl_take isl_multi_val *mv,
                __isl_take isl_val *v);
+       __isl_give isl_multi_val *isl_multi_val_scale_multi_val(
+               __isl_take isl_multi_val *mv1,
+               __isl_take isl_multi_val *mv2);
 
 =head2 Vectors
 
@@ -4354,18 +4385,24 @@ C<isl_multi_aff_sub> subtracts the second argument from the first.
        __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_val(
                __isl_take isl_multi_pw_aff *mpa,
                __isl_take isl_val *v);
-       __isl_give isl_multi_aff *isl_multi_aff_scale_vec(
+       __isl_give isl_multi_aff *isl_multi_aff_scale_multi_val(
                __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_multi_val *mv);
+       __isl_give isl_pw_multi_aff *
+       isl_pw_multi_aff_scale_multi_val(
                __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_multi_val *mv);
+       __isl_give isl_multi_pw_aff *
+       isl_multi_pw_aff_scale_multi_val(
+               __isl_take isl_multi_pw_aff *mpa,
+               __isl_take isl_multi_val *mv);
+       __isl_give isl_union_pw_multi_aff *
+       isl_union_pw_multi_aff_scale_multi_val(
                __isl_take isl_union_pw_multi_aff *upma,
-               __isl_take isl_vec *v);
+               __isl_take isl_multi_val *mv);
 
-C<isl_multi_aff_scale_vec> scales the first elements of C<ma>
-by the corresponding elements of C<v>.
+C<isl_multi_aff_scale_multi_val> scales the elements of C<ma>
+by the corresponding elements of C<mv>.
 
        __isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params(
                __isl_take isl_pw_multi_aff *pma,
@@ -6003,10 +6040,13 @@ Return the identifier represented by the AST expression.
        #include <isl/ast.h>
        int isl_ast_expr_get_int(__isl_keep isl_ast_expr *expr,
                isl_int *v);
+       __isl_give isl_val *isl_ast_expr_get_val(
+               __isl_keep isl_ast_expr *expr);
 
 Return the integer represented by the AST expression.
-Note that the integer is returned through the C<v> argument.
-The return value of the function itself indicates whether the
+Note that the integer is returned by C<isl_ast_expr_get_int>
+through the C<v> argument.
+The return value of this function itself indicates whether the
 operation was performed successfully.
 
 =head3 Manipulating and printing the AST
@@ -6029,6 +6069,8 @@ New AST expressions can be created either directly or within
 the context of an C<isl_ast_build>.
 
        #include <isl/ast.h>
+       __isl_give isl_ast_expr *isl_ast_expr_from_val(
+               __isl_take isl_val *v);
        __isl_give isl_ast_expr *isl_ast_expr_from_id(
                __isl_take isl_id *id);
        __isl_give isl_ast_expr *isl_ast_expr_neg(