3#include "sharing/SharingEntity.hpp"
4#include "sharing/SharingStrategy.hpp"
6#include "utils/Threading.hpp"
13static void* mainThrSharing(
void* arg);
34 Sharer(
int id_, std::shared_ptr<SharingStrategy> sharingStrategy);
Defines logging functions and macros for the SAT solver.
#define LOGDEBUG1(...)
Log a debug message with verbosity level 1 and blue color.
Definition Logger.hpp:213
A sharer is a thread responsible for executing a list of SharingStrategies.
Definition Sharer.hpp:20
void join()
Join the thread of this sharer object.
Definition Sharer.hpp:49
virtual void printStats()
Print sharing statistics.
friend void * mainThrSharing(void *)
Working function that will call sharingStrategy doSharing()
double totalSharingTime
Heuristic for strategy implementation comparison (TODO: ifndef NSTAT for such probes)
Definition Sharer.hpp:82
int getId()
Get the ID of this sharer.
Definition Sharer.hpp:69
virtual ~Sharer()
Destructor.
void setId(int id)
Set the ID of this sharer.
Definition Sharer.hpp:75
Sharer(int id_, std::vector< std::shared_ptr< SharingStrategy > > &sharingStrategies)
Constructor with multiple sharing strategies.
Thread * sharer
Pointer to the thread in charge of sharing.
Definition Sharer.hpp:79
std::vector< std::shared_ptr< SharingStrategy > > sharingStrategies
Strategy/Strategies used to share clauses.
Definition Sharer.hpp:88
unsigned int round
Number of sharing rounds completed.
Definition Sharer.hpp:85
int m_sharerId
The ID of this sharer.
Definition Sharer.hpp:98
Sharer(int id_, std::shared_ptr< SharingStrategy > sharingStrategy)
Constructor with a single sharing strategy.
void setThreadAffinity(int coreId)
Set the thread affinity for this sharer.
Definition Sharer.hpp:63
Thread class.
Definition Threading.hpp:46
void join()
Join the thread.
Definition Threading.hpp:52