src/watch.cpp
// This can be quite costly since lots of memory is accessed in a rather
// random fashion, and thus we optionally profile it.
This can be quite costly since lots of memory is accessed in a rather
random fashion, and thus we optionally profile it.
This can be quite costly since lots of memory is accessed in a rather random fashion and thus we optionally profile it .
void Internal::connect_watches (bool irredundant_only) {
  START (connect);
  assert (watches ());
  LOG ("watching all %sclauses", irredundant_only ? "irredundant " : "");
  const const_clause_iterator end = clauses.end ();
  for (const_clause_iterator i = clauses.begin (); i != end; i++) {
    Clause * c = *i;
    if (irredundant_only && c->redundant) continue;
    if (c->garbage || c->size > 2) continue;
    watch_clause (c);
  }
   Then connect non-binary clauses.
  for (const_clause_iterator i = clauses.begin (); i != end; i++) {
    Clause * c = *i;
    if (irredundant_only && c->redundant) continue;
    if (c->garbage || c->size == 2) continue;
    watch_clause (c);
  }
  STOP (connect);
}
void Internal :: connect_watches ( bool irredundant_only ) { START ( connect ) ; assert ( watches ( ) ) ; LOG ( " " , irredundant_only ? " " : " " ) ; const const_clause_iterator end = clauses . end ( ) ; for ( const_clause_iterator i = clauses . begin ( ) ; i != end ; i ++ ) { Clause * c = * i ; if ( irredundant_only && c -> redundant ) continue ; if ( c -> garbage || c -> size > 2 ) continue ; watch_clause ( c ) ; } for ( const_clause_iterator i = clauses . begin ( ) ; i != end ; i ++ ) { Clause * c = * i ; if ( irredundant_only && c -> redundant ) continue ; if ( c -> garbage || c -> size == 2 ) continue ; watch_clause ( c ) ; } STOP ( connect ) ; }
This can be quite costly since lots of memory is accessed in a rather
random fashion, and thus we optionally profile it.
This can be quite costly since lots of memory is accessed in a rather random fashion and thus we optionally profile it .
// First connect binary clauses. // // Then connect non-binary clauses. //