llvm/polly/lib/External/isl/isl_point.c

/*
 * Copyright 2010      INRIA Saclay
 * Copyright 2013      Ecole Normale Superieure
 * Copyright 2015      Sven Verdoolaege
 * Copyright 2019,2022 Cerebras Systems
 *
 * Use of this software is governed by the MIT license
 *
 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
 * 91893 Orsay, France
 * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France
 * and Cerebras Systems, 175 S San Antonio Rd, Los Altos, CA, USA
 * and Cerebras Systems, 1237 E Arques Ave, Sunnyvale, CA, USA
 */

#include <isl_map_private.h>
#include <isl_point_private.h>
#include <isl/set.h>
#include <isl/union_set.h>
#include <isl_sample.h>
#include <isl_scan.h>
#include <isl_seq.h>
#include <isl_space_private.h>
#include <isl_local_private.h>
#include <isl_val_private.h>
#include <isl_vec_private.h>
#include <isl_output_private.h>

#include <set_to_map.c>

isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt)
{}

/* Return the space of "pnt".
 */
__isl_keep isl_space *isl_point_peek_space(__isl_keep isl_point *pnt)
{}

__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt)
{}

#undef TYPE1
#define TYPE1
#undef TYPE2
#define TYPE2
#undef TYPE_PAIR
#define TYPE_PAIR

static
#include "isl_type_has_equal_space_templ.c"
static
#include "isl_type_check_equal_space_templ.c"

#undef TYPE
#define TYPE

#include "isl_check_named_params_templ.c"

__isl_give isl_point *isl_point_alloc(__isl_take isl_space *space,
	__isl_take isl_vec *vec)
{}

__isl_give isl_point *isl_point_zero(__isl_take isl_space *space)
{}

__isl_give isl_point *isl_point_dup(__isl_keep isl_point *pnt)
{}

__isl_give isl_point *isl_point_cow(__isl_take isl_point *pnt)
{}

__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt)
{}

__isl_null isl_point *isl_point_free(__isl_take isl_point *pnt)
{}

__isl_give isl_point *isl_point_void(__isl_take isl_space *space)
{}

isl_bool isl_point_is_void(__isl_keep isl_point *pnt)
{}

/* Return the space of "pnt".
 * This may be either a copy or the space itself
 * if there is only one reference to "pnt".
 * This allows the space to be modified inplace
 * if both the point and its space have only a single reference.
 * The caller is not allowed to modify "pnt" between this call and
 * a subsequent call to isl_point_restore_space.
 * The only exception is that isl_point_free can be called instead.
 */
__isl_give isl_space *isl_point_take_space(__isl_keep isl_point *pnt)
{}

/* Set the space of "pnt" to "space", where the space of "pnt" may be missing
 * due to a preceding call to isl_point_take_space.
 * However, in this case, "pnt" only has a single reference and
 * then the call to isl_point_cow has no effect.
 */
__isl_give isl_point *isl_point_restore_space(__isl_take isl_point *pnt,
	__isl_take isl_space *space)
{}

/* Return the coordinate vector of "pnt".
 */
__isl_keep isl_vec *isl_point_peek_vec(__isl_keep isl_point *pnt)
{}

/* Return a copy of the coordinate vector of "pnt".
 */
__isl_give isl_vec *isl_point_get_vec(__isl_keep isl_point *pnt)
{}

/* Return the coordinate vector of "pnt".
 * This may be either a copy or the coordinate vector itself
 * if there is only one reference to "pnt".
 * This allows the coordinate vector to be modified inplace
 * if both the point and its coordinate vector have only a single reference.
 * The caller is not allowed to modify "pnt" between this call and
 * a subsequent call to isl_point_restore_vec.
 * The only exception is that isl_point_free can be called instead.
 */
__isl_give isl_vec *isl_point_take_vec(__isl_keep isl_point *pnt)
{}

/* Set the coordinate vector of "pnt" to "vec",
 * where the coordinate vector of "pnt" may be missing
 * due to a preceding call to isl_point_take_vec.
 * However, in this case, "pnt" only has a single reference and
 * then the call to isl_point_cow has no effect.
 */
__isl_give isl_point *isl_point_restore_vec(__isl_take isl_point *pnt,
	__isl_take isl_vec *vec)
{}

/* Return the number of variables of the given type.
 */
static isl_size isl_point_dim(__isl_keep isl_point *pnt, enum isl_dim_type type)
{}

/* Return the position of the coordinates of the given type
 * within the sequence of coordinates of "pnt".
 */
static isl_size isl_point_var_offset(__isl_keep isl_point *pnt,
	enum isl_dim_type type)
{}

/* Reorder the coordinates of "pnt" based on the given reordering.
 */
static __isl_give isl_point *isl_point_reorder(__isl_take isl_point *pnt,
	__isl_take isl_reordering *r)
{}

/* Align the parameters of "pnt" along those of "model".
 *
 * Note that "model" is not allowed to have any parameters
 * that do not already appear in "pnt" since "pnt" does not specify
 * any value for such parameters.
 */
__isl_give isl_point *isl_point_align_params(__isl_take isl_point *pnt,
	__isl_take isl_space *model)
{}

#undef TYPE
#define TYPE
static
#include "check_type_range_templ.c"

/* Return the value of coordinate "pos" of type "type" of "pnt".
 */
__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt,
	enum isl_dim_type type, int pos)
{}

/* Set all entries of "mv" to NaN.
 */
static __isl_give isl_multi_val *set_nan(__isl_take isl_multi_val *mv)
{}

/* Return the values of the set dimensions of "pnt".
 * Return a sequence of NaNs in case of a void point.
 */
__isl_give isl_multi_val *isl_point_get_multi_val(__isl_keep isl_point *pnt)
{}

/* Replace coordinate "pos" of type "type" of "pnt" by "v".
 */
__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt,
	enum isl_dim_type type, int pos, __isl_take isl_val *v)
{}

__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt,
	enum isl_dim_type type, int pos, unsigned val)
{}

__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt,
	enum isl_dim_type type, int pos, unsigned val)
{}

struct isl_foreach_point {};

static isl_stat foreach_point(struct isl_scan_callback *cb,
	__isl_take isl_vec *sample)
{}

isl_stat isl_set_foreach_point(__isl_keep isl_set *set,
	isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user)
{}

/* Return 1 if "bmap" contains the point "point".
 * "bmap" is assumed to have known divs.
 * The point is first extended with the divs and then passed
 * to basic_map_contains.
 */
isl_bool isl_basic_map_contains_point(__isl_keep isl_basic_map *bmap,
	__isl_keep isl_point *point)
{}

isl_bool isl_map_contains_point(__isl_keep isl_map *map,
	__isl_keep isl_point *point)
{}

isl_bool isl_set_contains_point(__isl_keep isl_set *set,
	__isl_keep isl_point *point)
{}

__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt)
{}

__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt)
{}

/* This function performs the same operation as isl_set_from_point,
 * but is considered as a function on an isl_point when exported.
 */
__isl_give isl_set *isl_point_to_set(__isl_take isl_point *pnt)
{}

/* Construct a union set, containing the single element "pnt".
 * If "pnt" is void, then return an empty union set.
 */
__isl_give isl_union_set *isl_union_set_from_point(__isl_take isl_point *pnt)
{}

__isl_give isl_basic_set *isl_basic_set_box_from_points(
	__isl_take isl_point *pnt1, __isl_take isl_point *pnt2)
{}

__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1,
	__isl_take isl_point *pnt2)
{}

/* Print the coordinate at position "pos" of the point "pnt".
 */
static __isl_give isl_printer *print_coordinate(__isl_take isl_printer *p,
	struct isl_print_space_data *data, unsigned pos)
{}

__isl_give isl_printer *isl_printer_print_point(
	__isl_take isl_printer *p, __isl_keep isl_point *pnt)
{}