56 if( _modules.empty() )
62 std::size_t index = 0;
68 std::vector<std::future<Answer>> futures;
69 for (
const auto& m: _modules) {
70 SMTRAT_LOG_DEBUG(
"smtrat.parallel",
"\tCreating task for " << m->moduleName());
94 for (
auto& f: futures) {
100 catch(
const std::exception& e)
thread_priority threadPriority() const
virtual std::string moduleName() const
virtual Answer check(bool _final=false, bool _full=true, carl::Variable _objective=carl::Variable::NO_VARIABLE)
Checks the received formula for consistency.
bool operator<(const Task &rhs) const
std::future< Answer > getFuture()
const Module * getModule() const
std::size_t conditionalIndex() const
std::vector< BackendSynchronisation * > mBackendSynchros
void submitBackend(Task *task)
bool notify(std::size_t index)
std::atomic< std::size_t > mNumberThreads
Initialized with 1: There is always the main thread in the beginning.
Answer runBackends(const std::vector< Module * > &_modules, bool _final, bool _full, carl::Variable _objective)
std::atomic< std::size_t > mCounter
Initialized with 1: There is always the main thread in the beginning.
std::priority_queue< Task * > mQueue
std::mutex mBackendSynchrosMutex
void deleteTask(Task *task)
bool shallBeSkipped(std::size_t index)
Class to create the formulas for axioms.
Answer
An enum with the possible answers a Module can give.
#define SMTRAT_LOG_DEBUG(channel, msg)