Painless
A framework to ease parallelization of sequential CDCL SAT solvers
Loading...
Searching...
No Matches
PortfolioPRS Class Reference

An Implementation of WorkingStrategy that mimics the strategy used in the PRS-Distributed solver from ISC24. More...

#include <PortfolioPRS.hpp>

Inheritance diagram for PortfolioPRS:
Collaboration diagram for PortfolioPRS:

Public Member Functions

void solve (const std::vector< int > &cube) override
 
void join (WorkingStrategy *strat, SatResult res, const std::vector< int > &model) override
 
void setSolverInterrupt () override
 
void unsetSolverInterrupt () override
 
void waitInterrupt () override
 
- Public Member Functions inherited from WorkingStrategy
virtual void addSlave (WorkingStrategy *slave)
 

Protected Member Functions

void restoreModelDist (std::vector< int > &model)
 
void computeNodeGroup (int worldSize, int myRank)
 

Protected Attributes

std::atomic< bool > strategyEnding
 
PRSGroups nodeGroup
 
std::string solversPortfolio
 
std::unordered_map< PRSGroups, uint > sizePerGroup
 
unsigned rankInMyGroup
 
int right_neighbor
 
int left_neighbor
 
std::vector< std::shared_ptr< PreprocessorInterface > > preprocessors
 
std::mutex preprocLock
 
std::condition_variable preprocSignal
 
std::vector< std::shared_ptr< SharingStrategy > > strategies
 
std::vector< std::unique_ptr< Sharer > > sharers
 
- Protected Attributes inherited from WorkingStrategy
WorkingStrategyparent
 
std::vector< WorkingStrategy * > slaves
 

Detailed Description

An Implementation of WorkingStrategy that mimics the strategy used in the PRS-Distributed solver from ISC24.

(Distributed only portfolio) (https://github.com/shaowei-cai-group/PRS-sc24) This strategy uses the different factories SolverFactory and SharingStrategyFactory in order to instantiate the different needed components. Not all solvers are supported by this strategy, and the sharing strategies are hard coded.

Member Function Documentation

◆ join()

void PortfolioPRS::join ( WorkingStrategy * strat,
SatResult res,
const std::vector< int > & model )
overridevirtual

Implements WorkingStrategy.

◆ setSolverInterrupt()

void PortfolioPRS::setSolverInterrupt ( )
overridevirtual

Implements WorkingStrategy.

◆ solve()

void PortfolioPRS::solve ( const std::vector< int > & cube)
overridevirtual

Implements WorkingStrategy.

◆ unsetSolverInterrupt()

void PortfolioPRS::unsetSolverInterrupt ( )
overridevirtual

Implements WorkingStrategy.

◆ waitInterrupt()

void PortfolioPRS::waitInterrupt ( )
overridevirtual

Implements WorkingStrategy.


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