| 33 | #include <thread> |
| 34 | |
| 35 | DnCWorker::DnCWorker( WorkerQueue *workload, |
| 36 | std::shared_ptr<IEngine> engine, |
| 37 | std::atomic_int &numUnsolvedSubQueries, |
| 38 | std::atomic_bool &shouldQuitSolving, |
| 39 | unsigned threadId, |
| 40 | unsigned onlineDivides, |
| 41 | float timeoutFactor, |
| 42 | SnCDivideStrategy divideStrategy, |
| 43 | unsigned verbosity, |
| 44 | bool parallelDeepSoI ) |
| 45 | : _workload( workload ) |
| 46 | , _engine( engine ) |
| 47 | , _numUnsolvedSubQueries( &numUnsolvedSubQueries ) |
| 48 | , _shouldQuitSolving( &shouldQuitSolving ) |
| 49 | , _threadId( threadId ) |
| 50 | , _onlineDivides( onlineDivides ) |
| 51 | , _timeoutFactor( timeoutFactor ) |
| 52 | , _verbosity( verbosity ) |
| 53 | , _parallelDeepSoI( parallelDeepSoI ) |
| 54 | { |
| 55 | setQueryDivider( divideStrategy ); |
| 56 | |
| 57 | // Obtain the current state of the engine |
| 58 | if ( !_parallelDeepSoI ) |
| 59 | { |
| 60 | _initialState = std::make_shared<EngineState>(); |
| 61 | _engine->storeState( *_initialState, TableauStateStorageLevel::STORE_ENTIRE_TABLEAU_STATE ); |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | void DnCWorker::setQueryDivider( SnCDivideStrategy divideStrategy ) |
| 66 | { |
nothing calls this directly
no test coverage detected