A set of helper functions for distributed solver initialization and finalization using MPI.
More...
|
| bool | sendFormula (std::vector< simpleClause > &clauses, unsigned int *varCount, int rootRank) |
| | Sends a formula represented by clauses and variable count over MPI.
|
| |
| bool | serializeClauses (const std::vector< simpleClause > &clauses, std::vector< int > &serializedClauses) |
| | Serializes a vector of Clauses into a vector of integers.
|
| |
| bool | deserializeClauses (const std::vector< int > &serializedClauses, std::vector< simpleClause > &clauses) |
| | Deserializes a vector of characters into a vector of simpleClause objects.
|
| |
|
void | sendModelToRoot () |
| | The winner determined by the root will send the model if the answer was SATISFIABLE.
|
| |
A set of helper functions for distributed solver initialization and finalization using MPI.
◆ deserializeClauses()
| bool mpiutils::deserializeClauses |
( |
const std::vector< int > & | serializedClauses, |
|
|
std::vector< simpleClause > & | clauses ) |
Deserializes a vector of characters into a vector of simpleClause objects.
- Parameters
-
| serializedClauses | The vector of characters that represents the serialized array. |
| clauses | The vector where the deserialized simpleClause objects will be stored. |
- Returns
- Returns true if the deserialization was successful, false otherwise.
◆ sendFormula()
| bool mpiutils::sendFormula |
( |
std::vector< simpleClause > & | clauses, |
|
|
unsigned int * | varCount, |
|
|
int | rootRank ) |
Sends a formula represented by clauses and variable count over MPI.
- Parameters
-
| clauses | The vector of Clauses representing the formula. |
| varCount | The number of variables in the formula (pointer). |
| rootRank | The mpi process rank broadcasting the formula. |
- Returns
- Returns true if the formula was successfully received, false otherwise.
◆ serializeClauses()
| bool mpiutils::serializeClauses |
( |
const std::vector< simpleClause > & | clauses, |
|
|
std::vector< int > & | serializedClauses ) |
Serializes a vector of Clauses into a vector of integers.
- Parameters
-
| clauses | The vector of Clauses to be serialized. |
| serializedClauses | The vector where the serialized clauses will be stored. |
- Returns
- Returns true if the serialization was successful, false otherwise.
- Todo
- A version with a function parameter for GlobalSharingStrategies