Classes | |
struct | na_print_accessor |
struct | print_accessor |
Public Types | |
enum | Type { OPENMP = 0, FORK, PTHREAD, SINGLE, UNKNOWN } |
Public Member Functions | |
parallelizer (const int n, const Type &type=OPENMP, const unsigned long seed=0) | |
template<typename R , typename Callable > | |
std::vector< R > | run (Callable callable) const |
template<typename R , typename Callable , typename PrintAccessor > | |
std::vector< R > | run (Callable callable, PrintAccessor pa) const |
Static Public Attributes | |
static const Type | defaultType = OPENMP |
static const std::string | TypeNames [] = { "openmp", "fork", "pthread", "single" } |
Definition at line 21 of file parallelizer_decl.h.
|
inline |
If chosing the fork()-based implementation, make sure that your program consists of a single thread at the time run() is called, or you will run into problems (Google "forking a multithreaded program" to see why).
Definition at line 32 of file parallelizer_decl.h.