コード例 #1
0
ファイル: maxmin.cpp プロジェクト: luizabeltrame/simgrid
/* @brief Remove a constraint 
 * Currently this is dead code, but it is exposed in maxmin.h
 * Apparently, this call was designed assuming that constraint would no more have elements in it. 
 * If not the case, assertion will fail, and you need to add calls e.g. to lmm_shrink before effectively removing it.
 */
inline void lmm_constraint_free(lmm_system_t sys,lmm_constraint_t cnst)
{
  xbt_assert(!xbt_swag_size(&(cnst->active_element_set)),"Removing constraint but it still has active elements");
  xbt_assert(!xbt_swag_size(&(cnst->enabled_element_set)),"Removing constraint but it still has enabled elements");
  xbt_assert(!xbt_swag_size(&(cnst->disabled_element_set)),"Removing constraint but it still has disabled elements");
  remove_constraint(sys, cnst);
  lmm_cnst_free(sys, cnst);
}
コード例 #2
0
ファイル: maxmin.cpp プロジェクト: frs69wq/simgrid
XBT_INLINE void lmm_constraint_free(lmm_system_t sys,
                                    lmm_constraint_t cnst)
{
  remove_constraint(sys, cnst);
  lmm_cnst_free(sys, cnst);
}