Polly 20.0.0git
Classes | Functions
isl_convex_hull.c File Reference
#include <isl_ctx_private.h>
#include <isl_map_private.h>
#include <isl_lp_private.h>
#include <isl/map.h>
#include <isl_mat_private.h>
#include <isl_vec_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_sort.h>
#include <bset_to_bmap.c>
#include <bset_from_bmap.c>
#include <set_to_map.c>

Go to the source code of this file.

Classes

struct  max_constraint
 
struct  sh_data_entry
 
struct  sh_data
 
struct  ineq_cmp_data
 

Functions

static __isl_give isl_basic_setuset_convex_hull_wrap_bounded (__isl_take isl_set *set)
 
__isl_give isl_basic_mapisl_basic_map_remove_redundancies (__isl_take isl_basic_map *bmap)
 
__isl_give isl_basic_setisl_basic_set_remove_redundancies (__isl_take isl_basic_set *bset)
 
__isl_give isl_mapisl_map_remove_redundancies (__isl_take isl_map *map)
 
__isl_give isl_setisl_set_remove_redundancies (__isl_take isl_set *set)
 
static isl_bool uset_is_bound (__isl_keep isl_set *set, isl_int *c, unsigned len)
 
static __isl_give isl_setisl_set_add_basic_set_equality (__isl_take isl_set *set, isl_int *c)
 
static __isl_give isl_basic_setwrap_constraints (__isl_keep isl_set *set)
 
isl_intisl_set_wrap_facet (__isl_keep isl_set *set, isl_int *facet, isl_int *ridge)
 
static __isl_give isl_matinitial_facet_constraint (__isl_keep isl_set *set)
 
static __isl_give isl_basic_setcompute_facet (__isl_keep isl_set *set, isl_int *c)
 
static __isl_give isl_basic_setextend (__isl_take isl_basic_set *hull, __isl_keep isl_set *set)
 
static __isl_give isl_basic_setconvex_hull_1d (__isl_take isl_set *set)
 
static __isl_give isl_basic_setconvex_hull_0d (__isl_take isl_set *set)
 
static __isl_give isl_basic_setconvex_hull_pair_elim (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
isl_bool isl_basic_set_is_bounded (__isl_keep isl_basic_set *bset)
 
isl_bool isl_basic_map_image_is_bounded (__isl_keep isl_basic_map *bmap)
 
isl_bool isl_set_is_bounded (__isl_keep isl_set *set)
 
static __isl_give isl_basic_setinduced_lineality_space (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
static __isl_give isl_basic_setuset_convex_hull (__isl_take isl_set *set)
 
static __isl_give isl_basic_setmodulo_lineality (__isl_take isl_set *set, __isl_take isl_basic_set *lin)
 
static __isl_give isl_basic_setvalid_direction_lp (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
static __isl_give isl_vecvalid_direction (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
static __isl_give isl_basic_sethomogeneous_map (__isl_take isl_basic_set *bset, __isl_take isl_mat *T)
 
static __isl_give isl_basic_setconvex_hull_pair_pointed (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
static __isl_give isl_basic_setuset_convex_hull_wrap (__isl_take isl_set *set)
 
static __isl_give isl_basic_setmodulo_affine_hull (__isl_take isl_set *set, __isl_take isl_basic_set *affine_hull)
 
static __isl_give isl_basic_setconvex_hull_pair (__isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2)
 
__isl_give isl_basic_setisl_basic_set_lineality_space (__isl_take isl_basic_set *bset)
 
__isl_give isl_basic_setisl_set_combined_lineality_space (__isl_take isl_set *set)
 
static __isl_give isl_basic_setuset_convex_hull_unbounded (__isl_take isl_set *set)
 
static __isl_give isl_basic_setinitial_hull (__isl_take isl_basic_set *hull, __isl_keep isl_set *set)
 
static isl_bool max_constraint_equal (const void *entry, const void *val)
 
static isl_stat update_constraint (struct isl_ctx *ctx, struct isl_hash_table *table, isl_int *con, unsigned len, int n, int ineq)
 
static isl_bool has_constraint (struct isl_ctx *ctx, struct isl_hash_table *table, isl_int *con, unsigned len, int n)
 
static isl_bool has_facets (__isl_keep isl_basic_set *bset)
 
static __isl_give isl_basic_setcommon_constraints (__isl_take isl_basic_set *hull, __isl_keep isl_set *set, int *is_hull)
 
static __isl_give isl_basic_setproto_hull (__isl_keep isl_set *set, int *is_hull)
 
static __isl_give isl_basic_mapreplace_map_by_empty_basic_map (__isl_take isl_map *map)
 
__isl_give isl_basic_mapisl_map_convex_hull (__isl_take isl_map *map)
 
__isl_give isl_basic_setisl_set_convex_hull (__isl_take isl_set *set)
 
__isl_give isl_basic_mapisl_map_polyhedral_hull (__isl_take isl_map *map)
 
__isl_give isl_basic_setisl_set_polyhedral_hull (__isl_take isl_set *set)
 
static void sh_data_free (struct sh_data *data)
 
static isl_bool has_ineq (const void *entry, const void *val)
 
static int hash_ineq (struct isl_ctx *ctx, struct isl_hash_table *table, isl_int *ineq, unsigned len)
 
static isl_stat hash_basic_set (struct isl_hash_table *table, __isl_keep isl_basic_set *bset)
 
static struct sh_datash_data_alloc (__isl_keep isl_set *set, unsigned n_ineq)
 
static int is_bound (struct sh_data *data, __isl_keep isl_set *set, int j, isl_int *ineq, int shift)
 
static isl_stat set_max_constant_term (struct sh_data *data, __isl_keep isl_set *set, int i, isl_int *ineq, uint32_t c_hash, struct ineq_cmp_data *v)
 
static __isl_give isl_basic_setadd_bound (__isl_take isl_basic_set *hull, struct sh_data *data, __isl_keep isl_set *set, int i, isl_int *ineq, int shift)
 
static __isl_give isl_basic_setadd_bounds (__isl_take isl_basic_set *bset, struct sh_data *data, __isl_keep isl_set *set, int i, int shift)
 
static __isl_give isl_basic_setuset_simple_hull (__isl_take isl_set *set, int shift)
 
static __isl_give isl_basic_mapmap_simple_hull_trivial (__isl_take isl_map *map)
 
static __isl_give isl_basic_mapcached_simple_hull (__isl_take isl_map *map, int shift)
 
static __isl_give isl_basic_mapmap_simple_hull (__isl_take isl_map *map, int shift)
 
__isl_give isl_basic_mapisl_map_simple_hull (__isl_take isl_map *map)
 
__isl_give isl_basic_setisl_set_simple_hull (__isl_take isl_set *set)
 
__isl_give isl_basic_mapisl_map_unshifted_simple_hull (__isl_take isl_map *map)
 
__isl_give isl_basic_setisl_set_unshifted_simple_hull (__isl_take isl_set *set)
 
static __isl_give isl_basic_mapselect_shared_inequalities (__isl_take isl_basic_map *bmap1, __isl_keep isl_basic_map *bmap2)
 
static __isl_give isl_basic_mapselect_shared_equalities (__isl_take isl_basic_map *bmap1, __isl_keep isl_basic_map *bmap2)
 
__isl_give isl_basic_mapisl_basic_map_plain_unshifted_simple_hull (__isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2)
 
__isl_give isl_basic_mapisl_map_plain_unshifted_simple_hull (__isl_take isl_map *map)
 
__isl_give isl_basic_setisl_set_plain_unshifted_simple_hull (__isl_take isl_set *set)
 
static __isl_give isl_basic_setadd_bound_from_constraint (__isl_take isl_basic_set *hull, struct sh_data *data, __isl_keep isl_set *set, isl_int *ineq)
 
static __isl_give isl_basic_setuset_unshifted_simple_hull_from_constraints (__isl_take isl_set *set, int n_ineq, isl_int **ineq)
 
static __isl_give isl_matcollect_inequalities (__isl_take isl_mat *mat, __isl_keep isl_basic_set_list *list, isl_int **ineq)
 
static int cmp_ineq (const void *a, const void *b, void *arg)
 
static __isl_give isl_basic_setuset_unshifted_simple_hull_from_basic_set_list (__isl_take isl_set *set, __isl_take isl_basic_set_list *list)
 
static __isl_give isl_basic_mapmap_unshifted_simple_hull_from_basic_map_list (__isl_take isl_map *map, __isl_take isl_basic_map_list *list)
 
static __isl_give isl_basic_map_list * collect_basic_maps (__isl_take isl_map_list *list)
 
__isl_give isl_basic_mapisl_map_unshifted_simple_hull_from_map_list (__isl_take isl_map *map, __isl_take isl_map_list *list)
 
__isl_give isl_basic_setisl_set_unshifted_simple_hull_from_set_list (__isl_take isl_set *set, __isl_take isl_set_list *list)
 
static __isl_give isl_basic_setset_bounds (__isl_keep isl_set *set, int dim)
 
__isl_give isl_basic_setisl_set_bounded_simple_hull (__isl_take isl_set *set)
 

Function Documentation

◆ add_bound()

static __isl_give isl_basic_set * add_bound ( __isl_take isl_basic_set hull,
struct sh_data data,
__isl_keep isl_set set,
int  i,
isl_int ineq,
int  shift 
)
static

◆ add_bound_from_constraint()

static __isl_give isl_basic_set * add_bound_from_constraint ( __isl_take isl_basic_set hull,
struct sh_data data,
__isl_keep isl_set set,
isl_int ineq 
)
static

◆ add_bounds()

static __isl_give isl_basic_set * add_bounds ( __isl_take isl_basic_set bset,
struct sh_data data,
__isl_keep isl_set set,
int  i,
int  shift 
)
static

◆ cached_simple_hull()

static __isl_give isl_basic_map * cached_simple_hull ( __isl_take isl_map map,
int  shift 
)
static

Definition at line 2395 of file isl_convex_hull.c.

References hull, isl_basic_map_copy(), isl_map_free(), and map.

Referenced by map_simple_hull().

◆ cmp_ineq()

static int cmp_ineq ( const void *  a,
const void *  b,
void *  arg 
)
static

Definition at line 2859 of file isl_convex_hull.c.

References a(), arg, b(), cmp(), isl_int_cmp, and isl_seq_cmp().

Referenced by uset_unshifted_simple_hull_from_basic_set_list().

◆ collect_basic_maps()

static __isl_give isl_basic_map_list * collect_basic_maps ( __isl_take isl_map_list *  list)
static

◆ collect_inequalities()

static __isl_give isl_mat * collect_inequalities ( __isl_take isl_mat mat,
__isl_keep isl_basic_set_list list,
isl_int **  ineq 
)
static

◆ common_constraints()

static __isl_give isl_basic_set * common_constraints ( __isl_take isl_basic_set hull,
__isl_keep isl_set set,
int *  is_hull 
)
static

◆ compute_facet()

static __isl_give isl_basic_set * compute_facet ( __isl_keep isl_set set,
isl_int c 
)
static

◆ convex_hull_0d()

static __isl_give isl_basic_set * convex_hull_0d ( __isl_take isl_set set)
static

◆ convex_hull_1d()

static __isl_give isl_basic_set * convex_hull_1d ( __isl_take isl_set set)
static

◆ convex_hull_pair()

static __isl_give isl_basic_set * convex_hull_pair ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ convex_hull_pair_elim()

static __isl_give isl_basic_set * convex_hull_pair_elim ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ convex_hull_pair_pointed()

static __isl_give isl_basic_set * convex_hull_pair_pointed ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ extend()

static __isl_give isl_basic_set * extend ( __isl_take isl_basic_set hull,
__isl_keep isl_set set 
)
static

◆ has_constraint()

static isl_bool has_constraint ( struct isl_ctx ctx,
struct isl_hash_table table,
isl_int con,
unsigned  len,
int  n 
)
static

◆ has_facets()

static isl_bool has_facets ( __isl_keep isl_basic_set bset)
static

◆ has_ineq()

static isl_bool has_ineq ( const void *  entry,
const void *  val 
)
static

◆ hash_basic_set()

static isl_stat hash_basic_set ( struct isl_hash_table table,
__isl_keep isl_basic_set bset 
)
static

◆ hash_ineq()

static int hash_ineq ( struct isl_ctx ctx,
struct isl_hash_table table,
isl_int ineq,
unsigned  len 
)
static

◆ homogeneous_map()

static __isl_give isl_basic_set * homogeneous_map ( __isl_take isl_basic_set bset,
__isl_take isl_mat T 
)
static

◆ induced_lineality_space()

static __isl_give isl_basic_set * induced_lineality_space ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ initial_facet_constraint()

static __isl_give isl_mat * initial_facet_constraint ( __isl_keep isl_set set)
static

◆ initial_hull()

static __isl_give isl_basic_set * initial_hull ( __isl_take isl_basic_set hull,
__isl_keep isl_set set 
)
static

◆ is_bound()

static int is_bound ( struct sh_data data,
__isl_keep isl_set set,
int  j,
isl_int ineq,
int  shift 
)
static

◆ isl_basic_map_image_is_bounded()

isl_bool isl_basic_map_image_is_bounded ( __isl_keep isl_basic_map bmap)

◆ isl_basic_map_plain_unshifted_simple_hull()

__isl_give isl_basic_map * isl_basic_map_plain_unshifted_simple_hull ( __isl_take isl_basic_map bmap1,
__isl_take isl_basic_map bmap2 
)

◆ isl_basic_map_remove_redundancies()

__isl_give isl_basic_map * isl_basic_map_remove_redundancies ( __isl_take isl_basic_map bmap)

◆ isl_basic_set_is_bounded()

isl_bool isl_basic_set_is_bounded ( __isl_keep isl_basic_set bset)

◆ isl_basic_set_lineality_space()

__isl_give isl_basic_set * isl_basic_set_lineality_space ( __isl_take isl_basic_set bset)

◆ isl_basic_set_remove_redundancies()

__isl_give isl_basic_set * isl_basic_set_remove_redundancies ( __isl_take isl_basic_set bset)

◆ isl_map_convex_hull()

__isl_give isl_basic_map * isl_map_convex_hull ( __isl_take isl_map map)

◆ isl_map_plain_unshifted_simple_hull()

__isl_give isl_basic_map * isl_map_plain_unshifted_simple_hull ( __isl_take isl_map map)

◆ isl_map_polyhedral_hull()

__isl_give isl_basic_map * isl_map_polyhedral_hull ( __isl_take isl_map map)

◆ isl_map_remove_redundancies()

__isl_give isl_map * isl_map_remove_redundancies ( __isl_take isl_map map)

◆ isl_map_simple_hull()

__isl_give isl_basic_map * isl_map_simple_hull ( __isl_take isl_map map)

◆ isl_map_unshifted_simple_hull()

__isl_give isl_basic_map * isl_map_unshifted_simple_hull ( __isl_take isl_map map)

◆ isl_map_unshifted_simple_hull_from_map_list()

__isl_give isl_basic_map * isl_map_unshifted_simple_hull_from_map_list ( __isl_take isl_map map,
__isl_take isl_map_list *  list 
)

◆ isl_set_add_basic_set_equality()

static __isl_give isl_set * isl_set_add_basic_set_equality ( __isl_take isl_set set,
isl_int c 
)
static

Definition at line 160 of file isl_convex_hull.c.

References isl_basic_set_add_eq(), isl_set_cow(), isl_set_free(), and set.

Referenced by initial_facet_constraint().

◆ isl_set_bounded_simple_hull()

__isl_give isl_basic_set * isl_set_bounded_simple_hull ( __isl_take isl_set set)

◆ isl_set_combined_lineality_space()

__isl_give isl_basic_set * isl_set_combined_lineality_space ( __isl_take isl_set set)

◆ isl_set_convex_hull()

__isl_give isl_basic_set * isl_set_convex_hull ( __isl_take isl_set set)

◆ isl_set_is_bounded()

isl_bool isl_set_is_bounded ( __isl_keep isl_set set)

◆ isl_set_plain_unshifted_simple_hull()

__isl_give isl_basic_set * isl_set_plain_unshifted_simple_hull ( __isl_take isl_set set)

◆ isl_set_polyhedral_hull()

__isl_give isl_basic_set * isl_set_polyhedral_hull ( __isl_take isl_set set)

Definition at line 1988 of file isl_convex_hull.c.

References bset_from_bmap(), isl_map_polyhedral_hull(), set, and set_to_map.

Referenced by isl::set::polyhedral_hull().

◆ isl_set_remove_redundancies()

__isl_give isl_set * isl_set_remove_redundancies ( __isl_take isl_set set)

Definition at line 107 of file isl_convex_hull.c.

References isl_map_remove_redundancies(), and set.

Referenced by isl::set::remove_redundancies().

◆ isl_set_simple_hull()

__isl_give isl_basic_set * isl_set_simple_hull ( __isl_take isl_set set)

◆ isl_set_unshifted_simple_hull()

__isl_give isl_basic_set * isl_set_unshifted_simple_hull ( __isl_take isl_set set)

◆ isl_set_unshifted_simple_hull_from_set_list()

__isl_give isl_basic_set * isl_set_unshifted_simple_hull_from_set_list ( __isl_take isl_set set,
__isl_take isl_set_list list 
)

◆ isl_set_wrap_facet()

isl_int * isl_set_wrap_facet ( __isl_keep isl_set set,
isl_int facet,
isl_int ridge 
)

◆ map_simple_hull()

static __isl_give isl_basic_map * map_simple_hull ( __isl_take isl_map map,
int  shift 
)
static

◆ map_simple_hull_trivial()

static __isl_give isl_basic_map * map_simple_hull_trivial ( __isl_take isl_map map)
static

◆ map_unshifted_simple_hull_from_basic_map_list()

static __isl_give isl_basic_map * map_unshifted_simple_hull_from_basic_map_list ( __isl_take isl_map map,
__isl_take isl_basic_map_list *  list 
)
static

◆ max_constraint_equal()

static isl_bool max_constraint_equal ( const void *  entry,
const void *  val 
)
static

Definition at line 1521 of file isl_convex_hull.c.

References a(), b(), isl_bool_ok(), isl_seq_eq(), and val.

Referenced by common_constraints(), has_constraint(), and update_constraint().

◆ modulo_affine_hull()

static __isl_give isl_basic_set * modulo_affine_hull ( __isl_take isl_set set,
__isl_take isl_basic_set affine_hull 
)
static

◆ modulo_lineality()

static __isl_give isl_basic_set * modulo_lineality ( __isl_take isl_set set,
__isl_take isl_basic_set lin 
)
static

◆ proto_hull()

static __isl_give isl_basic_set * proto_hull ( __isl_keep isl_set set,
int *  is_hull 
)
static

◆ replace_map_by_empty_basic_map()

static __isl_give isl_basic_map * replace_map_by_empty_basic_map ( __isl_take isl_map map)
static

◆ select_shared_equalities()

static __isl_give isl_basic_map * select_shared_equalities ( __isl_take isl_basic_map bmap1,
__isl_keep isl_basic_map bmap2 
)
static

◆ select_shared_inequalities()

static __isl_give isl_basic_map * select_shared_inequalities ( __isl_take isl_basic_map bmap1,
__isl_keep isl_basic_map bmap2 
)
static

◆ set_bounds()

static __isl_give isl_basic_set * set_bounds ( __isl_keep isl_set set,
int  dim 
)
static

◆ set_max_constant_term()

static isl_stat set_max_constant_term ( struct sh_data data,
__isl_keep isl_set set,
int  i,
isl_int ineq,
uint32_t  c_hash,
struct ineq_cmp_data v 
)
static

◆ sh_data_alloc()

static struct sh_data * sh_data_alloc ( __isl_keep isl_set set,
unsigned  n_ineq 
)
static

◆ sh_data_free()

static void sh_data_free ( struct sh_data data)
static

◆ update_constraint()

static isl_stat update_constraint ( struct isl_ctx ctx,
struct isl_hash_table table,
isl_int con,
unsigned  len,
int  n,
int  ineq 
)
static

◆ uset_convex_hull()

static __isl_give isl_basic_set * uset_convex_hull ( __isl_take isl_set set)
static

◆ uset_convex_hull_unbounded()

static __isl_give isl_basic_set * uset_convex_hull_unbounded ( __isl_take isl_set set)
static

◆ uset_convex_hull_wrap()

static __isl_give isl_basic_set * uset_convex_hull_wrap ( __isl_take isl_set set)
static

◆ uset_convex_hull_wrap_bounded()

static __isl_give isl_basic_set * uset_convex_hull_wrap_bounded ( __isl_take isl_set set)
static

◆ uset_is_bound()

static isl_bool uset_is_bound ( __isl_keep isl_set set,
isl_int c,
unsigned  len 
)
static

◆ uset_simple_hull()

static __isl_give isl_basic_set * uset_simple_hull ( __isl_take isl_set set,
int  shift 
)
static

◆ uset_unshifted_simple_hull_from_basic_set_list()

static __isl_give isl_basic_set * uset_unshifted_simple_hull_from_basic_set_list ( __isl_take isl_set set,
__isl_take isl_basic_set_list list 
)
static

◆ uset_unshifted_simple_hull_from_constraints()

static __isl_give isl_basic_set * uset_unshifted_simple_hull_from_constraints ( __isl_take isl_set set,
int  n_ineq,
isl_int **  ineq 
)
static

◆ valid_direction()

static __isl_give isl_vec * valid_direction ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ valid_direction_lp()

static __isl_give isl_basic_set * valid_direction_lp ( __isl_take isl_basic_set bset1,
__isl_take isl_basic_set bset2 
)
static

◆ wrap_constraints()

static __isl_give isl_basic_set * wrap_constraints ( __isl_keep isl_set set)
static