Loading [MathJax]/extensions/tex2jax.js
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PLMD::OpenMP Namespace Reference

Classes

struct  OpenMPVars
 singleton struct to treat the openMP setting as a global variables, but with a layer of encapsulation More...
 

Functions

unsigned getCachelineSize ()
 get cacheline size
 
template<typename T>
unsigned getGoodNumThreads (const std::vector< T > &v)
 Get a reasonable number of threads so as to access to vector v.
 
template<typename T>
unsigned getGoodNumThreads (const T *, unsigned n)
 Get a reasonable number of threads so as to access to an array of size s located at x.
 
unsigned getNumThreads ()
 Get number of threads that can be used by openMP.
 
unsigned getThreadNum ()
 Returns a unique thread identification number within the current team.
 
void setNumThreads (const unsigned nt)
 Set number of threads that can be used by openMP.
 

Function Documentation

◆ getCachelineSize()

unsigned PLMD::OpenMP::getCachelineSize ( )

get cacheline size

◆ getGoodNumThreads() [1/2]

template<typename T>
unsigned PLMD::OpenMP::getGoodNumThreads ( const std::vector< T > & v)

Get a reasonable number of threads so as to access to vector v.

◆ getGoodNumThreads() [2/2]

template<typename T>
unsigned PLMD::OpenMP::getGoodNumThreads ( const T * ,
unsigned n )

Get a reasonable number of threads so as to access to an array of size s located at x.

◆ getNumThreads()

unsigned PLMD::OpenMP::getNumThreads ( )

Get number of threads that can be used by openMP.

◆ getThreadNum()

unsigned PLMD::OpenMP::getThreadNum ( )

Returns a unique thread identification number within the current team.

◆ setNumThreads()

void PLMD::OpenMP::setNumThreads ( const unsigned nt)

Set number of threads that can be used by openMP.