X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=doc%2Fuser.pod;h=37de989cec6fbfba41abe2a5db0fca2b64f902d4;hb=d7c0312c8f25c490e126c17b913532962ff66186;hp=afd0f2caecdba1646cd6cad74282a8c98b1b8976;hpb=46736fc916f931e773864fe5656a551d03874040;p=platform%2Fupstream%2Fisl.git diff --git a/doc/user.pod b/doc/user.pod index afd0f2c..37de989 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -565,8 +565,23 @@ corresponding C is alive. =head2 Spaces -Whenever a new set or relation is created from scratch, +Whenever a new set, relation or similiar object is created from scratch, the space in which it lives needs to be specified using an C. +Each space involves zero or more parameters and zero, one or two +tuples of set or input/output dimensions. The parameters and dimensions +are identified by an C and a position. +The type C refers to parameters, +the type C refers to set dimensions (for spaces +with a single tuple of dimensions) and the types C +and C refer to input and output dimensions +(for spaces with two tuples of dimensions). +Local spaces (see L) also contain dimensions +of type C. +Note that parameters are only identified by their position within +a given object. Across different objects, parameters are (usually) +identified by their names or identifiers. Only unnamed parameters +are identified by their positions across objects. The use of unnamed +parameters is discouraged. #include __isl_give isl_space *isl_space_alloc(isl_ctx *ctx, @@ -658,6 +673,8 @@ of the original object. __isl_keep isl_pw_aff *pwaff); __isl_give isl_space *isl_pw_aff_get_space( __isl_keep isl_pw_aff *pwaff); + __isl_give isl_space *isl_multi_aff_get_domain_space( + __isl_keep isl_multi_aff *maff); __isl_give isl_space *isl_multi_aff_get_space( __isl_keep isl_multi_aff *maff); __isl_give isl_space *isl_pw_multi_aff_get_domain_space( @@ -830,6 +847,12 @@ They can be inspected, modified, copied and freed using the following functions. int isl_local_space_is_set(__isl_keep isl_local_space *ls); int isl_local_space_dim(__isl_keep isl_local_space *ls, enum isl_dim_type type); + int isl_local_space_has_dim_id( + __isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); + __isl_give isl_id *isl_local_space_get_dim_id( + __isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); int isl_local_space_has_dim_name( __isl_keep isl_local_space *ls, enum isl_dim_type type, unsigned pos) @@ -981,7 +1004,7 @@ be created. __isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file); __isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); - void isl_printer_free(__isl_take isl_printer *printer); + void *isl_printer_free(__isl_take isl_printer *printer); __isl_give char *isl_printer_get_str( __isl_keep isl_printer *printer); @@ -1020,6 +1043,10 @@ by the specified amount (which may be negative). To actually print something, use + #include + __isl_give isl_printer *isl_printer_print_double( + __isl_take isl_printer *p, double d); + #include __isl_give isl_printer *isl_printer_print_basic_set( __isl_take isl_printer *printer, @@ -1159,10 +1186,14 @@ using the following functions. Sets and relations can be converted to union sets and relations using the following functions. - __isl_give isl_union_map *isl_union_map_from_map( - __isl_take isl_map *map); + __isl_give isl_union_set *isl_union_set_from_basic_set( + __isl_take isl_basic_set *bset); + __isl_give isl_union_map *isl_union_map_from_basic_map( + __isl_take isl_basic_map *bmap); __isl_give isl_union_set *isl_union_set_from_set( __isl_take isl_set *set); + __isl_give isl_union_map *isl_union_map_from_map( + __isl_take isl_map *map); The inverse conversions below can only be used if the input union set or relation is known to contain elements in exactly one @@ -1193,7 +1224,7 @@ functions. __isl_give isl_union_map *isl_union_map_copy( __isl_keep isl_union_map *umap); void isl_basic_set_free(__isl_take isl_basic_set *bset); - void isl_set_free(__isl_take isl_set *set); + void *isl_set_free(__isl_take isl_set *set); void *isl_union_set_free(__isl_take isl_union_set *uset); void isl_basic_map_free(__isl_take isl_basic_map *bmap); void isl_map_free(__isl_take isl_map *map); @@ -1375,6 +1406,27 @@ using the following functions, which compute an overapproximation. __isl_give isl_map *isl_map_remove_divs( __isl_take isl_map *map); +It is also possible to only remove those divs that are defined +in terms of a given range of dimensions or only those for which +no explicit representation is known. + + __isl_give isl_basic_set * + isl_basic_set_remove_divs_involving_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, + unsigned first, unsigned n); + __isl_give isl_set *isl_set_remove_divs_involving_dims( + __isl_take isl_set *set, enum isl_dim_type type, + unsigned first, unsigned n); + __isl_give isl_map *isl_map_remove_divs_involving_dims( + __isl_take isl_map *map, enum isl_dim_type type, + unsigned first, unsigned n); + + __isl_give isl_set *isl_set_remove_unknown_divs( + __isl_take isl_set *set); + __isl_give isl_map *isl_map_remove_unknown_divs( + __isl_take isl_map *map); + To iterate over all the sets or maps in a union set or map, use int isl_union_set_foreach_set(__isl_keep isl_union_set *uset, @@ -1634,6 +1686,8 @@ read off using the following functions. const char *isl_basic_map_get_dim_name( __isl_keep isl_basic_map *bmap, enum isl_dim_type type, unsigned pos); + int isl_map_has_dim_name(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); const char *isl_map_get_dim_name( __isl_keep isl_map *map, enum isl_dim_type type, unsigned pos); @@ -1887,6 +1941,10 @@ that maps (a wrapped version of) the input relation to its domain or range. =item * Elimination + __isl_give isl_basic_set *isl_basic_set_eliminate( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, + unsigned first, unsigned n); __isl_give isl_set *isl_set_eliminate( __isl_take isl_set *set, enum isl_dim_type type, unsigned first, unsigned n); @@ -2348,9 +2406,15 @@ with the original range as range of this nested relation. =item * Aligning parameters + __isl_give isl_basic_set *isl_basic_set_align_params( + __isl_take isl_basic_set *bset, + __isl_take isl_space *model); __isl_give isl_set *isl_set_align_params( __isl_take isl_set *set, __isl_take isl_space *model); + __isl_give isl_basic_map *isl_basic_map_align_params( + __isl_take isl_basic_map *bmap, + __isl_take isl_space *model); __isl_give isl_map *isl_map_align_params( __isl_take isl_map *map, __isl_take isl_space *model); @@ -2368,6 +2432,14 @@ All parameters need to be named. __isl_give isl_map *isl_map_add_dims( __isl_take isl_map *map, enum isl_dim_type type, unsigned n); + __isl_give isl_basic_set *isl_basic_set_insert_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, + unsigned n); + __isl_give isl_basic_map *isl_basic_map_insert_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, + unsigned n); __isl_give isl_set *isl_set_insert_dims( __isl_take isl_set *set, enum isl_dim_type type, unsigned pos, unsigned n); @@ -2559,12 +2631,18 @@ a parametric set as well. __isl_give isl_basic_map *isl_basic_map_range_product( __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); + __isl_give isl_basic_map *isl_basic_map_product( + __isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); __isl_give isl_map *isl_map_domain_product( __isl_take isl_map *map1, __isl_take isl_map *map2); __isl_give isl_map *isl_map_range_product( __isl_take isl_map *map1, __isl_take isl_map *map2); + __isl_give isl_union_map *isl_union_map_domain_product( + __isl_take isl_union_map *umap1, + __isl_take isl_union_map *umap2); __isl_give isl_union_map *isl_union_map_range_product( __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); @@ -2781,13 +2859,17 @@ 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_map_lexmin_pw_multi_aff( + __isl_take isl_map *map); + __isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff( + __isl_take isl_map *map); =head2 Lists Lists are defined over several element types, including -C, C, C and C. +C, C, C, C and C. Here we take lists of Cs as an example. -Lists can be created, copied and freed using the following functions. +Lists can be created, copied, modified and freed using the following functions. #include __isl_give isl_set_list *isl_set_list_from_set( @@ -2799,6 +2881,9 @@ Lists can be created, copied and freed using the following functions. __isl_give isl_set_list *isl_set_list_add( __isl_take isl_set_list *list, __isl_take isl_set *el); + __isl_give isl_set_list *isl_set_list_set_set( + __isl_take isl_set_list *list, int index, + __isl_take isl_set *set); __isl_give isl_set_list *isl_set_list_concat( __isl_take isl_set_list *list1, __isl_take isl_set_list *list2); @@ -2978,6 +3063,9 @@ The expression can be inspected using __isl_give isl_id *isl_pw_aff_get_dim_id( __isl_keep isl_pw_aff *pa, enum isl_dim_type type, unsigned pos); + __isl_give isl_id *isl_pw_aff_get_tuple_id( + __isl_keep isl_pw_aff *pa, + enum isl_dim_type type); int isl_aff_get_constant(__isl_keep isl_aff *aff, isl_int *v); int isl_aff_get_coefficient(__isl_keep isl_aff *aff, @@ -3039,6 +3127,10 @@ It can be modified using __isl_take isl_aff *aff, isl_int v); __isl_give isl_aff *isl_aff_add_constant_si( __isl_take isl_aff *aff, int v); + __isl_give isl_aff *isl_aff_add_constant_num( + __isl_take isl_aff *aff, isl_int v); + __isl_give isl_aff *isl_aff_add_constant_num_si( + __isl_take isl_aff *aff, int v); __isl_give isl_aff *isl_aff_add_coefficient( __isl_take isl_aff *aff, enum isl_dim_type type, int pos, isl_int v); @@ -3069,6 +3161,8 @@ Note that the C and C functions set the I of the constant or coefficient, while C and C add an integer value to the possibly rational constant or coefficient. +The C functions add an integer value to +the numerator. To check whether an affine expressions is obviously zero or obviously equal to some other affine expression, use @@ -3173,6 +3267,8 @@ When multiplying two affine expressions, at least one of the two needs to be a constant. #include + __isl_give isl_basic_set *isl_aff_neg_basic_set( + __isl_take isl_aff *aff); __isl_give isl_basic_set *isl_aff_le_basic_set( __isl_take isl_aff *aff1, __isl_take isl_aff *aff2); __isl_give isl_basic_set *isl_aff_ge_basic_set( @@ -3215,6 +3311,9 @@ to be a constant. __isl_take isl_pw_aff_list *list1, __isl_take isl_pw_aff_list *list2); +The function C returns a basic set +containing those elements in the domain space +of C where C is negative. The function C returns a basic set containing those elements in the shared space of C and C where C is greater than or equal to C. @@ -3310,6 +3409,8 @@ can be created using the following functions. __isl_take isl_space *space); __isl_give isl_multi_aff *isl_multi_aff_zero( __isl_take isl_space *space); + __isl_give isl_multi_aff *isl_multi_aff_identity( + __isl_take isl_space *space); __isl_give isl_pw_multi_aff * isl_pw_multi_aff_from_multi_aff( __isl_take isl_multi_aff *ma); @@ -3384,6 +3485,9 @@ The expression can be inspected using const char *isl_multi_aff_get_tuple_name( __isl_keep isl_multi_aff *multi, enum isl_dim_type type); + int isl_pw_multi_aff_has_tuple_name( + __isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type); const char *isl_pw_multi_aff_get_tuple_name( __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type); @@ -3424,6 +3528,9 @@ It can be modified using __isl_give isl_multi_aff *isl_multi_aff_drop_dims( __isl_take isl_multi_aff *maff, enum isl_dim_type type, unsigned first, unsigned n); + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_drop_dims( + __isl_take isl_pw_multi_aff *pma, + enum isl_dim_type type, unsigned first, unsigned n); To check whether two multiple affine expressions are obviously equal to each other, use @@ -3437,6 +3544,12 @@ obviously equal to each other, use Operations include #include + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmin( + __isl_take isl_pw_multi_aff *pma1, + __isl_take isl_pw_multi_aff *pma2); + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmax( + __isl_take isl_pw_multi_aff *pma1, + __isl_take isl_pw_multi_aff *pma2); __isl_give isl_multi_aff *isl_multi_aff_add( __isl_take isl_multi_aff *maff1, __isl_take isl_multi_aff *maff2); @@ -3463,6 +3576,9 @@ Operations include __isl_give isl_local_space **ls); __isl_give isl_pw_multi_aff *isl_pw_multi_aff_coalesce( __isl_take isl_pw_multi_aff *pma); + __isl_give isl_multi_aff *isl_multi_aff_align_params( + __isl_take isl_multi_aff *multi, + __isl_take isl_space *model); __isl_give isl_multi_aff *isl_multi_aff_gist_params( __isl_take isl_multi_aff *maff, __isl_take isl_set *context); @@ -3482,10 +3598,16 @@ Operations include __isl_give isl_multi_aff *isl_multi_aff_flat_range_product( __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); + __isl_give isl_multi_aff *isl_multi_aff_product( + __isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); __isl_give isl_pw_multi_aff * isl_pw_multi_aff_flat_range_product( __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + __isl_give isl_pw_multi_aff *isl_pw_multi_aff_product( + __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_flat_range_product( __isl_take isl_union_pw_multi_aff *upma1, @@ -3495,6 +3617,18 @@ If the C argument of C is not C, then it is assigned the local space that lies at the basis of the lifting applied. + __isl_give isl_set *isl_multi_aff_lex_le_set( + __isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); + __isl_give isl_set *isl_multi_aff_lex_ge_set( + __isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); + +The function C returns a set +containing those elements in the shared domain space +where C is lexicographically smaller than or +equal to C. + An expression can be read from input using #include @@ -4207,7 +4341,7 @@ then value based dependence analysis is performed. __isl_take isl_access_info *acc, __isl_take isl_map *source, int must, void *source_user); - void isl_access_info_free(__isl_take isl_access_info *acc); + void *isl_access_info_free(__isl_take isl_access_info *acc); __isl_give isl_flow *isl_access_info_compute_flow( __isl_take isl_access_info *acc);