|
PolyFEM
|
Restrict parallel work on the current thread and its CPP worker calls. More...
#include <par_for.hpp>
Public Member Functions | |
| ScopedThreadLimit (const size_t limit) | |
| ~ScopedThreadLimit () | |
| ScopedThreadLimit (const ScopedThreadLimit &)=delete | |
| ScopedThreadLimit & | operator= (const ScopedThreadLimit &)=delete |
Static Public Member Functions | |
| static size_t | current () |
Private Attributes | |
| size_t | previous_ |
Static Private Attributes | |
| static thread_local size_t | limit_ = std::numeric_limits<size_t>::max() |
Restrict parallel work on the current thread and its CPP worker calls.
Definition at line 19 of file par_for.hpp.
|
inlineexplicit |
Definition at line 22 of file par_for.hpp.
References limit_.
|
inline |
Definition at line 26 of file par_for.hpp.
|
delete |
|
inlinestatic |
Definition at line 29 of file par_for.hpp.
References limit_.
Referenced by polyfem::utils::get_n_threads().
|
delete |
|
inlinestaticprivate |
Definition at line 32 of file par_for.hpp.
Referenced by current(), ScopedThreadLimit(), and ~ScopedThreadLimit().
|
private |
Definition at line 33 of file par_for.hpp.
Referenced by ~ScopedThreadLimit().