Cambridge SMT System
ucam::util::Runner2< SingleThreadedFunctorT, MultiThreadedFunctorT > Class Template Reference

Convenience wrapper class that can kick off two type of executions: single or multithreaded, triggered by program options. Possibly multithreading with 1 thread would do, but I keep both implementations as any plain bug that might arise will be easier to trace down with a serialized execution (threadpool uses two, actually). The class is templated with two classes, one for single threading and another for multithreading. Note that the multithreading details are up to the second templated class. More...

#include <multithreading.helpers.hpp>

Public Member Functions

 Runner2 (const RegistryPO &rg)
 Constructor. More...
 
void operator() ()
 Either runs with multithreading or single-thread option. More...
 

Detailed Description

template<class SingleThreadedFunctorT, class MultiThreadedFunctorT>
class ucam::util::Runner2< SingleThreadedFunctorT, MultiThreadedFunctorT >

Convenience wrapper class that can kick off two type of executions: single or multithreaded, triggered by program options. Possibly multithreading with 1 thread would do, but I keep both implementations as any plain bug that might arise will be easier to trace down with a serialized execution (threadpool uses two, actually). The class is templated with two classes, one for single threading and another for multithreading. Note that the multithreading details are up to the second templated class.

Definition at line 84 of file multithreading.helpers.hpp.

Constructor & Destructor Documentation

template<class SingleThreadedFunctorT , class MultiThreadedFunctorT >
ucam::util::Runner2< SingleThreadedFunctorT, MultiThreadedFunctorT >::Runner2 ( const RegistryPO rg)
inline

Constructor.

Parameters
rgRegistry object containing parameters

Definition at line 96 of file multithreading.helpers.hpp.

Member Function Documentation

template<class SingleThreadedFunctorT , class MultiThreadedFunctorT >
void ucam::util::Runner2< SingleThreadedFunctorT, MultiThreadedFunctorT >::operator() ( )
inline

Either runs with multithreading or single-thread option.

Definition at line 109 of file multithreading.helpers.hpp.


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