aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
threads.h File Reference

Utility functions used for exploiting OpenMP/STL parallelism. More...

#include <utility>
#include <vector>
#include <agrum/agrum.h>
#include <agrum/base/core/threads/threadsOMP.h>
#include <agrum/base/core/threads/threadsSTL.h>
Include dependency graph for threads.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gum
 gum is the global namespace for all aGrUM entities

Functions

void gum::setNumberOfThreads (unsigned int number)
 Set the max number of threads to be used when entering the next parallel region.
bool gum::isOMP ()
 indicates whether aGrUM uses openMP or STL threads
std::vector< std::pair< Idx, Idx > > gum::dispatchRangeToThreads (Idx beg, Idx end, unsigned int nb_threads)
 returns a vector equally splitting elements of a range among threads
unsigned int gum::getMaxNumberOfThreads ()
 Returns the maximum number of threads you should use at any time.
unsigned int gum::getNumberOfThreads ()
 returns the max number of threads used by default when entering the next parallel region
unsigned int gum::getNumberOfLogicalProcessors ()
 Get the number of logical processors.

Detailed Description

Utility functions used for exploiting OpenMP/STL parallelism.

Author
Christophe GONZALES and Pierre-Henri WUILLEMIN

Definition in file threads.h.