tasklets.hh
Go to the documentation of this file.
240 std::cerr << "ERROR: Uncaught std::exception when running tasklet: " << e.what() << ". Trying to continue.\n";
244 std::cerr << "ERROR: Uncaught exception (general type) when running tasklet. Trying to continue.\n";
294 // thread execution will be stopped / no new tasklets will be started and the program will abort.
296 // Atomic operations tagged memory_order_relaxed are not synchronization operations; they do not
297 // impose an order among concurrent memory accesses. They guarantee atomicity and modification order
298 // consistency. This is the right choice for the setting here, since it is enough to broadcast failure
A simple tasklet that runs a function that returns void and does not take any arguments a given numbe... Definition: tasklets.hh:72 FunctionRunnerTasklet(int numInvocations, const Fn &fn) Definition: tasklets.hh:75 FunctionRunnerTasklet(const FunctionRunnerTasklet &)=default virtual void run()=0 int workerThreadIndex() const Returns the index of the current worker thread. Definition: tasklets.hh:212 int numWorkerThreads() const Returns the number of worker threads for the tasklet runner. Definition: tasklets.hh:222 void run_() do the work until the queue received an end tasklet Definition: tasklets.hh:313 std::condition_variable workAvailableCondition_ Definition: tasklets.hh:365 void barrier() Make sure that all tasklets have been completed after this method has been called. Definition: tasklets.hh:278 std::shared_ptr< FunctionRunnerTasklet< Fn > > dispatchFunction(Fn &fn, int numInvocations=1) Convenience method to construct a new function runner tasklet and dispatch it immediately. Definition: tasklets.hh:267 void dispatch(std::shared_ptr< TaskletInterface > tasklet) Add a new tasklet. Definition: tasklets.hh:230 TaskletRunner(unsigned numWorkers) Creates a tasklet runner with numWorkers underling threads for doing work. Definition: tasklets.hh:175 static void startWorkerThread_(TaskletRunner *taskletRunner, int workerThreadIndex) Definition: tasklets.hh:304 std::vector< std::unique_ptr< std::thread > > threads_ Definition: tasklets.hh:362 TaskletRunner(const TaskletRunner &)=delete std::queue< std::shared_ptr< TaskletInterface > > taskletQueue_ Definition: tasklets.hh:363 Definition: blackoilboundaryratevector.hh:37 Definition: tasklets.hh:94 static thread_local TaskletRunner * taskletRunner_ Definition: tasklets.hh:95 static thread_local int workerThreadIndex_ Definition: tasklets.hh:96 |