Lines Matching refs:todo
729 static void free_todo(struct isl_facet_todo *todo)
731 while (todo) {
732 struct isl_facet_todo *next = todo->next;
734 isl_tab_free(todo->tab);
735 isl_basic_set_free(todo->bset);
736 isl_vec_free(todo->constraint);
737 free(todo);
739 todo = next;
748 struct isl_facet_todo *todo;
759 todo = isl_calloc_type(tab->mat->ctx, struct isl_facet_todo);
760 if (!todo)
763 todo->constraint = isl_vec_alloc(tab->mat->ctx, 1 + tab->n_var);
764 if (!todo->constraint)
766 isl_seq_neg(todo->constraint->el, tab->bmap->ineq[con], 1 + tab->n_var);
767 todo->bset = isl_basic_set_copy(isl_tab_peek_bset(tab));
768 todo->bset = isl_basic_set_set_rational(todo->bset);
769 todo->bset = isl_basic_set_cow(todo->bset);
770 todo->bset = isl_basic_set_update_from_tab(todo->bset, tab);
771 todo->bset = isl_basic_set_simplify(todo->bset);
772 todo->bset = isl_basic_set_sort_constraints(todo->bset);
773 if (!todo->bset)
775 ISL_F_SET(todo->bset, ISL_BASIC_SET_NO_REDUNDANT);
776 todo->tab = isl_tab_dup(tab);
777 if (!todo->tab)
786 return todo;
788 free_todo(todo);
792 /* Create todo items for all interior facets of the chamber represented
799 struct isl_facet_todo *todo;
812 todo = create_todo(tab, i);
813 if (!todo)
816 todo->next = *next;
817 *next = todo;
826 /* Does the linked list contain a todo item that is the opposite of "todo".
827 * If so, return 1 and remove the opposite todo item.
829 static int has_opposite(struct isl_facet_todo *todo,
834 eq = isl_basic_set_plain_is_equal(todo->bset, (*list)->bset);
839 todo = *list;
840 *list = todo->next;
841 todo->next = NULL;
842 free_todo(todo);
849 /* Create todo items for all interior facets of the chamber represented
851 * opposite todo items.
857 struct isl_facet_todo *todo;
872 todo = create_todo(tab, i);
873 if (!todo)
876 drop = has_opposite(todo, &first->next);
881 free_todo(todo);
883 todo->next = first->next;
884 first->next = todo;
907 * For each of the interior facets of the chamber, we construct a todo item,
910 * While their are any todo items left, we pick a todo item and
914 * again create todo items, taking care to cancel opposite todo items.
928 struct isl_facet_todo *todo = NULL;
976 if (init_todo(&todo, tab) < 0)
979 while (todo) {
985 if (isl_tab_add_ineq(tab, todo->constraint->el) < 0)
992 todo->tab);
1009 if (update_todo(todo, tab) < 0)
1012 next = todo->next;
1013 todo->next = NULL;
1014 free_todo(todo);
1015 todo = next;
1033 free_todo(todo);