#include <ParallelUniqueId.h>
|
| static void | initialize () |
| | Must be called by main thread before any threaded computation! Do NOT call in a worker thread!
|
| |
Definition at line 27 of file ParallelUniqueId.h.
◆ ParallelUniqueId()
| ParallelUniqueId::ParallelUniqueId |
( |
| ) |
|
|
inline |
Definition at line 30 of file ParallelUniqueId.h.
31 {
32#ifdef LIBMESH_HAVE_TBB_API
34#elif LIBMESH_HAVE_OPENMP
35 id = omp_get_thread_num();
36#elif LIBMESH_HAVE_PTHREAD
38
41 "No Thread IDs available in ParallelUniqueID. Did you forget to initialize()?");
42
45#else
46
47 id = 0;
48#endif
49 }
Provides a way for users to bail out of the current solve.
static tbb::concurrent_bounded_queue< unsigned int > _ids
static Threads::spin_mutex _pthread_id_mutex
◆ ~ParallelUniqueId()
| ParallelUniqueId::~ParallelUniqueId |
( |
| ) |
|
|
inline |
Definition at line 51 of file ParallelUniqueId.h.
52 {
53#ifdef LIBMESH_HAVE_TBB_API
55#elif !defined(LIBMESH_HAVE_OPENMP) && defined(LIBMESH_HAVE_PTHREAD)
57
59#endif
60 }
◆ initialize()
| static void ParallelUniqueId::initialize |
( |
| ) |
|
|
inlinestatic |
Must be called by main thread before any threaded computation! Do NOT call in a worker thread!
Definition at line 66 of file ParallelUniqueId.h.
67 {
69 {
71
72#if defined(LIBMESH_HAVE_TBB_API) || \
73 (!defined(LIBMESH_HAVE_OPENMP) && defined(LIBMESH_HAVE_PTHREAD))
76#endif
77 }
78 }
Referenced by MooseInit::MooseInit().
◆ _ids [1/2]
| std::queue< unsigned int > ParallelUniqueId::_ids |
|
staticprivate |
◆ _ids [2/2]
| std::queue<unsigned int> ParallelUniqueId::_ids |
|
staticprivate |
◆ _initialized
| bool ParallelUniqueId::_initialized = false |
|
staticprivate |
◆ _pthread_id_mutex
◆ id
Definition at line 80 of file ParallelUniqueId.h.
Referenced by BoundaryElemIntegrityCheckThread::operator()(), ComputeElemAuxBcsThread< AuxKernelType >::operator()(), ComputeFVInitialConditionThread::operator()(), ComputeLinearFVElementalThread::operator()(), ComputeLinearFVGreenGaussGradientVolumeThread::operator()(), ComputeLinearFVLimitedGradientThread::operator()(), ComputeLinearFVFaceThread::operator()(), ComputeLinearFVGreenGaussGradientFaceThread::operator()(), AllLocalDofIndicesThread::operator()(), ComputeInitialConditionThread::operator()(), MaxQpsThread::operator()(), ComputeJacobianForScalingThread::operator()(), PenetrationThread::operator()(), ThreadedNodeLoop< RangeType, IteratorType >::operator()(), ThreadedFaceLoop< RangeType >::operator()(), and ThreadedElementLoopBase< RangeType >::operator()().
The documentation for this class was generated from the following files: