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

/*
 * Copyright 2008-2009 Katholieke Universiteit Leuven
 *
 * Use of this software is governed by the MIT license
 *
 * Written by Sven Verdoolaege, K.U.Leuven, Departement
 * Computerwetenschappen, Celestijnenlaan 200A, B-3001 Leuven, Belgium
 */

#include <assert.h>
#include <isl_map_private.h>
#include <isl_seq.h>
#include "isl_tab.h"
#include <isl_int.h>
#include <isl_config.h>

struct tab_lp {};

#ifdef USE_GMP_FOR_MP
#define GBR_type
#define GBR_init
#define GBR_clear
#define GBR_set
#define GBR_set_ui
#define GBR_mul
#define GBR_lt
#define GBR_is_zero
#define GBR_numref
#define GBR_denref
#define GBR_floor
#define GBR_ceil
#define GBR_set_num_neg
#define GBR_set_den
#endif /* USE_GMP_FOR_MP */

#ifdef USE_IMATH_FOR_MP
#include <imrat.h>

#define GBR_type
#define GBR_init(v)
#define GBR_clear(v)
#define GBR_set(a,b)
#define GBR_set_ui(a,b)
#define GBR_mul(a,b,c)
#define GBR_lt(a,b)
#define GBR_is_zero(a)
#ifdef USE_SMALL_INT_OPT
#define GBR_numref(a)
#define GBR_denref(a)
#define GBR_floor(a, b)
#define GBR_ceil(a, b)
#define GBR_set_num_neg(a, b)
#define GBR_set_den(a, b)
#else /* USE_SMALL_INT_OPT */
#define GBR_numref
#define GBR_denref
#define GBR_floor
#define GBR_ceil
#define GBR_set_num_neg
#define GBR_set_den
#endif /* USE_SMALL_INT_OPT */
#endif /* USE_IMATH_FOR_MP */

static struct tab_lp *init_lp(struct isl_tab *tab);
static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim);
static int solve_lp(struct tab_lp *lp);
static void get_obj_val(struct tab_lp* lp, GBR_type *F);
static void delete_lp(struct tab_lp *lp);
static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim);
static void get_alpha(struct tab_lp* lp, int row, GBR_type *alpha);
static int del_lp_row(struct tab_lp *lp) WARN_UNUSED;
static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row);

#define GBR_LP
#define GBR_lp_init(P)
#define GBR_lp_set_obj(lp, obj, dim)
#define GBR_lp_solve(lp)
#define GBR_lp_get_obj_val(lp, F)
#define GBR_lp_delete(lp)
#define GBR_lp_next_row(lp)
#define GBR_lp_add_row(lp, row, dim)
#define GBR_lp_get_alpha(lp, row, alpha)
#define GBR_lp_del_row(lp)
#define GBR_lp_is_fixed(lp)
#define GBR_lp_cut(lp, obj)
#include "basis_reduction_templ.c"

/* Set up a tableau for the Cartesian product of bset with itself.
 * This could be optimized by first setting up a tableau for bset
 * and then performing the Cartesian product on the tableau.
 */
static struct isl_tab *gbr_tab(struct isl_tab *tab, struct isl_vec *row)
{}

static struct tab_lp *init_lp(struct isl_tab *tab)
{}

static void set_lp_obj(struct tab_lp *lp, isl_int *row, int dim)
{}

static int solve_lp(struct tab_lp *lp)
{}

/* The current objective function has a fixed (or no) integer value.
 * Cut the tableau to the hyperplane that fixes this value in
 * both halves of the tableau.
 * Return 1 if the resulting tableau is empty.
 */
static int cut_lp_to_hyperplane(struct tab_lp *lp, isl_int *row)
{}

static void get_obj_val(struct tab_lp* lp, GBR_type *F)
{}

static void delete_lp(struct tab_lp *lp)
{}

static int add_lp_row(struct tab_lp *lp, isl_int *row, int dim)
{}

static void get_alpha(struct tab_lp* lp, int row, GBR_type *alpha)
{}

static int del_lp_row(struct tab_lp *lp)
{}