GRATgen: Synch_Data Class Reference

GRATgen

Public Member Functions | List of all members
Synch_Data Class Reference

Global data, which is synchronized between threads, or joined after thread's execution from thread's local data. More...

## Public Member Functions
| Synch_Data ()
| Constructor. More...
bool | is_marked (lit_t *cl)
| Check if clause is marked.
bool | acquire (lit_t *cl)
| Try to acquire a clause.
bool | mark_clause_single_threaded (lit_t *cl)
| Directly mark a single clause. More...
vector< cdb_t > & | proof_of (lit_t *cl)
| Return reference to proof of clause.
void | inc_rat_counts (lit_t l)
| Increment RAT-count for specified literal.
const lit_map< atomic< size_t > > & | get_rat_counts ()
| Get the RAT-count map.
bool | bulk_mark_clauses (ClauseDB *db, vector< lit_t * > &clauses, size_t &idx, size_t &failed_attempts)
| Globally mark a vector of clauses, and exchange the data in the vector by incoming clauses. More...
bool | get_incoming (ClauseDB *db, vector< lit_t * > &clauses, size_t &idx, size_t &failed_attempts)
| Get incoming marked clauses from global marking, but do not synchronize outgoing clauses. More...

## Detailed Description

Global data, which is synchronized between threads, or joined after thread's execution from thread's local data.

## Constructor & Destructor Documentation

## ◆ Synch_Data()

Synch_Data::Synch_Data | ( |  | ) |
| inline

Constructor.

Precondition
  Global data glb must already be after parsing when constructing this

See also
  Object_Lifetimes

## Member Function Documentation

## ◆ bulk_mark_clauses()

bool Synch_Data::bulk_mark_clauses | ( | ClauseDB * | db,
|  | vector< lit_t * > & | clauses,
|  | size_t & | idx,
|  | size_t & | failed_attempts
| ) |  |
| inline

Globally mark a vector of clauses, and exchange the data in the vector by incoming clauses.

As longer the list of incoming clauses, as harder this function tries to get the lock.

Parameters

  db | Clause database the clauses are stored in. Used to compute positions.
  clauses | Vector of clauses to be marked. On success, is filled with incoming clauses to be marked
  idx | Marking sync-index for this thread. Updated on success.
  failed_attempts | Counter for failed attempts to get the lock. Updated by this function.

Returns
  Whether function succeeded to get the lock and do the update. On success, clauses and index are updated. Otherwise, nothing is updated.

## ◆ get_incoming()

bool Synch_Data::get_incoming | ( | ClauseDB * | db,
|  | vector< lit_t * > & | clauses,
|  | size_t & | idx,
|  | size_t & | failed_attempts
| ) |  |
| inline

Get incoming marked clauses from global marking, but do not synchronize outgoing clauses.

Parameters

  db | Clause database the clauses are stored in. Used to compute positions.
  clauses | On success, this is filled with incoming clauses to be marked
  idx | Marking sync-index for this thread. Updated on success.
  failed_attempts | Counter for failed attempts to get the lock. Updated by this function.

Warning
  Not tested, currently not used.

## ◆ mark_clause_single_threaded()

bool Synch_Data::mark_clause_single_threaded | ( | lit_t * | cl | ) |
| inline

Directly mark a single clause.

Precondition
  Must be in single-threaded mode

See also
  cfg_single_threaded.

The documentation for this class was generated from the following file:

- gratgen.cpp