pmap_insert(lenv->nr_2_irn, INT_TO_PTR(node_nr), irn);
- req = arch_get_register_req_out(irn);
+ req = arch_get_irn_register_req(irn);
bitset_clear_all(colors);
cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_equal, 1.0);
bitset_foreach(colors, col) {
- int var_idx = lpp_add_var(ienv->lp, name_cdd(buf, 'x', node_nr, col), lpp_binary, 0.0);
+ int var_idx = lpp_add_var(ienv->lp, name_cdd(buf, 'x', node_nr, (int)col), lpp_binary, 0.0);
lpp_set_start_value(ienv->lp, var_idx, (col == (unsigned) curr_node_color) ? 1.0 : 0.0);
lpp_set_factor_fast(ienv->lp, cst_idx, var_idx, 1);
/* add register constraint constraints */
bitset_foreach_clear(colors, col) {
int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_equal, 0.0);
- int var_idx = lpp_add_var(ienv->lp, name_cdd(buf, 'x', node_nr, col), lpp_binary, 0.0);
+ int var_idx = lpp_add_var(ienv->lp, name_cdd(buf, 'x', node_nr, (int)col), lpp_binary, 0.0);
lpp_set_start_value(ienv->lp, var_idx, 0.0);
lpp_set_factor_fast(ienv->lp, cst_idx, var_idx, 1);
/* for all colors */
for (col=0; col<n_colors; ++col) {
- int cst_idx = lpp_add_cst(lpp, NULL, lpp_less, 1.0);
+ int cst_idx = lpp_add_cst(lpp, NULL, lpp_less_equal, 1.0);
/* for each member of this clique */
for (i=0; i<size; ++i) {
/* add constraints relating the affinity var to the color vars */
for (col=0; col<n_colors; ++col) {
- int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_less, 0.0);
+ int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_less_equal, 0.0);
root_idx = lpp_get_var_idx(ienv->lp, name_cdd(buf, 'x', root_nr, col));
arg_idx = lpp_get_var_idx(ienv->lp, name_cdd(buf, 'x', arg_nr, col));
int growed;
/* get 2 starting nodes to form a clique */
- for (e=set_first(edges); !e->n1; e=set_next(edges))
- /*nothing*/ ;
+ for (e=set_first(edges); !e->n1; e=set_next(edges)) {
+ }
/* we could be stepped out of the loop before the set iterated to the end */
set_break(edges);
int var_idx, cst_idx, center_nr, member_nr;
char buf[16];
- cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater, pset_count(clique)-1);
+ cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, pset_count(clique)-1);
center_nr = get_irn_idx(center);
pset_foreach(clique, member) {
/* And a path of length 2 is covered by a clique star constraint. */
if (len > 2) {
/* finally build the constraint */
- int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater, 1.0);
+ int cst_idx = lpp_add_cst(ienv->lp, NULL, lpp_greater_equal, 1.0);
for (i=1; i<len; ++i) {
char buf[16];
int nr_1 = get_irn_idx(curr_path[i-1]);
local_env_t *lenv = ienv->env;
int lower_bound;
- ienv->lp = new_lpp(ienv->co->name, lpp_minimize);
+ ienv->lp = lpp_new(ienv->co->name, lpp_minimize);
build_coloring_cstr(ienv);
build_interference_cstr(ienv);
build_affinity_cstr(ienv);
lpp_sol_state_t state = lpp_get_solution(ienv->lp, sol, lenv->first_x_var, lenv->last_x_var);
if (state != lpp_optimal) {
- printf("WARNING %s: Solution state is not 'optimal': %d\n", ienv->co->name, state);
+ printf("WARNING %s: Solution state is not 'optimal': %d\n", ienv->co->name, (int)state);
assert(state >= lpp_feasible && "The solution should at least be feasible!");
}
#endif
}
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyilp2);
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyilp2)
void be_init_copyilp2(void)
{
static co_algo_info copyheur = {